Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1823)

Unified Diff: chrome/renderer/pepper_plugin_delegate_impl.cc

Issue 6127007: Disable Pepper 3d contexts when accelerated compositing of plugins is disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/pepper_plugin_delegate_impl.cc
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.cc b/chrome/renderer/pepper_plugin_delegate_impl.cc
index eba798aab2259889715af719b6a00432a3c634b0..bdbee2389fbc8d921cc32f3157295c8bc76b9acc 100644
--- a/chrome/renderer/pepper_plugin_delegate_impl.cc
+++ b/chrome/renderer/pepper_plugin_delegate_impl.cc
@@ -515,6 +515,11 @@ PepperPluginDelegateImpl::CreateImage2D(int width, int height) {
webkit::ppapi::PluginDelegate::PlatformContext3D*
PepperPluginDelegateImpl::CreateContext3D() {
#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 =
static_cast<WebGraphicsContext3DCommandBufferImpl*>(
render_view_->webview()->graphicsContext3D());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698