| 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_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; | 42 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; |
| 43 virtual PP_Bool GetTransferBuffer(int32_t id, | 43 virtual PP_Bool GetTransferBuffer(int32_t id, |
| 44 int* shm_handle, | 44 int* shm_handle, |
| 45 uint32_t* shm_size) OVERRIDE; | 45 uint32_t* shm_size) OVERRIDE; |
| 46 virtual gpu::CommandBuffer::State FlushSyncFast( | 46 virtual gpu::CommandBuffer::State FlushSyncFast( |
| 47 int32_t put_offset, | 47 int32_t put_offset, |
| 48 int32_t last_known_get) OVERRIDE; | 48 int32_t last_known_get) OVERRIDE; |
| 49 virtual uint32_t InsertSyncPoint() OVERRIDE; | 49 virtual uint32_t InsertSyncPoint() OVERRIDE; |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 class LockingCommandBuffer; | |
| 53 | |
| 54 // PPB_Graphics3D_Shared overrides. | 52 // PPB_Graphics3D_Shared overrides. |
| 55 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; | 53 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; |
| 56 virtual gpu::GpuControl* GetGpuControl() OVERRIDE; | 54 virtual gpu::GpuControl* GetGpuControl() OVERRIDE; |
| 57 virtual int32 DoSwapBuffers() OVERRIDE; | 55 virtual int32 DoSwapBuffers() OVERRIDE; |
| 58 virtual void PushAlreadyLocked() OVERRIDE; | |
| 59 virtual void PopAlreadyLocked() OVERRIDE; | |
| 60 | 56 |
| 61 int num_already_locked_calls_; | |
| 62 scoped_ptr<PpapiCommandBufferProxy> command_buffer_; | 57 scoped_ptr<PpapiCommandBufferProxy> command_buffer_; |
| 63 scoped_ptr<LockingCommandBuffer> locking_command_buffer_; | |
| 64 | 58 |
| 65 DISALLOW_COPY_AND_ASSIGN(Graphics3D); | 59 DISALLOW_COPY_AND_ASSIGN(Graphics3D); |
| 66 }; | 60 }; |
| 67 | 61 |
| 68 class PPB_Graphics3D_Proxy : public InterfaceProxy { | 62 class PPB_Graphics3D_Proxy : public InterfaceProxy { |
| 69 public: | 63 public: |
| 70 PPB_Graphics3D_Proxy(Dispatcher* dispatcher); | 64 PPB_Graphics3D_Proxy(Dispatcher* dispatcher); |
| 71 virtual ~PPB_Graphics3D_Proxy(); | 65 virtual ~PPB_Graphics3D_Proxy(); |
| 72 | 66 |
| 73 static PP_Resource CreateProxyResource( | 67 static PP_Resource CreateProxyResource( |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; | 111 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; |
| 118 | 112 |
| 119 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); | 113 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); |
| 120 }; | 114 }; |
| 121 | 115 |
| 122 } // namespace proxy | 116 } // namespace proxy |
| 123 } // namespace ppapi | 117 } // namespace ppapi |
| 124 | 118 |
| 125 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 119 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 126 | 120 |
| OLD | NEW |