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

Unified Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 8342024: Fixed bugs with Pepper 3D under dynamic GPU switching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « content/renderer/pepper_plugin_delegate_impl.h ('k') | content/renderer/render_widget_fullscreen_pepper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper_plugin_delegate_impl.cc
===================================================================
--- content/renderer/pepper_plugin_delegate_impl.cc (revision 106379)
+++ content/renderer/pepper_plugin_delegate_impl.cc (working copy)
@@ -1033,19 +1033,7 @@
// modules.
if (!render_view_->webkit_preferences().accelerated_plugins_enabled)
return NULL;
- WebGraphicsContext3DCommandBufferImpl* context =
- static_cast<WebGraphicsContext3DCommandBufferImpl*>(
- render_view_->webview()->graphicsContext3D());
- if (!context)
- return NULL;
- if (!context->makeContextCurrent() || context->isContextLost())
- return NULL;
-
- RendererGLContext* parent_context = context->context();
- if (!parent_context)
- return NULL;
-
- return new PlatformContext3DImpl(parent_context);
+ return new PlatformContext3DImpl(this);
#else
return NULL;
#endif
@@ -1753,6 +1741,22 @@
return render_view_->routing_id();
}
+RendererGLContext*
+PepperPluginDelegateImpl::GetParentContextForPlatformContext3D() {
+ WebGraphicsContext3DCommandBufferImpl* context =
+ static_cast<WebGraphicsContext3DCommandBufferImpl*>(
+ render_view_->webview()->graphicsContext3D());
+ if (!context)
+ return NULL;
+ if (!context->makeContextCurrent() || context->isContextLost())
+ return NULL;
+
+ RendererGLContext* parent_context = context->context();
+ if (!parent_context)
+ return NULL;
+ return parent_context;
+}
+
void PepperPluginDelegateImpl::PublishInitialPolicy(
scoped_refptr<webkit::ppapi::PluginInstance> instance,
const std::string& policy) {
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.h ('k') | content/renderer/render_widget_fullscreen_pepper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698