| 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 GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| 6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 size_t width, | 94 size_t width, |
| 95 size_t height, | 95 size_t height, |
| 96 unsigned internal_format) override; | 96 unsigned internal_format) override; |
| 97 void DestroyImage(int32_t id) override; | 97 void DestroyImage(int32_t id) override; |
| 98 int32_t CreateGpuMemoryBufferImage(size_t width, | 98 int32_t CreateGpuMemoryBufferImage(size_t width, |
| 99 size_t height, | 99 size_t height, |
| 100 unsigned internal_format, | 100 unsigned internal_format, |
| 101 unsigned usage) override; | 101 unsigned usage) override; |
| 102 void SignalQuery(uint32_t query, const base::Closure& callback) override; | 102 void SignalQuery(uint32_t query, const base::Closure& callback) override; |
| 103 void SetLock(base::Lock* lock) override; | 103 void SetLock(base::Lock* lock) override; |
| 104 bool IsGpuChannelLost() override; |
| 104 void EnsureWorkVisible() override; | 105 void EnsureWorkVisible() override; |
| 105 gpu::CommandBufferNamespace GetNamespaceID() const override; | 106 gpu::CommandBufferNamespace GetNamespaceID() const override; |
| 106 gpu::CommandBufferId GetCommandBufferID() const override; | 107 gpu::CommandBufferId GetCommandBufferID() const override; |
| 107 int32_t GetExtraCommandBufferData() const override; | 108 int32_t GetExtraCommandBufferData() const override; |
| 108 uint64_t GenerateFenceSyncRelease() override; | 109 uint64_t GenerateFenceSyncRelease() override; |
| 109 bool IsFenceSyncRelease(uint64_t release) override; | 110 bool IsFenceSyncRelease(uint64_t release) override; |
| 110 bool IsFenceSyncFlushed(uint64_t release) override; | 111 bool IsFenceSyncFlushed(uint64_t release) override; |
| 111 bool IsFenceSyncFlushReceived(uint64_t release) override; | 112 bool IsFenceSyncFlushReceived(uint64_t release) override; |
| 112 void SignalSyncToken(const gpu::SyncToken& sync_token, | 113 void SignalSyncToken(const gpu::SyncToken& sync_token, |
| 113 const base::Closure& callback) override; | 114 const base::Closure& callback) override; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // Loses the context after we received an invalid message from the GPU | 186 // Loses the context after we received an invalid message from the GPU |
| 186 // process. Will call the lost context callback reentrantly if any. | 187 // process. Will call the lost context callback reentrantly if any. |
| 187 void InvalidGpuMessage(); | 188 void InvalidGpuMessage(); |
| 188 | 189 |
| 189 // Loses the context after we received an invalid reply from the GPU | 190 // Loses the context after we received an invalid reply from the GPU |
| 190 // process. Will post a task to call the lost context callback if any. | 191 // process. Will post a task to call the lost context callback if any. |
| 191 void InvalidGpuReply(); | 192 void InvalidGpuReply(); |
| 192 | 193 |
| 193 void InvalidGpuReplyOnClientThread(); | 194 void InvalidGpuReplyOnClientThread(); |
| 194 | 195 |
| 195 // Mark the command buffer as lost and destroy internals. Use this variant | |
| 196 // when acting on call stacks of messages from the GPU process. | |
| 197 void OnLostContextNoReentrancy(gpu::error::ContextLostReason reason, | |
| 198 gpu::error::Error error); | |
| 199 | |
| 200 // Mark the command buffer as lost and destroy internals. Use this variant | |
| 201 // when acting inside call stacks from clients, as we don't want to re-enter | |
| 202 // them. | |
| 203 void OnLostContextAvoidReentrancy(gpu::error::ContextLostReason reason, | |
| 204 gpu::error::Error error); | |
| 205 | |
| 206 // Helper methods, don't call these directly. | |
| 207 void OnLostContextImplFromAvoidReentrancy(); | |
| 208 void OnLostContextImpl(); | |
| 209 | |
| 210 // The shared memory area used to update state. | 196 // The shared memory area used to update state. |
| 211 gpu::CommandBufferSharedState* shared_state() const; | 197 gpu::CommandBufferSharedState* shared_state() const; |
| 212 | 198 |
| 213 base::Lock* lock_; | 199 base::Lock* lock_; |
| 214 | 200 |
| 215 // Client that wants to listen for important events on the GpuControl. | 201 // Client that wants to listen for important events on the GpuControl. |
| 216 gpu::GpuControlClient* gpu_control_client_; | 202 gpu::GpuControlClient* gpu_control_client_; |
| 217 | 203 |
| 218 // Unowned list of DeletionObservers. | 204 // Unowned list of DeletionObservers. |
| 219 base::ObserverList<DeletionObserver> deletion_observers_; | 205 base::ObserverList<DeletionObserver> deletion_observers_; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 247 |
| 262 base::WeakPtr<CommandBufferProxyImpl> weak_this_; | 248 base::WeakPtr<CommandBufferProxyImpl> weak_this_; |
| 263 scoped_refptr<base::SequencedTaskRunner> callback_thread_; | 249 scoped_refptr<base::SequencedTaskRunner> callback_thread_; |
| 264 | 250 |
| 265 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 251 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
| 266 }; | 252 }; |
| 267 | 253 |
| 268 } // namespace gpu | 254 } // namespace gpu |
| 269 | 255 |
| 270 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 256 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| OLD | NEW |