| 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_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 public: | 54 public: |
| 55 class DestructionObserver { | 55 class DestructionObserver { |
| 56 public: | 56 public: |
| 57 // Called in Destroy(), before the context/surface are released. | 57 // Called in Destroy(), before the context/surface are released. |
| 58 virtual void OnWillDestroyStub() = 0; | 58 virtual void OnWillDestroyStub() = 0; |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 virtual ~DestructionObserver() {} | 61 virtual ~DestructionObserver() {} |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 typedef base::Callback<void(const ui::LatencyInfo&)> | 64 typedef base::Callback<void(const std::vector<ui::LatencyInfo>&)> |
| 65 LatencyInfoCallback; | 65 LatencyInfoCallback; |
| 66 | 66 |
| 67 GpuCommandBufferStub( | 67 GpuCommandBufferStub( |
| 68 GpuChannel* channel, | 68 GpuChannel* channel, |
| 69 GpuCommandBufferStub* share_group, | 69 GpuCommandBufferStub* share_group, |
| 70 const gfx::GLSurfaceHandle& handle, | 70 const gfx::GLSurfaceHandle& handle, |
| 71 gpu::gles2::MailboxManager* mailbox_manager, | 71 gpu::gles2::MailboxManager* mailbox_manager, |
| 72 gpu::gles2::ImageManager* image_manager, | 72 gpu::gles2::ImageManager* image_manager, |
| 73 const gfx::Size& size, | 73 const gfx::Size& size, |
| 74 const gpu::gles2::DisallowedFeatures& disallowed_features, | 74 const gpu::gles2::DisallowedFeatures& disallowed_features, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 void OnRegisterGpuMemoryBuffer(int32 id, | 190 void OnRegisterGpuMemoryBuffer(int32 id, |
| 191 gfx::GpuMemoryBufferHandle gpu_memory_buffer, | 191 gfx::GpuMemoryBufferHandle gpu_memory_buffer, |
| 192 uint32 width, | 192 uint32 width, |
| 193 uint32 height, | 193 uint32 height, |
| 194 uint32 internalformat); | 194 uint32 internalformat); |
| 195 void OnDestroyGpuMemoryBuffer(int32 id); | 195 void OnDestroyGpuMemoryBuffer(int32 id); |
| 196 | 196 |
| 197 void OnCommandProcessed(); | 197 void OnCommandProcessed(); |
| 198 void OnParseError(); | 198 void OnParseError(); |
| 199 void OnSetLatencyInfo(const ui::LatencyInfo& latency_info); | 199 void OnSetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); |
| 200 | 200 |
| 201 void ReportState(); | 201 void ReportState(); |
| 202 | 202 |
| 203 // Wrapper for GpuScheduler::PutChanged that sets the crash report URL. | 203 // Wrapper for GpuScheduler::PutChanged that sets the crash report URL. |
| 204 void PutChanged(); | 204 void PutChanged(); |
| 205 | 205 |
| 206 // Poll the command buffer to execute work. | 206 // Poll the command buffer to execute work. |
| 207 void PollWork(); | 207 void PollWork(); |
| 208 | 208 |
| 209 // Whether this command buffer needs to be polled again in the future. | 209 // Whether this command buffer needs to be polled again in the future. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 size_t active_url_hash_; | 264 size_t active_url_hash_; |
| 265 | 265 |
| 266 size_t total_gpu_memory_; | 266 size_t total_gpu_memory_; |
| 267 | 267 |
| 268 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 268 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 269 }; | 269 }; |
| 270 | 270 |
| 271 } // namespace content | 271 } // namespace content |
| 272 | 272 |
| 273 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 273 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |