From 67094241506e0b568322fff997592e194dcc7a8e Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 3 Jan 2011 09:34:46 +0000 Subject: [PATCH] Added TODO git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40089 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../mesa_software_renderer/MesaSoftwareRenderer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/add-ons/opengl/mesa_software_renderer/MesaSoftwareRenderer.cpp b/src/add-ons/opengl/mesa_software_renderer/MesaSoftwareRenderer.cpp index 3c9837c81c..5874fb28f5 100644 --- a/src/add-ons/opengl/mesa_software_renderer/MesaSoftwareRenderer.cpp +++ b/src/add-ons/opengl/mesa_software_renderer/MesaSoftwareRenderer.cpp @@ -418,7 +418,7 @@ void MesaSoftwareRenderer::SwapBuffers(bool VSync) { CALLED(); - + if (!fBitmap) return; @@ -430,8 +430,10 @@ MesaSoftwareRenderer::SwapBuffers(bool VSync) GLView()->DrawBitmap(fBitmap, B_ORIGIN); GLView()->UnlockLooper(); } - } else + } else { + // TODO: Here the BGLView needs to be drawlocked. _CopyToDirect(); + } if (VSync) { BScreen screen(GLView()->Window()); @@ -773,6 +775,9 @@ MesaSoftwareRenderer::_Flush(GLcontext* ctx) CALLED(); MesaSoftwareRenderer* mr = (MesaSoftwareRenderer*)ctx->DriverCtx; if ((mr->fOptions & BGL_DOUBLE) == 0) { + // TODO: SwapBuffers() can call _CopyToDirect(), which should + // be always called with with the BGLView drawlocked. + // This is not always the case if called from here. mr->SwapBuffers(); } }