Bug 923133 - Remove unneeded main thread GL context management in -[ChildView lockFocus]. r=mattwoodrow
authorMarkus Stange <mstange@themasta.com>
Wed, 09 Oct 2013 10:39:22 -0400
changeset 151648 fa082c3dc9930cc1a28cef1b9c9b8b3ebf207fa9
parent 151647 30c25c68bb3edede082f5248f9ae6763ce8201bf
child 151649 1c7c44b9f29f9743b5160a193bb6f40c0d39bbbf
push id25503
push userkwierso@gmail.com
push dateTue, 22 Oct 2013 22:12:07 +0000
treeherdermozilla-central@31382b5fa51e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs923133
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 923133 - Remove unneeded main thread GL context management in -[ChildView lockFocus]. r=mattwoodrow
widget/cocoa/nsChildView.h
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.h
+++ b/widget/cocoa/nsChildView.h
@@ -330,17 +330,16 @@ enum {
 
 - (void)updateWindowDraggableStateOnMouseMove:(NSEvent*)theEvent;
 
 - (void)sendMouseEnterOrExitEvent:(NSEvent*)aEvent
                             enter:(BOOL)aEnter
                              type:(mozilla::WidgetMouseEvent::exitType)aType;
 
 - (void)update;
-- (void)lockFocus;
 - (void) _surfaceNeedsUpdate:(NSNotification*)notification;
 
 - (BOOL)isPluginView;
 
 // Are we processing an NSLeftMouseDown event that will fail to click through?
 // If so, we shouldn't focus or unfocus a plugin.
 - (BOOL)isInFailingLeftClickThrough;
 
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -3231,33 +3231,16 @@ NSEvent* gLastDragMouseDownEvent = nil;
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 - (BOOL)mouseDownCanMoveWindow
 {
   return [[self window] isMovableByWindowBackground];
 }
 
-- (void)lockFocus
-{
-  NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
-
-  [super lockFocus];
-
-  if (mGLContext) {
-    if ([mGLContext view] != self) {
-      [mGLContext setView:self];
-    }
-
-    [mGLContext makeCurrentContext];
-  }
-
-  NS_OBJC_END_TRY_ABORT_BLOCK;
-}
-
 -(void)update
 {
   if (mGLContext) {
     [mGLContext update];
   }
 }
 
 - (void) _surfaceNeedsUpdate:(NSNotification*)notification