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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 int32* id) OVERRIDE; | 53 int32* id) OVERRIDE; |
54 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; | 54 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; |
55 virtual uint32 InsertSyncPoint() OVERRIDE; | 55 virtual uint32 InsertSyncPoint() OVERRIDE; |
56 virtual uint32 InsertFutureSyncPoint() OVERRIDE; | 56 virtual uint32 InsertFutureSyncPoint() OVERRIDE; |
57 virtual void RetireSyncPoint(uint32 sync_point) OVERRIDE; | 57 virtual void RetireSyncPoint(uint32 sync_point) OVERRIDE; |
58 virtual void SignalSyncPoint(uint32 sync_point, | 58 virtual void SignalSyncPoint(uint32 sync_point, |
59 const base::Closure& callback) OVERRIDE; | 59 const base::Closure& callback) OVERRIDE; |
60 virtual void SignalQuery(uint32 query, | 60 virtual void SignalQuery(uint32 query, |
61 const base::Closure& callback) OVERRIDE; | 61 const base::Closure& callback) OVERRIDE; |
62 virtual void SetSurfaceVisible(bool visible) OVERRIDE; | 62 virtual void SetSurfaceVisible(bool visible) OVERRIDE; |
63 virtual void Echo(const base::Closure& callback) OVERRIDE; | |
64 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; | 63 virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; |
65 | 64 |
66 private: | 65 private: |
67 bool Send(IPC::Message* msg); | 66 bool Send(IPC::Message* msg); |
68 void UpdateState(const gpu::CommandBuffer::State& state, bool success); | 67 void UpdateState(const gpu::CommandBuffer::State& state, bool success); |
69 | 68 |
70 // Try to read an updated copy of the state from shared memory. | 69 // Try to read an updated copy of the state from shared memory. |
71 void TryUpdateState(); | 70 void TryUpdateState(); |
72 | 71 |
73 // The shared memory area used to update state. | 72 // The shared memory area used to update state. |
74 gpu::CommandBufferSharedState* shared_state() const; | 73 gpu::CommandBufferSharedState* shared_state() const; |
75 | 74 |
76 State last_state_; | 75 State last_state_; |
77 scoped_ptr<base::SharedMemory> shared_state_shm_; | 76 scoped_ptr<base::SharedMemory> shared_state_shm_; |
78 | 77 |
79 HostResource resource_; | 78 HostResource resource_; |
80 ProxyChannel* channel_; | 79 ProxyChannel* channel_; |
81 | 80 |
82 base::Closure channel_error_callback_; | 81 base::Closure channel_error_callback_; |
83 | 82 |
84 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); | 83 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); |
85 }; | 84 }; |
86 | 85 |
87 } // namespace proxy | 86 } // namespace proxy |
88 } // namespace ppapi | 87 } // namespace ppapi |
89 | 88 |
90 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ | 89 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ |
OLD | NEW |