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 "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
14 #include "components/mus/public/interfaces/command_buffer.mojom.h" | 14 #include "components/mus/public/interfaces/command_buffer.mojom.h" |
15 #include "gpu/command_buffer/common/constants.h" | 15 #include "gpu/command_buffer/common/constants.h" |
16 #include "ui/gfx/geometry/size.h" | 16 #include "ui/gfx/geometry/size.h" |
17 | 17 |
18 namespace gpu { | 18 namespace gpu { |
19 class CommandBufferService; | 19 class CommandBufferService; |
20 class GpuScheduler; | 20 class GpuScheduler; |
21 class GpuControlService; | 21 class GpuControlService; |
22 class SyncPointClient; | |
23 class SyncPointOrderData; | |
22 namespace gles2 { | 24 namespace gles2 { |
23 class GLES2Decoder; | 25 class GLES2Decoder; |
24 } | 26 } |
25 } | 27 } |
26 | 28 |
27 namespace gfx { | 29 namespace gfx { |
28 class GLContext; | 30 class GLContext; |
29 class GLSurface; | 31 class GLSurface; |
30 } | 32 } |
31 | 33 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 bool OnWaitSyncPoint(uint32_t sync_point); | 80 bool OnWaitSyncPoint(uint32_t sync_point); |
79 void OnFenceSyncRelease(uint64_t release); | 81 void OnFenceSyncRelease(uint64_t release); |
80 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, | 82 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, |
81 uint64_t command_buffer_id, | 83 uint64_t command_buffer_id, |
82 uint64_t release); | 84 uint64_t release); |
83 void OnSyncPointRetired(); | 85 void OnSyncPointRetired(); |
84 void OnParseError(); | 86 void OnParseError(); |
85 void OnContextLost(uint32_t reason); | 87 void OnContextLost(uint32_t reason); |
86 void DestroyDecoder(); | 88 void DestroyDecoder(); |
87 | 89 |
90 const uint64_t command_buffer_id_; | |
88 scoped_ptr<Client> client_; | 91 scoped_ptr<Client> client_; |
89 mojom::CommandBufferSyncClientPtr sync_client_; | 92 mojom::CommandBufferSyncClientPtr sync_client_; |
90 mojom::CommandBufferLostContextObserverPtr loss_observer_; | 93 mojom::CommandBufferLostContextObserverPtr loss_observer_; |
91 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 94 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
92 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 95 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
93 scoped_ptr<gpu::GpuScheduler> scheduler_; | 96 scoped_ptr<gpu::GpuScheduler> scheduler_; |
97 scoped_refptr<gpu::SyncPointOrderData> sync_point_order_data_; | |
David Yen
2015/11/20 00:47:14
This would make it depend on the other CL, but the
Peng
2015/11/20 20:32:15
Done.
| |
98 scoped_ptr<gpu::SyncPointClient> sync_point_client_; | |
94 scoped_refptr<gfx::GLContext> context_; | 99 scoped_refptr<gfx::GLContext> context_; |
95 scoped_refptr<gfx::GLSurface> surface_; | 100 scoped_refptr<gfx::GLSurface> surface_; |
96 scoped_refptr<GpuState> gpu_state_; | 101 scoped_refptr<GpuState> gpu_state_; |
97 | 102 |
98 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_; | 103 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_; |
99 base::Callback<void(int32_t)> context_lost_callback_; | 104 base::Callback<void(int32_t)> context_lost_callback_; |
100 | 105 |
101 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; | 106 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; |
102 | 107 |
103 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); | 108 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); |
104 }; | 109 }; |
105 | 110 |
106 } // namespace mus | 111 } // namespace mus |
107 | 112 |
108 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ | 113 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ |
OLD | NEW |