Mac: Remove NSView+NSOpenGLContext in favor of NSCGLSurface
commit15f6a525272d5a36091d0b095342f6e49adee250
authorccameron <ccameron@chromium.org>
Tue, 16 Jun 2015 10:33:50 +0000 (16 03:33 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 16 Jun 2015 10:34:20 +0000 (16 10:34 +0000)
treed82512b773b82f1e7309abc3c795de6449bcd26b
parenta5f531cc1f81a881344d507d2b036c01e941ade6
Mac: Remove NSView+NSOpenGLContext in favor of NSCGLSurface

After some digging into the NSView+NSOpenGLContext path, it is
preferable to use the private underlying API, NSCGLSurface. That API
allows for us to use the remote CALayer API to do all drawing from the
GPU process.

Rename the flag EnableNSGLSurface to EnableNSCGLSurfaceApi. Also add a
force flag, to allow using the API when it is not advisable.

Add a TODO for disabling the feature when multiple GPUs are present (it
will be done in a follow-up patch, because the implementation mechanism
will need some discussion).

BUG=496484

Review URL: https://codereview.chromium.org/1183533006

Cr-Commit-Position: refs/heads/master@{#334579}
content/browser/gpu/gpu_process_host.cc
content/common/gpu/image_transport_surface_calayer_mac.mm
ui/accelerated_widget_mac/BUILD.gn
ui/accelerated_widget_mac/accelerated_widget_mac.gyp
ui/accelerated_widget_mac/accelerated_widget_mac.h
ui/accelerated_widget_mac/accelerated_widget_mac.mm
ui/accelerated_widget_mac/io_surface_ns_gl_surface.h [deleted file]
ui/accelerated_widget_mac/io_surface_ns_gl_surface.mm [deleted file]
ui/base/cocoa/remote_layer_api.mm
ui/base/ui_base_switches.cc
ui/base/ui_base_switches.h