| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ | 5 #ifndef COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ |
| 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ | 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
| 16 #include "base/threading/non_thread_safe.h" | 16 #include "base/threading/non_thread_safe.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "gpu/command_buffer/common/capabilities.h" | 18 #include "gpu/command_buffer/common/capabilities.h" |
| 19 #include "gpu/command_buffer/common/command_buffer.h" | 19 #include "gpu/command_buffer/common/command_buffer.h" |
| 20 #include "gpu/command_buffer/common/command_buffer_id.h" | 20 #include "gpu/command_buffer/common/command_buffer_id.h" |
| 21 #include "gpu/command_buffer/common/constants.h" | 21 #include "gpu/command_buffer/common/constants.h" |
| 22 #include "mojo/public/cpp/bindings/array.h" | 22 #include "mojo/public/cpp/bindings/array.h" |
| 23 #include "mojo/public/cpp/system/buffer.h" | 23 #include "mojo/public/cpp/system/buffer.h" |
| 24 #include "ui/gfx/buffer_types.h" | 24 #include "ui/gfx/buffer_types.h" |
| 25 #include "ui/gfx/geometry/mojo/geometry.mojom.h" | 25 #include "ui/gfx/geometry/mojo/geometry.mojom.h" |
| 26 #include "ui/gfx/geometry/size.h" | 26 #include "ui/gfx/geometry/size.h" |
| 27 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
| 28 #include "ui/gfx/swap_result.h" | 28 #include "ui/gfx/swap_result.h" |
| 29 | 29 |
| 30 namespace gfx { | 30 namespace gl { |
| 31 class GLContext; | 31 class GLContext; |
| 32 class GLSurface; | 32 class GLSurface; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace gpu { | 35 namespace gpu { |
| 36 class CommandBufferService; | 36 class CommandBufferService; |
| 37 class CommandExecutor; | 37 class CommandExecutor; |
| 38 class SyncPointClient; | 38 class SyncPointClient; |
| 39 class SyncPointOrderData; | 39 class SyncPointOrderData; |
| 40 | 40 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 const gpu::CommandBufferNamespace command_buffer_namespace_; | 143 const gpu::CommandBufferNamespace command_buffer_namespace_; |
| 144 const gpu::CommandBufferId command_buffer_id_; | 144 const gpu::CommandBufferId command_buffer_id_; |
| 145 gfx::AcceleratedWidget widget_; | 145 gfx::AcceleratedWidget widget_; |
| 146 Client* client_; // NOT OWNED. | 146 Client* client_; // NOT OWNED. |
| 147 std::unique_ptr<gpu::CommandBufferService> command_buffer_; | 147 std::unique_ptr<gpu::CommandBufferService> command_buffer_; |
| 148 std::unique_ptr<gpu::gles2::GLES2Decoder> decoder_; | 148 std::unique_ptr<gpu::gles2::GLES2Decoder> decoder_; |
| 149 std::unique_ptr<gpu::CommandExecutor> executor_; | 149 std::unique_ptr<gpu::CommandExecutor> executor_; |
| 150 scoped_refptr<gpu::SyncPointOrderData> sync_point_order_data_; | 150 scoped_refptr<gpu::SyncPointOrderData> sync_point_order_data_; |
| 151 std::unique_ptr<gpu::SyncPointClient> sync_point_client_; | 151 std::unique_ptr<gpu::SyncPointClient> sync_point_client_; |
| 152 scoped_refptr<gfx::GLContext> context_; | 152 scoped_refptr<gl::GLContext> context_; |
| 153 scoped_refptr<gfx::GLSurface> surface_; | 153 scoped_refptr<gl::GLSurface> surface_; |
| 154 scoped_refptr<GpuState> gpu_state_; | 154 scoped_refptr<GpuState> gpu_state_; |
| 155 | 155 |
| 156 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_; | 156 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_; |
| 157 base::Callback<void(int32_t)> context_lost_callback_; | 157 base::Callback<void(int32_t)> context_lost_callback_; |
| 158 | 158 |
| 159 base::TimeTicks process_delayed_work_time_; | 159 base::TimeTicks process_delayed_work_time_; |
| 160 uint32_t previous_processed_num_; | 160 uint32_t previous_processed_num_; |
| 161 base::TimeTicks last_idle_time_; | 161 base::TimeTicks last_idle_time_; |
| 162 | 162 |
| 163 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; | 163 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; |
| 164 | 164 |
| 165 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); | 165 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace mus | 168 } // namespace mus |
| 169 | 169 |
| 170 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ | 170 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ |
| OLD | NEW |