| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
| 34 #include "ui/surface/accelerated_surface_mac.h" | 34 #include "ui/surface/accelerated_surface_mac.h" |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 class GpuChannel; | 37 class GpuChannel; |
| 38 struct GpuMemoryAllocation; | 38 struct GpuMemoryAllocation; |
| 39 class GpuWatchdog; | 39 class GpuWatchdog; |
| 40 | 40 |
| 41 namespace gpu { | 41 namespace gpu { |
| 42 namespace gles2 { | 42 namespace gles2 { |
| 43 class ProgramCache; |
| 43 class MailboxManager; | 44 class MailboxManager; |
| 44 } | 45 } |
| 45 } | 46 } |
| 46 | 47 |
| 47 // This Base class is used to expose methods of GpuCommandBufferStub used for | 48 // This Base class is used to expose methods of GpuCommandBufferStub used for |
| 48 // testability. | 49 // testability. |
| 49 class CONTENT_EXPORT GpuCommandBufferStubBase { | 50 class CONTENT_EXPORT GpuCommandBufferStubBase { |
| 50 public: | 51 public: |
| 51 struct CONTENT_EXPORT SurfaceState { | 52 struct CONTENT_EXPORT SurfaceState { |
| 52 int32 surface_id; | 53 int32 surface_id; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 const gfx::GLSurfaceHandle& handle, | 96 const gfx::GLSurfaceHandle& handle, |
| 96 gpu::gles2::MailboxManager* mailbox_manager, | 97 gpu::gles2::MailboxManager* mailbox_manager, |
| 97 const gfx::Size& size, | 98 const gfx::Size& size, |
| 98 const gpu::gles2::DisallowedFeatures& disallowed_features, | 99 const gpu::gles2::DisallowedFeatures& disallowed_features, |
| 99 const std::string& allowed_extensions, | 100 const std::string& allowed_extensions, |
| 100 const std::vector<int32>& attribs, | 101 const std::vector<int32>& attribs, |
| 101 gfx::GpuPreference gpu_preference, | 102 gfx::GpuPreference gpu_preference, |
| 102 int32 route_id, | 103 int32 route_id, |
| 103 int32 surface_id, | 104 int32 surface_id, |
| 104 GpuWatchdog* watchdog, | 105 GpuWatchdog* watchdog, |
| 105 bool software); | 106 bool software, |
| 107 gpu::gles2::ProgramCache* program_cache); |
| 106 | 108 |
| 107 virtual ~GpuCommandBufferStub(); | 109 virtual ~GpuCommandBufferStub(); |
| 108 | 110 |
| 109 // IPC::Channel::Listener implementation: | 111 // IPC::Channel::Listener implementation: |
| 110 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 112 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 111 | 113 |
| 112 // IPC::Message::Sender implementation: | 114 // IPC::Message::Sender implementation: |
| 113 virtual bool Send(IPC::Message* msg) OVERRIDE; | 115 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 114 | 116 |
| 115 // GpuCommandBufferStubBase implementation: | 117 // GpuCommandBufferStubBase implementation: |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // A queue of sync points associated with this stub. | 273 // A queue of sync points associated with this stub. |
| 272 std::deque<uint32> sync_points_; | 274 std::deque<uint32> sync_points_; |
| 273 int sync_point_wait_count_; | 275 int sync_point_wait_count_; |
| 274 | 276 |
| 275 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_; | 277 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_; |
| 276 | 278 |
| 277 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 279 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 278 }; | 280 }; |
| 279 | 281 |
| 280 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 282 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |