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

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: merge 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
« no previous file with comments | « ppapi/proxy/ppb_graphics_3d_proxy.cc ('k') | ppapi/shared_impl/ppb_graphics_3d_shared.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c51c99b81d11c3f302e8437900c0dce189f8be27..d576d57fa279c9059d2c37da4eb63dbc16545dd1 100644
--- a/ppapi/shared_impl/ppb_graphics_3d_shared.h
+++ b/ppapi/shared_impl/ppb_graphics_3d_shared.h
@@ -59,28 +59,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();
@@ -96,17 +74,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_;
« no previous file with comments | « ppapi/proxy/ppb_graphics_3d_proxy.cc ('k') | ppapi/shared_impl/ppb_graphics_3d_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698