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
This commit is contained in:
Alexander von Gluck IV
2012-11-28 23:03:03 -06:00
parent caa23ee333
commit 84169234d7
2 changed files with 2 additions and 2 deletions
+1 -2
View File
@@ -425,7 +425,6 @@ GalliumContext::SetCurrentContext(Bitmap *bitmap, context_id contextID)
struct st_api* api = context->api; struct st_api* api = context->api;
if (!bitmap) { if (!bitmap) {
ERROR("%s: Invalid bitmap provided!\n", __func__);
api->make_current(context->api, NULL, NULL, NULL); api->make_current(context->api, NULL, NULL, NULL);
return B_ERROR; return B_ERROR;
} }
@@ -435,7 +434,7 @@ GalliumContext::SetCurrentContext(Bitmap *bitmap, context_id contextID)
if (oldContextID > 0 && oldContextID != contextID) { if (oldContextID > 0 && oldContextID != contextID) {
fContext[oldContextID]->st->flush(fContext[oldContextID]->st, fContext[oldContextID]->st->flush(fContext[oldContextID]->st,
0, NULL); ST_FLUSH_FRONT, NULL);
} }
// TODO: WinSysDrawBuffer & WinSysReadBuffer? // TODO: WinSysDrawBuffer & WinSysReadBuffer?
@@ -28,6 +28,7 @@ struct haiku_displaytarget
void* data; void* data;
}; };
struct sw_winsys* winsys_connect_hooks(); struct sw_winsys* winsys_connect_hooks();