commit dca73c105071dc969df0f9d03892c786868d4ee7 Author: Josh Aas jaas@kflag.net Date: Sat Sep 2 14:24:00 2017 -0400
Bug 1394654 - Remove OS X opengl workaround from Mozilla bug 603134. r=mstange
This fixes our bug 24566. --- widget/cocoa/nsChildView.h | 1 - widget/cocoa/nsChildView.mm | 33 --------------------------------- 2 files changed, 34 deletions(-)
diff --git a/widget/cocoa/nsChildView.h b/widget/cocoa/nsChildView.h index 5ef686b29521..f6fb44633c3a 100644 --- a/widget/cocoa/nsChildView.h +++ b/widget/cocoa/nsChildView.h @@ -185,7 +185,6 @@ class WidgetRenderingContext; float mCumulativeMagnification; float mCumulativeRotation;
- BOOL mDidForceRefreshOpenGL; BOOL mWaitingForPaint;
#ifdef __LP64__ diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 91dac240fa66..92ccd8b6c107 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -155,7 +155,6 @@ static uint32_t gNumberOfWidgetsNeedingEventThread = 0;
// sets up our view, attaching it to its owning gecko view - (id)initWithFrame:(NSRect)inFrame geckoChild:(nsChildView*)inChild; -- (void)forceRefreshOpenGL;
// set up a gecko mouse event based on a cocoa mouse event - (void) convertCocoaMouseWheelEvent:(NSEvent*)aMouseEvent @@ -3239,12 +3238,6 @@ NSEvent* gLastDragMouseDownEvent = nil; mCumulativeMagnification = 0.0; mCumulativeRotation = 0.0;
- // We can't call forceRefreshOpenGL here because, in order to work around - // the bug, it seems we need to have a draw already happening. Therefore, - // we call it in drawRect:inContext:, when we know that a draw is in - // progress. - mDidForceRefreshOpenGL = NO; - mNeedsGLUpdate = NO;
[self setFocusRingType:NSFocusRingTypeNone]; @@ -3326,25 +3319,6 @@ NSEvent* gLastDragMouseDownEvent = nil; mTextInputHandler = nullptr; }
-// Work around bug 603134. -// OS X has a bug that causes new OpenGL windows to only paint once or twice, -// then stop painting altogether. By clearing the drawable from the GL context, -// and then resetting the view to ourselves, we convince OS X to start updating -// again. -// This can cause a flash in new windows - bug 631339 - but it's very hard to -// fix that while maintaining this workaround. -- (void)forceRefreshOpenGL -{ - NS_OBJC_BEGIN_TRY_ABORT_BLOCK; - - [mGLContext clearDrawable]; - CGLLockContext((CGLContextObj)[mGLContext CGLContextObj]); - [self updateGLContext]; - CGLUnlockContext((CGLContextObj)[mGLContext CGLContextObj]); - - NS_OBJC_END_TRY_ABORT_BLOCK; -} - - (bool)preRender:(NSOpenGLContext *)aGLContext { NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN; @@ -3828,13 +3802,6 @@ NSEvent* gLastDragMouseDownEvent = nil; LayoutDeviceIntRegion region(geckoBounds);
mGeckoChild->PaintWindow(region); - - // Force OpenGL to refresh the very first time we draw. This works around a - // Mac OS X bug that stops windows updating on OS X when we use OpenGL. - if (!mDidForceRefreshOpenGL) { - [self performSelector:@selector(forceRefreshOpenGL) withObject:nil afterDelay:0]; - mDidForceRefreshOpenGL = YES; - } }
// Called asynchronously after setNeedsDisplay in order to avoid entering the
tor-commits@lists.torproject.org