| 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_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 struct Mailbox; | 40 struct Mailbox; |
| 41 struct SyncToken; | 41 struct SyncToken; |
| 42 class SyncPointClient; | 42 class SyncPointClient; |
| 43 class SyncPointManager; | 43 class SyncPointManager; |
| 44 namespace gles2 { | 44 namespace gles2 { |
| 45 class MailboxManager; | 45 class MailboxManager; |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 | 48 |
| 49 struct GpuCommandBufferMsg_CreateImage_Params; | 49 struct GpuCommandBufferMsg_CreateImage_Params; |
| 50 struct GpuCommandBufferMsg_SwapBuffersCompleted_Params; |
| 50 | 51 |
| 51 namespace gpu { | 52 namespace gpu { |
| 52 | 53 |
| 53 class GpuChannel; | 54 class GpuChannel; |
| 54 class GpuWatchdog; | 55 class GpuWatchdog; |
| 55 struct WaitForCommandState; | 56 struct WaitForCommandState; |
| 56 | 57 |
| 57 class GPU_EXPORT GpuCommandBufferStub | 58 class GPU_EXPORT GpuCommandBufferStub |
| 58 : public IPC::Listener, | 59 : public IPC::Listener, |
| 59 public IPC::Sender, | 60 public IPC::Sender, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 void AddDestructionObserver(DestructionObserver* observer); | 133 void AddDestructionObserver(DestructionObserver* observer); |
| 133 void RemoveDestructionObserver(DestructionObserver* observer); | 134 void RemoveDestructionObserver(DestructionObserver* observer); |
| 134 | 135 |
| 135 void SetLatencyInfoCallback(const LatencyInfoCallback& callback); | 136 void SetLatencyInfoCallback(const LatencyInfoCallback& callback); |
| 136 | 137 |
| 137 void MarkContextLost(); | 138 void MarkContextLost(); |
| 138 | 139 |
| 139 const gles2::FeatureInfo* GetFeatureInfo() const; | 140 const gles2::FeatureInfo* GetFeatureInfo() const; |
| 140 | 141 |
| 141 void SendSwapBuffersCompleted( | 142 void SendSwapBuffersCompleted( |
| 142 const std::vector<ui::LatencyInfo>& latency_info, | 143 const GpuCommandBufferMsg_SwapBuffersCompleted_Params& params); |
| 143 gfx::SwapResult result); | |
| 144 void SendUpdateVSyncParameters(base::TimeTicks timebase, | 144 void SendUpdateVSyncParameters(base::TimeTicks timebase, |
| 145 base::TimeDelta interval); | 145 base::TimeDelta interval); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 GpuMemoryManager* GetMemoryManager() const; | 148 GpuMemoryManager* GetMemoryManager() const; |
| 149 | 149 |
| 150 void Destroy(); | 150 void Destroy(); |
| 151 | 151 |
| 152 bool MakeCurrent(); | 152 bool MakeCurrent(); |
| 153 | 153 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 uint64_t release); | 192 uint64_t release); |
| 193 void OnWaitFenceSyncCompleted(CommandBufferNamespace namespace_id, | 193 void OnWaitFenceSyncCompleted(CommandBufferNamespace namespace_id, |
| 194 CommandBufferId command_buffer_id, | 194 CommandBufferId command_buffer_id, |
| 195 uint64_t release); | 195 uint64_t release); |
| 196 | 196 |
| 197 void OnCreateImage(const GpuCommandBufferMsg_CreateImage_Params& params); | 197 void OnCreateImage(const GpuCommandBufferMsg_CreateImage_Params& params); |
| 198 void OnDestroyImage(int32_t id); | 198 void OnDestroyImage(int32_t id); |
| 199 void OnCreateStreamTexture(uint32_t texture_id, | 199 void OnCreateStreamTexture(uint32_t texture_id, |
| 200 int32_t stream_id, | 200 int32_t stream_id, |
| 201 bool* succeeded); | 201 bool* succeeded); |
| 202 | |
| 203 void OnCommandProcessed(); | 202 void OnCommandProcessed(); |
| 204 void OnParseError(); | 203 void OnParseError(); |
| 205 | 204 |
| 206 void ReportState(); | 205 void ReportState(); |
| 207 | 206 |
| 208 // Wrapper for CommandExecutor::PutChanged that sets the crash report URL. | 207 // Wrapper for CommandExecutor::PutChanged that sets the crash report URL. |
| 209 void PutChanged(); | 208 void PutChanged(); |
| 210 | 209 |
| 211 // Poll the command buffer to execute work. | 210 // Poll the command buffer to execute work. |
| 212 void PollWork(); | 211 void PollWork(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 275 |
| 277 std::unique_ptr<WaitForCommandState> wait_for_token_; | 276 std::unique_ptr<WaitForCommandState> wait_for_token_; |
| 278 std::unique_ptr<WaitForCommandState> wait_for_get_offset_; | 277 std::unique_ptr<WaitForCommandState> wait_for_get_offset_; |
| 279 | 278 |
| 280 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 279 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 281 }; | 280 }; |
| 282 | 281 |
| 283 } // namespace gpu | 282 } // namespace gpu |
| 284 | 283 |
| 285 #endif // GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ | 284 #endif // GPU_IPC_SERVICE_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |