| 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> |
| 11 | 11 |
| 12 #include "base/id_map.h" | 12 #include "base/id_map.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "content/common/gpu/gpu_memory_allocation.h" | 16 #include "content/common/gpu/gpu_memory_allocation.h" |
| 17 #include "content/common/gpu/gpu_memory_allocation.h" | |
| 18 #include "gpu/command_buffer/common/constants.h" | 17 #include "gpu/command_buffer/common/constants.h" |
| 19 #include "gpu/command_buffer/service/command_buffer_service.h" | 18 #include "gpu/command_buffer/service/command_buffer_service.h" |
| 20 #include "gpu/command_buffer/service/context_group.h" | 19 #include "gpu/command_buffer/service/context_group.h" |
| 21 #include "gpu/command_buffer/service/gpu_scheduler.h" | 20 #include "gpu/command_buffer/service/gpu_scheduler.h" |
| 22 #include "ipc/ipc_listener.h" | 21 #include "ipc/ipc_listener.h" |
| 23 #include "ipc/ipc_sender.h" | 22 #include "ipc/ipc_sender.h" |
| 24 #include "media/base/video_decoder_config.h" | 23 #include "media/base/video_decoder_config.h" |
| 25 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
| 26 #include "ui/gfx/size.h" | 25 #include "ui/gfx/size.h" |
| 27 #include "ui/gl/gl_context.h" | 26 #include "ui/gl/gl_context.h" |
| 28 #include "ui/gl/gl_surface.h" | 27 #include "ui/gl/gl_surface.h" |
| 29 #include "ui/gl/gpu_preference.h" | 28 #include "ui/gl/gpu_preference.h" |
| 30 #include "ui/surface/transport_dib.h" | 29 #include "ui/surface/transport_dib.h" |
| 31 | 30 |
| 32 #if defined(OS_MACOSX) | 31 #if defined(OS_MACOSX) |
| 33 #include "ui/surface/accelerated_surface_mac.h" | 32 #include "ui/surface/accelerated_surface_mac.h" |
| 34 #endif | 33 #endif |
| 35 | 34 |
| 36 class GpuChannel; | 35 class GpuChannel; |
| 37 struct GpuMemoryAllocation; | 36 struct GpuMemoryAllocation; |
| 38 class GpuVideoDecodeAccelerator; | 37 class GpuVideoDecodeAccelerator; |
| 39 class GpuWatchdog; | 38 class GpuWatchdog; |
| 40 | 39 |
| 41 namespace gpu { | 40 namespace gpu { |
| 42 namespace gles2 { | 41 namespace gles2 { |
| 42 class ProgramCache; |
| 43 class MailboxManager; | 43 class MailboxManager; |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 // This Base class is used to expose methods of GpuCommandBufferStub used for | 47 // This Base class is used to expose methods of GpuCommandBufferStub used for |
| 48 // testability. | 48 // testability. |
| 49 class CONTENT_EXPORT GpuCommandBufferStubBase { | 49 class CONTENT_EXPORT GpuCommandBufferStubBase { |
| 50 public: | 50 public: |
| 51 struct CONTENT_EXPORT SurfaceState { | 51 struct CONTENT_EXPORT SurfaceState { |
| 52 int32 surface_id; | 52 int32 surface_id; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 const gfx::GLSurfaceHandle& handle, | 96 const gfx::GLSurfaceHandle& handle, |
| 97 gpu::gles2::MailboxManager* mailbox_manager, | 97 gpu::gles2::MailboxManager* mailbox_manager, |
| 98 const gfx::Size& size, | 98 const gfx::Size& size, |
| 99 const gpu::gles2::DisallowedFeatures& disallowed_features, | 99 const gpu::gles2::DisallowedFeatures& disallowed_features, |
| 100 const std::string& allowed_extensions, | 100 const std::string& allowed_extensions, |
| 101 const std::vector<int32>& attribs, | 101 const std::vector<int32>& attribs, |
| 102 gfx::GpuPreference gpu_preference, | 102 gfx::GpuPreference gpu_preference, |
| 103 int32 route_id, | 103 int32 route_id, |
| 104 int32 surface_id, | 104 int32 surface_id, |
| 105 GpuWatchdog* watchdog, | 105 GpuWatchdog* watchdog, |
| 106 bool software); | 106 bool software, |
| 107 gpu::gles2::ProgramCache* program_cache); |
| 107 | 108 |
| 108 virtual ~GpuCommandBufferStub(); | 109 virtual ~GpuCommandBufferStub(); |
| 109 | 110 |
| 110 // IPC::Listener implementation: | 111 // IPC::Listener implementation: |
| 111 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 112 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 112 | 113 |
| 113 // IPC::Sender implementation: | 114 // IPC::Sender implementation: |
| 114 virtual bool Send(IPC::Message* msg) OVERRIDE; | 115 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 115 | 116 |
| 116 // GpuCommandBufferStubBase implementation: | 117 // GpuCommandBufferStubBase implementation: |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 int sync_point_wait_count_; | 277 int sync_point_wait_count_; |
| 277 | 278 |
| 278 bool delayed_work_scheduled_; | 279 bool delayed_work_scheduled_; |
| 279 | 280 |
| 280 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_; | 281 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_; |
| 281 | 282 |
| 282 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 283 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 283 }; | 284 }; |
| 284 | 285 |
| 285 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 286 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |