| 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_COMMAND_BUFFER_PROXY_H_ | 5 #ifndef PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ |
| 6 #define PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ | 6 #define PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 void RetireSyncPoint(uint32 sync_point) override; | 63 void RetireSyncPoint(uint32 sync_point) override; |
| 64 void SignalSyncPoint(uint32 sync_point, | 64 void SignalSyncPoint(uint32 sync_point, |
| 65 const base::Closure& callback) override; | 65 const base::Closure& callback) override; |
| 66 void SignalQuery(uint32 query, const base::Closure& callback) override; | 66 void SignalQuery(uint32 query, const base::Closure& callback) override; |
| 67 void SetSurfaceVisible(bool visible) override; | 67 void SetSurfaceVisible(bool visible) override; |
| 68 uint32 CreateStreamTexture(uint32 texture_id) override; | 68 uint32 CreateStreamTexture(uint32 texture_id) override; |
| 69 void SetLock(base::Lock*) override; | 69 void SetLock(base::Lock*) override; |
| 70 bool IsGpuChannelLost() override; | 70 bool IsGpuChannelLost() override; |
| 71 gpu::CommandBufferNamespace GetNamespaceID() const override; | 71 gpu::CommandBufferNamespace GetNamespaceID() const override; |
| 72 uint64_t GetCommandBufferID() const override; | 72 uint64_t GetCommandBufferID() const override; |
| 73 uint64_t GenerateFenceSyncRelease() override; |
| 74 bool IsFenceSyncRelease(uint64_t release) override; |
| 75 bool IsFenceSyncFlushed(uint64_t release) override; |
| 73 | 76 |
| 74 private: | 77 private: |
| 75 bool Send(IPC::Message* msg); | 78 bool Send(IPC::Message* msg); |
| 76 void UpdateState(const gpu::CommandBuffer::State& state, bool success); | 79 void UpdateState(const gpu::CommandBuffer::State& state, bool success); |
| 77 | 80 |
| 78 // Try to read an updated copy of the state from shared memory. | 81 // Try to read an updated copy of the state from shared memory. |
| 79 void TryUpdateState(); | 82 void TryUpdateState(); |
| 80 | 83 |
| 81 // The shared memory area used to update state. | 84 // The shared memory area used to update state. |
| 82 gpu::CommandBufferSharedState* shared_state() const; | 85 gpu::CommandBufferSharedState* shared_state() const; |
| 83 | 86 |
| 84 void FlushInternal(); | 87 void FlushInternal(); |
| 85 | 88 |
| 86 const uint64_t command_buffer_id_; | 89 const uint64_t command_buffer_id_; |
| 87 | 90 |
| 88 gpu::Capabilities capabilities_; | 91 gpu::Capabilities capabilities_; |
| 89 State last_state_; | 92 State last_state_; |
| 90 scoped_ptr<base::SharedMemory> shared_state_shm_; | 93 scoped_ptr<base::SharedMemory> shared_state_shm_; |
| 91 | 94 |
| 92 HostResource resource_; | 95 HostResource resource_; |
| 93 PluginDispatcher* dispatcher_; | 96 PluginDispatcher* dispatcher_; |
| 94 | 97 |
| 95 base::Closure channel_error_callback_; | 98 base::Closure channel_error_callback_; |
| 96 | 99 |
| 97 InstanceData::FlushInfo *flush_info_; | 100 InstanceData::FlushInfo *flush_info_; |
| 98 | 101 |
| 102 uint64_t next_fence_sync_release_; |
| 103 uint64_t pending_fence_sync_release_; |
| 104 uint64_t flushed_fence_sync_release_; |
| 105 |
| 99 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); | 106 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); |
| 100 }; | 107 }; |
| 101 | 108 |
| 102 } // namespace proxy | 109 } // namespace proxy |
| 103 } // namespace ppapi | 110 } // namespace ppapi |
| 104 | 111 |
| 105 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ | 112 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ |
| OLD | NEW |