Commit e73e0fe5 authored by piman@google.com's avatar piman@google.com

Disable Pepper 3d contexts when accelerated compositing of plugins is disabled

BUG=none
TEST=Pepper Flash

Review URL: http://codereview.chromium.org/6127007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71273 0039d316-1c4b-4281-b951-d872f2087c98
parent d8ef5265
...@@ -515,6 +515,11 @@ PepperPluginDelegateImpl::CreateImage2D(int width, int height) { ...@@ -515,6 +515,11 @@ PepperPluginDelegateImpl::CreateImage2D(int width, int height) {
webkit::ppapi::PluginDelegate::PlatformContext3D* webkit::ppapi::PluginDelegate::PlatformContext3D*
PepperPluginDelegateImpl::CreateContext3D() { PepperPluginDelegateImpl::CreateContext3D() {
#ifdef ENABLE_GPU #ifdef ENABLE_GPU
// If accelerated compositing of plugins is disabled, fail to create a 3D
// context, because it won't be visible. This allows graceful fallback in the
// modules.
if (!render_view_->webkit_preferences().accelerated_plugins_enabled)
return NULL;
WebGraphicsContext3DCommandBufferImpl* context = WebGraphicsContext3DCommandBufferImpl* context =
static_cast<WebGraphicsContext3DCommandBufferImpl*>( static_cast<WebGraphicsContext3DCommandBufferImpl*>(
render_view_->webview()->graphicsContext3D()); render_view_->webview()->graphicsContext3D());
......
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