From 250d81da256fc919544f8c97b4e2364d3795f6c0 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 3 Nov 2010 16:00:47 +0800 Subject: d3d1x: Use native_surface::present. Replace native_surface::flush_frontbuffer and native_surface::swap_buffers calls by native_surface::present calls. --- src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/gallium/state_trackers/d3d1x') diff --git a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp index e1c34611d1..c246fc5ef7 100644 --- a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp +++ b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp @@ -1101,6 +1101,7 @@ struct GalliumDXGISwapChain : public GalliumDXGIObjectbackend->BeginPresent(desc.OutputWindow, &present_cookie, &cur_window, &rect, &rgndata, &preserve_aspect_ratio); @@ -1221,16 +1222,9 @@ struct GalliumDXGISwapChain : public GalliumDXGIObjectflush(pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, 0); - if(db) - { - if(!surface->swap_buffers(surface)) - return DXGI_ERROR_DEVICE_REMOVED; - } - else - { - if(!surface->flush_frontbuffer(surface)) - return DXGI_ERROR_DEVICE_REMOVED; - } + att = (db) ? NATIVE_ATTACHMENT_BACK_LEFT : NATIVE_ATTACHMENT_FRONT_LEFT; + if(!surface->present(surface, att, FALSE, 0)) + return DXGI_ERROR_DEVICE_REMOVED; end_present: parent->backend->EndPresent(desc.OutputWindow, present_cookie); -- cgit v1.2.3