summaryrefslogtreecommitdiff
path: root/lib/mesa/src/hgl/GLView.cpp
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:13:18 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:13:18 +0000
commitfdcc03929065b5bf5dd93553db219ea3e05c8c34 (patch)
treeca90dc8d9e89febdcd4160956c1b8ec098a4efc9 /lib/mesa/src/hgl/GLView.cpp
parent3c9de4a7e13712b5696750bbd59a18c848742022 (diff)
Import Mesa 19.2.8
Diffstat (limited to 'lib/mesa/src/hgl/GLView.cpp')
-rw-r--r--lib/mesa/src/hgl/GLView.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mesa/src/hgl/GLView.cpp b/lib/mesa/src/hgl/GLView.cpp
index 9ae5b5c83..9e01dcc2c 100644
--- a/lib/mesa/src/hgl/GLView.cpp
+++ b/lib/mesa/src/hgl/GLView.cpp
@@ -51,6 +51,7 @@ BGLView::BGLView(BRect rect, const char* name, ulong resizingMode, ulong mode,
fDitherMap(NULL)
{
fRoster = new GLRendererRoster(this, options);
+ fRenderer = fRoster->GetRenderer();
}
@@ -68,7 +69,7 @@ BGLView::LockGL()
// TODO: acquire the OpenGL API lock it on this glview
fDisplayLock.Lock();
- if (fRenderer)
+ if (fRenderer != NULL && fDisplayLock.CountLocks() == 1)
fRenderer->LockGL();
}
@@ -76,7 +77,7 @@ BGLView::LockGL()
void
BGLView::UnlockGL()
{
- if (fRenderer)
+ if (fRenderer != NULL && fDisplayLock.CountLocks() == 1)
fRenderer->UnlockGL();
fDisplayLock.Unlock();
@@ -189,7 +190,6 @@ BGLView::AttachedToWindow()
for (BView* view = this; view != NULL; view = view->Parent())
view->ConvertToParent(&fBounds);
- fRenderer = fRoster->GetRenderer();
if (fRenderer != NULL) {
// Jackburton: The following code was commented because it doesn't look
// good in "direct" mode: