Index: content/browser/renderer_host/render_widget_host_view_mac.mm |
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm |
index 6ba515f991a8521b32755dc8e7a7a64b22c57c5a..6bdf7480a7d527b6574ed2a8ef3976d2ca0e7365 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm |
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm |
@@ -949,7 +949,6 @@ void RenderWidgetHostViewMac::CompositorSwapBuffers(uint64 surface_handle, |
int32 gpu_host_id) { |
pending_swap_buffers_acks_.push_back(std::make_pair(route_id, gpu_host_id)); |
if (!compositing_iosurface_.get() && !is_hidden_) { |
- [cocoa_view_ addedGLContext]; |
compositing_iosurface_.reset(CompositingIOSurfaceMac::Create()); |
} |
@@ -1221,7 +1220,6 @@ void RenderWidgetHostViewMac::SetTextInputActive(bool active) { |
// OpenGL support: |
handlingGlobalFrameDidChange_ = NO; |
- hasGLContext_ = NO; |
[[NSNotificationCenter defaultCenter] |
addObserver:self |
selector:@selector(globalFrameDidChange:) |
@@ -1758,35 +1756,13 @@ void RenderWidgetHostViewMac::SetTextInputActive(bool active) { |
} |
} |
-// OpenGL support |
-- (void)addedGLContext { |
- hasGLContext_ = YES; |
- if (![self isHiddenOrHasHiddenAncestor]) { |
- // Intentionally leak underlaySurface count so that the window never changes |
- // back to opaque. This is to prevent black/transparent flashing that |
- // appears during tab switching otherwise. |
- // TODO(jbates) Remove the underlaySurfaceAdded feature completely from |
- // ChromeBrowserWindow when the subtle gray line corner bug is fixed. Then |
- // the window can be permanently set to non-opaque. crbug.com/56154 |
- if ([[self window] respondsToSelector:@selector(underlaySurfaceAdded)]) |
- [static_cast<id>([self window]) underlaySurfaceAdded]; |
- } |
-} |
- |
- (void)viewWillMoveToWindow:(NSWindow*)newWindow { |
- if (![self isHiddenOrHasHiddenAncestor]) { |
- // Intentionally leak underlaySurface count (see comment in addedGLContext). |
- if (hasGLContext_ && |
- [newWindow respondsToSelector:@selector(underlaySurfaceAdded)]) |
- [static_cast<id>(newWindow) underlaySurfaceAdded]; |
- } |
- |
// We're messing with the window, so do this to ensure no flashes. This one |
// prevents a flash when the current tab is closed. |
[[self window] disableScreenUpdatesUntilFlush]; |
} |
-- (void) globalFrameDidChange:(NSNotification*)notification { |
+- (void)globalFrameDidChange:(NSNotification*)notification { |
if (handlingGlobalFrameDidChange_) |
return; |