From 84169234d73e76c672a465302fbf27da70c3e70d Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 28 Nov 2012 23:02:24 -0600 Subject: [PATCH] swpipe: Cleanup, code correction * Remove error text as giving SetCurrentContext a NULL bitmap isn't a critical error. * Ensure old front buffer is flushed on SetCurrentContext * Small style fix --- src/add-ons/opengl/swpipe/GalliumContext.cpp | 3 +-- src/add-ons/opengl/swpipe/SoftwareWinsys.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/opengl/swpipe/GalliumContext.cpp b/src/add-ons/opengl/swpipe/GalliumContext.cpp index d0488411d1..8bf28b842e 100644 --- a/src/add-ons/opengl/swpipe/GalliumContext.cpp +++ b/src/add-ons/opengl/swpipe/GalliumContext.cpp @@ -425,7 +425,6 @@ GalliumContext::SetCurrentContext(Bitmap *bitmap, context_id contextID) struct st_api* api = context->api; if (!bitmap) { - ERROR("%s: Invalid bitmap provided!\n", __func__); api->make_current(context->api, NULL, NULL, NULL); return B_ERROR; } @@ -435,7 +434,7 @@ GalliumContext::SetCurrentContext(Bitmap *bitmap, context_id contextID) if (oldContextID > 0 && oldContextID != contextID) { fContext[oldContextID]->st->flush(fContext[oldContextID]->st, - 0, NULL); + ST_FLUSH_FRONT, NULL); } // TODO: WinSysDrawBuffer & WinSysReadBuffer? diff --git a/src/add-ons/opengl/swpipe/SoftwareWinsys.h b/src/add-ons/opengl/swpipe/SoftwareWinsys.h index a3497bfe9e..2cf1b8eaf5 100644 --- a/src/add-ons/opengl/swpipe/SoftwareWinsys.h +++ b/src/add-ons/opengl/swpipe/SoftwareWinsys.h @@ -28,6 +28,7 @@ struct haiku_displaytarget void* data; }; + struct sw_winsys* winsys_connect_hooks();