Bug 1491442 - Fix up and document mNeedsGLUpdate locking semantics, and remove a stray semicolon. r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D38748

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-08-16 01:10:11 +00:00
Родитель dac6adef26
Коммит 2935e2eca6
2 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -156,7 +156,9 @@ class WidgetRenderingContext;
BOOL mExpectingWheelStop;
// Set to YES when our GL surface has been updated and we need to call
// updateGLContext before we composite.
// updateGLContext on the compositor thread before we composite.
// Accesses from different threads are synchronized via mGLContext's
// CGLContextObj lock.
BOOL mNeedsGLUpdate;
// Holds our drag service across multiple drag calls. The reference to the
@ -166,6 +168,7 @@ class WidgetRenderingContext;
// when handling |draggingUpdated:| messages.
nsIDragService* mDragService;
// The NSOpenGLContext that is attached to our mPixelHostingView.
NSOpenGLContext* mGLContext;
// Gestures support

Просмотреть файл

@ -2802,7 +2802,6 @@ class WidgetsReleaserRunnable final : public mozilla::Runnable {
}
@end
;
@implementation ChildView
@ -2994,14 +2993,14 @@ NSEvent* gLastDragMouseDownEvent = nil;
return false;
}
CGLLockContext((CGLContextObj)[aGLContext CGLContextObj]);
if (!mGLContext) {
mGLContext = aGLContext;
[mGLContext retain];
mNeedsGLUpdate = true;
mNeedsGLUpdate = YES;
}
CGLLockContext((CGLContextObj)[aGLContext CGLContextObj]);
if (mNeedsGLUpdate) {
[self updateGLContext];
mNeedsGLUpdate = NO;