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

Unified Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 12673002: pepper: Use the RenderThread's shared context as the parent context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: null context3d in swiftshader Created 7 years, 9 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
Index: content/renderer/pepper/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
index b79ae624b646dc8dcab0135894b69edea7d5dfb7..cb5497a9a36bda3b6d1dc36cc319e8471b47c70f 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
@@ -832,7 +832,7 @@ webkit::ppapi::PluginDelegate::PlatformContext3D*
const webkit_glue::WebPreferences& prefs = render_view_->webkit_preferences();
if (!prefs.accelerated_compositing_for_plugins_enabled)
return NULL;
- return new PlatformContext3DImpl(this);
+ return new PlatformContext3DImpl;
#else
return NULL;
#endif
@@ -840,7 +840,8 @@ webkit::ppapi::PluginDelegate::PlatformContext3D*
void PepperPluginDelegateImpl::ReparentContext(
webkit::ppapi::PluginDelegate::PlatformContext3D* context) {
- static_cast<PlatformContext3DImpl*>(context)->SetParentContext(this);
+ static_cast<PlatformContext3DImpl*>(context)->
+ SetParentAndCreateBackingTextureIfNeeded();
}
webkit::ppapi::PluginDelegate::PlatformVideoCapture*
@@ -1573,21 +1574,6 @@ int PepperPluginDelegateImpl::GetSessionID(PP_DeviceType_Dev type,
#endif
}
-WebGraphicsContext3DCommandBufferImpl*
-PepperPluginDelegateImpl::GetParentContextForPlatformContext3D() {
- if (!offscreen_context3d_ || offscreen_context3d_->DestroyedOnMainThread()) {
- offscreen_context3d_ =
- RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
-
- if (!offscreen_context3d_->InitializeOnMainThread() ||
- !offscreen_context3d_->BindToCurrentThread()) {
- offscreen_context3d_ = NULL;
- return NULL;
- }
- }
- return offscreen_context3d_->Context3d();
-}
-
MouseLockDispatcher::LockTarget*
PepperPluginDelegateImpl::GetOrCreateLockTargetAdapter(
webkit::ppapi::PluginInstance* instance) {
« no previous file with comments | « content/renderer/pepper/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