OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 5 #ifndef PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
6 #define PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 6 #define PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void DestroyGLES2Impl(); | 92 void DestroyGLES2Impl(); |
93 | 93 |
94 private: | 94 private: |
95 // On the plugin side, we need to know that we already have the lock, so that | 95 // On the plugin side, we need to know that we already have the lock, so that |
96 // we don't try to acquire it again. The default implementation does nothing; | 96 // we don't try to acquire it again. The default implementation does nothing; |
97 // the Plugin side of the proxy must implement these. | 97 // the Plugin side of the proxy must implement these. |
98 friend class ScopedNoLocking; | 98 friend class ScopedNoLocking; |
99 virtual void PushAlreadyLocked(); | 99 virtual void PushAlreadyLocked(); |
100 virtual void PopAlreadyLocked(); | 100 virtual void PopAlreadyLocked(); |
101 | 101 |
| 102 // The VideoDecoder needs to be able to call Graphics3D Flush() after taking |
| 103 // the proxy lock. Hence it needs access to ScopedNoLocking. |
| 104 friend class PPB_VideoDecoder_Shared; |
| 105 |
102 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; | 106 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; |
103 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 107 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
104 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; | 108 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; |
105 | 109 |
106 // Callback that needs to be executed when swap-buffers is completed. | 110 // Callback that needs to be executed when swap-buffers is completed. |
107 scoped_refptr<TrackedCallback> swap_callback_; | 111 scoped_refptr<TrackedCallback> swap_callback_; |
108 | 112 |
109 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared); | 113 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared); |
110 }; | 114 }; |
111 | 115 |
112 } // namespace ppapi | 116 } // namespace ppapi |
113 | 117 |
114 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ | 118 #endif // PPAPI_SHARED_IMPL_GRAPHICS_3D_IMPL_H_ |
115 | 119 |
OLD | NEW |