Commit 8c814aac authored by dhollowa@chromium.org's avatar dhollowa@chromium.org

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
parent df8e4954
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment