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

Unified Diff: content/renderer/pepper/pepper_platform_context_3d_impl.h

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_platform_context_3d_impl.h
diff --git a/content/renderer/pepper/pepper_platform_context_3d_impl.h b/content/renderer/pepper/pepper_platform_context_3d_impl.h
index f5ae68644edec77e03015ebd56aeb262992ea9c6..a17d6ee68c37ef02388d158f4b767420a1b024b4 100644
--- a/content/renderer/pepper/pepper_platform_context_3d_impl.h
+++ b/content/renderer/pepper/pepper_platform_context_3d_impl.h
@@ -20,15 +20,13 @@ class CommandBuffer;
} // namespace gpu
namespace content {
+class ContextProviderCommandBuffer;
class GpuChannelHost;
-class PepperParentContextProvider;
-
class PlatformContext3DImpl
: public webkit::ppapi::PluginDelegate::PlatformContext3D {
public:
- explicit PlatformContext3DImpl(
- PepperParentContextProvider* parent_context_provider);
+ explicit PlatformContext3DImpl();
virtual ~PlatformContext3DImpl();
virtual bool Init(const int32* attrib_list,
@@ -43,17 +41,15 @@ class PlatformContext3DImpl
const ConsoleMessageCallback& callback) OVERRIDE;
virtual bool Echo(const base::Closure& task) OVERRIDE;
- virtual void SetParentContext(
- PepperParentContextProvider* parent_context_provider);
+ bool SetParentAndCreateBackingTextureIfNeeded();
+ void DestroyParentContextProviderAndBackingTexture();
private:
bool InitRaw();
void OnContextLost();
void OnConsoleMessage(const std::string& msg, int id);
- // Implicitly weak pointer; must outlive this instance.
- PepperParentContextProvider* parent_context_provider_;
- base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> parent_context_;
+ scoped_refptr<ContextProviderCommandBuffer> parent_context_provider_;
scoped_refptr<GpuChannelHost> channel_;
unsigned int parent_texture_id_;
bool has_alpha_;
« no previous file with comments | « content/renderer/pepper/pepper_parent_context_provider.cc ('k') | content/renderer/pepper/pepper_platform_context_3d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698