| 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 CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "gpu/ipc/command_buffer_proxy.h" | 12 #include "gpu/ipc/command_buffer_proxy.h" |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/hash_tables.h" | 16 #include "base/hash_tables.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "cc/debug/latency_info.h" |
| 19 #include "content/common/gpu/gpu_memory_allocation.h" | 20 #include "content/common/gpu/gpu_memory_allocation.h" |
| 20 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" | 21 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" |
| 21 #include "content/common/gpu/gpu_memory_allocation.h" | 22 #include "content/common/gpu/gpu_memory_allocation.h" |
| 22 #include "gpu/command_buffer/common/command_buffer.h" | 23 #include "gpu/command_buffer/common/command_buffer.h" |
| 23 #include "gpu/command_buffer/common/command_buffer_shared.h" | 24 #include "gpu/command_buffer/common/command_buffer_shared.h" |
| 24 #include "ipc/ipc_listener.h" | 25 #include "ipc/ipc_listener.h" |
| 25 | 26 |
| 26 struct GPUCommandBufferConsoleMessage; | 27 struct GPUCommandBufferConsoleMessage; |
| 27 | 28 |
| 28 namespace base { | 29 namespace base { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // handled only on the GPU process' IO thread, and so is not effectively | 107 // handled only on the GPU process' IO thread, and so is not effectively |
| 107 // a finish. | 108 // a finish. |
| 108 bool GenerateMailboxNames(unsigned num, std::vector<gpu::Mailbox>* names); | 109 bool GenerateMailboxNames(unsigned num, std::vector<gpu::Mailbox>* names); |
| 109 | 110 |
| 110 // Sends an IPC message with the new state of surface visibility. | 111 // Sends an IPC message with the new state of surface visibility. |
| 111 bool SetSurfaceVisible(bool visible); | 112 bool SetSurfaceVisible(bool visible); |
| 112 | 113 |
| 113 void SetOnConsoleMessageCallback( | 114 void SetOnConsoleMessageCallback( |
| 114 const GpuConsoleMessageCallback& callback); | 115 const GpuConsoleMessageCallback& callback); |
| 115 | 116 |
| 117 void SetLatencyInfo(const cc::LatencyInfo& latency_info); |
| 118 |
| 116 // TODO(apatrick): this is a temporary optimization while skia is calling | 119 // TODO(apatrick): this is a temporary optimization while skia is calling |
| 117 // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6 | 120 // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6 |
| 118 // ints redundantly when only the error is needed for the | 121 // ints redundantly when only the error is needed for the |
| 119 // CommandBufferProxyImpl implementation. | 122 // CommandBufferProxyImpl implementation. |
| 120 virtual gpu::error::Error GetLastError() OVERRIDE; | 123 virtual gpu::error::Error GetLastError() OVERRIDE; |
| 121 | 124 |
| 122 void SendManagedMemoryStats(const GpuManagedMemoryStats& stats); | 125 void SendManagedMemoryStats(const GpuManagedMemoryStats& stats); |
| 123 | 126 |
| 124 GpuChannelHost* channel() const { return channel_; } | 127 GpuChannelHost* channel() const { return channel_; } |
| 125 | 128 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // Tasks to be invoked in SignalSyncPoint responses. | 187 // Tasks to be invoked in SignalSyncPoint responses. |
| 185 uint32 next_signal_id_; | 188 uint32 next_signal_id_; |
| 186 SignalTaskMap signal_tasks_; | 189 SignalTaskMap signal_tasks_; |
| 187 | 190 |
| 188 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 191 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
| 189 }; | 192 }; |
| 190 | 193 |
| 191 } // namespace content | 194 } // namespace content |
| 192 | 195 |
| 193 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 196 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| OLD | NEW |