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

Unified Diff: ppapi/shared_impl/ppb_graphics_3d_shared.h

Issue 24466004: PPAPI: Make GLES2 calls resilient to bad/dead resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add AssertAcquiredDebugOnly Created 7 years, 3 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: ppapi/shared_impl/ppb_graphics_3d_shared.h
diff --git a/ppapi/shared_impl/ppb_graphics_3d_shared.h b/ppapi/shared_impl/ppb_graphics_3d_shared.h
index 482cb4cf03550cc603ff4ac4e88aa1ed91451df1..29a9b2f4e565876a80bd6010b74a5a9ab5eb5ba2 100644
--- a/ppapi/shared_impl/ppb_graphics_3d_shared.h
+++ b/ppapi/shared_impl/ppb_graphics_3d_shared.h
@@ -58,28 +58,6 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared
void SwapBuffersACK(int32_t pp_error);
protected:
- // ScopedNoLocking makes sure we don't try to lock again when we already have
- // the proxy lock. This is used when we need to use the CommandBuffer
- // (possibly via gles2_impl) but we already have the proxy lock. The
- // CommandBuffer in the plugin side of the proxy will otherwise try to acquire
- // the ProxyLock, causing a crash because we already own the lock. (Locks in
- // Chromium are never recursive).
- class ScopedNoLocking {
- public:
- explicit ScopedNoLocking(PPB_Graphics3D_Shared* graphics3d_shared)
- : graphics3d_shared_(graphics3d_shared) {
- graphics3d_shared_->PushAlreadyLocked();
- }
- ~ScopedNoLocking() {
- graphics3d_shared_->PopAlreadyLocked();
- }
- private:
- PPB_Graphics3D_Shared* graphics3d_shared_; // Weak
-
- DISALLOW_COPY_AND_ASSIGN(ScopedNoLocking);
- };
-
-
PPB_Graphics3D_Shared(PP_Instance instance);
PPB_Graphics3D_Shared(const HostResource& host_resource);
virtual ~PPB_Graphics3D_Shared();
@@ -94,17 +72,6 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared
void DestroyGLES2Impl();
private:
- // On the plugin side, we need to know that we already have the lock, so that
- // we don't try to acquire it again. The default implementation does nothing;
- // the Plugin side of the proxy must implement these.
- friend class ScopedNoLocking;
- virtual void PushAlreadyLocked();
- virtual void PopAlreadyLocked();
-
- // The VideoDecoder needs to be able to call Graphics3D Flush() after taking
- // the proxy lock. Hence it needs access to ScopedNoLocking.
- friend class PPB_VideoDecoder_Shared;
-
scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
scoped_ptr<gpu::TransferBuffer> transfer_buffer_;
scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_;

Powered by Google App Engine
This is Rietveld 408576698