diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 03:37:26 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 03:37:26 +0000 |
commit | 8c814aac8a01d166c9c0b4921528758f74c01f32 (patch) | |
tree | 1f54dd167097df8ad1c7123565adbc92b476849e /ui/gfx/gl | |
parent | df8e4954b1cc331887030c70474eecf21f01b81f (diff) | |
download | chromium_src-8c814aac8a01d166c9c0b4921528758f74c01f32.zip chromium_src-8c814aac8a01d166c9c0b4921528758f74c01f32.tar.gz chromium_src-8c814aac8a01d166c9c0b4921528758f74c01f32.tar.bz2 |
GPU compositing on OSX canary broken
Fixes logic for USE_AURA=1 case in Mac compositor. Changes the code to not rely on |IsOffscreen| test to determine NSView-based surface.
BUG=105036
TEST=Manual test according to bug.
R=jbates@chromium.org, kbr@chromium.org
Review URL: http://codereview.chromium.org/8620009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gl')
-rw-r--r-- | ui/gfx/gl/gl_context_mac.mm | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/ui/gfx/gl/gl_context_mac.mm b/ui/gfx/gl/gl_context_mac.mm index 508ccf9..adf67aa 100644 --- a/ui/gfx/gl/gl_context_mac.mm +++ b/ui/gfx/gl/gl_context_mac.mm @@ -42,17 +42,16 @@ scoped_refptr<GLContext> GLContext::CreateGLContext( switch (GetGLImplementation()) { case kGLImplementationDesktopGL: { scoped_refptr<GLContext> context; - if (compatible_surface->IsOffscreen()) { - context = new GLContextCGL(share_group); - if (!context->Initialize(compatible_surface, gpu_preference)) - return NULL; - } else { #if defined(USE_AURA) - context = new GLContextNSView(share_group); - if (!context->Initialize(compatible_surface, gpu_preference)) - return NULL; -#endif - } + DCHECK(!compatible_surface->IsOffscreen()); + context = new GLContextNSView(share_group); + if (!context->Initialize(compatible_surface, gpu_preference)) + return NULL; +#else + context = new GLContextCGL(share_group); + if (!context->Initialize(compatible_surface, gpu_preference)) + return NULL; +#endif // USE_AURA return context; } |