summaryrefslogtreecommitdiffstats
path: root/app/surface
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-10 18:17:47 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-10 18:17:47 +0000
commit6dcacafda1083ecab6d5415369ae30a1b2124758 (patch)
tree644efd7b7f8a72a52a5760324edad58c690ab5b8 /app/surface
parent813a6446c3efaeedc8cf5fcf73715e5188ae39d1 (diff)
downloadchromium_src-6dcacafda1083ecab6d5415369ae30a1b2124758.zip
chromium_src-6dcacafda1083ecab6d5415369ae30a1b2124758.tar.gz
chromium_src-6dcacafda1083ecab6d5415369ae30a1b2124758.tar.bz2
Make accelerated plugin support aware of the requirement to use the
real OpenGL implementation rather than the Mesa software renderer. If not using desktop GL, then do not advertise Core Animation support, and make accelerated surface initialization fail. BUG=68751 TEST=none (ran reliability_tests with these changes) Review URL: http://codereview.chromium.org/6166003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/surface')
-rw-r--r--app/surface/accelerated_surface_mac.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/surface/accelerated_surface_mac.cc b/app/surface/accelerated_surface_mac.cc
index b476619..0919e35 100644
--- a/app/surface/accelerated_surface_mac.cc
+++ b/app/surface/accelerated_surface_mac.cc
@@ -27,6 +27,11 @@ bool AcceleratedSurface::Initialize(gfx::GLContext* share_context,
if (!gfx::GLContext::InitializeOneOff())
return false;
+ // Drawing to IOSurfaces via OpenGL only works with desktop GL and
+ // not with the OSMesa software renderer.
+ if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL)
+ return false;
+
gl_context_.reset(gfx::GLContext::CreateOffscreenGLContext(share_context));
if (!gl_context_.get())
return false;