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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 unsigned usage) override; | 59 unsigned usage) override; |
60 uint32 InsertSyncPoint() override; | 60 uint32 InsertSyncPoint() override; |
61 uint32 InsertFutureSyncPoint() override; | 61 uint32 InsertFutureSyncPoint() override; |
62 void RetireSyncPoint(uint32 sync_point) override; | 62 void RetireSyncPoint(uint32 sync_point) override; |
63 void SignalSyncPoint(uint32 sync_point, | 63 void SignalSyncPoint(uint32 sync_point, |
64 const base::Closure& callback) override; | 64 const base::Closure& callback) override; |
65 void SignalQuery(uint32 query, const base::Closure& callback) override; | 65 void SignalQuery(uint32 query, const base::Closure& callback) override; |
66 void SetSurfaceVisible(bool visible) override; | 66 void SetSurfaceVisible(bool visible) override; |
67 uint32 CreateStreamTexture(uint32 texture_id) override; | 67 uint32 CreateStreamTexture(uint32 texture_id) override; |
68 void SetLock(base::Lock*) override; | 68 void SetLock(base::Lock*) override; |
| 69 bool IsGpuChannelLost() override; |
69 | 70 |
70 private: | 71 private: |
71 bool Send(IPC::Message* msg); | 72 bool Send(IPC::Message* msg); |
72 void UpdateState(const gpu::CommandBuffer::State& state, bool success); | 73 void UpdateState(const gpu::CommandBuffer::State& state, bool success); |
73 | 74 |
74 // Try to read an updated copy of the state from shared memory. | 75 // Try to read an updated copy of the state from shared memory. |
75 void TryUpdateState(); | 76 void TryUpdateState(); |
76 | 77 |
77 // The shared memory area used to update state. | 78 // The shared memory area used to update state. |
78 gpu::CommandBufferSharedState* shared_state() const; | 79 gpu::CommandBufferSharedState* shared_state() const; |
79 | 80 |
80 gpu::Capabilities capabilities_; | 81 gpu::Capabilities capabilities_; |
81 State last_state_; | 82 State last_state_; |
82 scoped_ptr<base::SharedMemory> shared_state_shm_; | 83 scoped_ptr<base::SharedMemory> shared_state_shm_; |
83 | 84 |
84 HostResource resource_; | 85 HostResource resource_; |
85 PluginDispatcher* dispatcher_; | 86 PluginDispatcher* dispatcher_; |
86 | 87 |
87 base::Closure channel_error_callback_; | 88 base::Closure channel_error_callback_; |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); | 90 DISALLOW_COPY_AND_ASSIGN(PpapiCommandBufferProxy); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace proxy | 93 } // namespace proxy |
93 } // namespace ppapi | 94 } // namespace ppapi |
94 | 95 |
95 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ | 96 #endif // PPAPI_PROXY_COMMAND_BUFFER_PROXY_H_ |
OLD | NEW |