blob: a74500f6d6618e9af895a53dbc07aee960fbbcf7 [file] [log] [blame]
[email protected]92dd77772013-08-01 23:57:561// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
fsamuel600b99e2016-11-11 07:50:265#ifndef GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_
6#define GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_
[email protected]92dd77772013-08-01 23:57:567
avif15d60a2015-12-21 17:06:338#include <stddef.h>
9#include <stdint.h>
10
[email protected]01952a62014-05-02 05:22:0111#include <map>
mostynb6682b1c42016-04-19 10:17:3012#include <memory>
Jonathan Backer0cd1c4322018-04-17 16:57:1013#include <string>
[email protected]92dd77772013-08-01 23:57:5614#include <vector>
15
16#include "base/callback.h"
17#include "base/compiler_specific.h"
Brett Wilsona62d9c02017-09-20 20:53:2018#include "base/containers/queue.h"
avif15d60a2015-12-21 17:06:3319#include "base/macros.h"
kylechar2fdaa042018-07-03 17:36:2320#include "base/memory/scoped_refptr.h"
[email protected]3f0855c02013-10-09 07:56:2521#include "base/memory/weak_ptr.h"
danakj10057772016-04-12 19:35:4422#include "base/single_thread_task_runner.h"
[email protected]92dd77772013-08-01 23:57:5623#include "base/synchronization/lock.h"
24#include "base/synchronization/waitable_event.h"
[email protected]01952a62014-05-02 05:22:0125#include "gpu/command_buffer/client/gpu_control.h"
[email protected]92dd77772013-08-01 23:57:5626#include "gpu/command_buffer/common/command_buffer.h"
danakj45cfd232017-10-18 19:31:3127#include "gpu/command_buffer/common/context_result.h"
Antoine Labour293e93e2017-05-26 18:19:1128#include "gpu/command_buffer/service/command_buffer_service.h"
fsamueledc0c2c2016-11-18 22:28:0429#include "gpu/command_buffer/service/context_group.h"
Jonathan Backer1d807a42018-01-08 20:45:5430#include "gpu/command_buffer/service/decoder_client.h"
Jonathan Backer0cd1c4322018-04-17 16:57:1031#include "gpu/command_buffer/service/decoder_context.h"
Antoine Labour6bf942492017-06-14 00:33:4232#include "gpu/command_buffer/service/service_discardable_manager.h"
Eric Karl16711ec2017-11-18 00:58:1133#include "gpu/command_buffer/service/service_transfer_cache.h"
Zhenyao Mo56b32be2017-08-25 22:59:3034#include "gpu/config/gpu_feature_info.h"
Jonathan Backer0af509962018-05-30 16:05:0735#include "gpu/config/gpu_preferences.h"
Antoine Labourec6176b2018-01-05 00:00:1036#include "gpu/ipc/gl_in_process_context_export.h"
fsamueledc0c2c2016-11-18 22:28:0437#include "gpu/ipc/service/image_transport_surface_delegate.h"
reveman2232bce2014-10-29 01:28:0538#include "ui/gfx/gpu_memory_buffer.h"
[email protected]92dd77772013-08-01 23:57:5639#include "ui/gfx/native_widget_types.h"
[email protected]61724842013-08-07 09:46:0940#include "ui/gl/gl_surface.h"
[email protected]92dd77772013-08-01 23:57:5641#include "ui/gl/gpu_preference.h"
42
[email protected]61724842013-08-07 09:46:0943namespace base {
44class SequenceChecker;
45}
46
kylechar7a463842016-05-26 14:46:1247namespace gl {
[email protected]92dd77772013-08-01 23:57:5648class GLContext;
[email protected]ccb82022014-02-12 18:51:3349class GLShareGroup;
kylechar7a463842016-05-26 14:46:1250}
51
52namespace gfx {
Klaus Weidnere66cc7d2017-12-09 17:26:3053struct GpuFenceHandle;
[email protected]92dd77772013-08-01 23:57:5654class Size;
55}
56
57namespace gpu {
kylechar8e7c5e4d2017-12-04 23:43:1758class GpuChannelManagerDelegate;
kylechar2fdaa042018-07-03 17:36:2359class CommandBufferTaskExecutor;
reveman2232bce2014-10-29 01:28:0560class GpuMemoryBufferManager;
reveman2232bce2014-10-29 01:28:0561class ImageFactory;
kylechar2fdaa042018-07-03 17:36:2362class SyncPointClientState;
63class SyncPointOrderData;
Antoine Labourf43993b2017-05-16 19:59:3964class TransferBufferManager;
kylechar2fdaa042018-07-03 17:36:2365struct ContextCreationAttribs;
66struct SwapBuffersCompleteParams;
[email protected]92dd77772013-08-01 23:57:5667
68// This class provides a thread-safe interface to the global GPU service (for
69// example GPU thread) when being run in single process mode.
70// However, the behavior for accessing one context (i.e. one instance of this
71// class) from different client threads is undefined.
Antoine Labourec6176b2018-01-05 00:00:1072class GL_IN_PROCESS_CONTEXT_EXPORT InProcessCommandBuffer
73 : public CommandBuffer,
74 public GpuControl,
75 public CommandBufferServiceClient,
Jonathan Backer1d807a42018-01-08 20:45:5476 public DecoderClient,
Antoine Labourec6176b2018-01-05 00:00:1077 public ImageTransportSurfaceDelegate {
[email protected]92dd77772013-08-01 23:57:5678 public:
kylechar2fdaa042018-07-03 17:36:2379 explicit InProcessCommandBuffer(
80 scoped_refptr<CommandBufferTaskExecutor> task_executer);
dcheng1f4d1d72014-10-21 16:21:5881 ~InProcessCommandBuffer() override;
[email protected]92dd77772013-08-01 23:57:5682
danakj07925222016-04-07 21:19:2783 // If |surface| is not null, use it directly; in this case, the command
[email protected]61724842013-08-07 09:46:0984 // buffer gpu thread must be the same as the client thread. Otherwise create
85 // a new GLSurface.
kylechar8e7c5e4d2017-12-04 23:43:1786 // |gpu_channel_manager_delegate| should be non-null when the command buffer
87 // is used in the GPU process for compositor to gpu thread communication.
danakj45cfd232017-10-18 19:31:3188 gpu::ContextResult Initialize(
89 scoped_refptr<gl::GLSurface> surface,
90 bool is_offscreen,
91 SurfaceHandle window,
Antoine Labourfeab2392017-12-21 20:28:3992 const ContextCreationAttribs& attribs,
danakj45cfd232017-10-18 19:31:3193 InProcessCommandBuffer* share_group,
94 GpuMemoryBufferManager* gpu_memory_buffer_manager,
95 ImageFactory* image_factory,
kylechar8e7c5e4d2017-12-04 23:43:1796 GpuChannelManagerDelegate* gpu_channel_manager_delegate,
danakj45cfd232017-10-18 19:31:3197 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
[email protected]92dd77772013-08-01 23:57:5698
99 // CommandBuffer implementation:
dcheng1f4d1d72014-10-21 16:21:58100 State GetLastState() override;
avif15d60a2015-12-21 17:06:33101 void Flush(int32_t put_offset) override;
102 void OrderingBarrier(int32_t put_offset) override;
sunnyps128566052016-12-09 21:06:43103 State WaitForTokenInRange(int32_t start, int32_t end) override;
Antoine Labourd3469942017-05-16 21:23:42104 State WaitForGetOffsetInRange(uint32_t set_get_buffer_count,
105 int32_t start,
106 int32_t end) override;
avif15d60a2015-12-21 17:06:33107 void SetGetBuffer(int32_t shm_id) override;
Chandan Padhi07f05c02017-09-19 02:52:53108 scoped_refptr<Buffer> CreateTransferBuffer(size_t size, int32_t* id) override;
avif15d60a2015-12-21 17:06:33109 void DestroyTransferBuffer(int32_t id) override;
[email protected]92dd77772013-08-01 23:57:56110
[email protected]bac37fd32013-08-16 17:31:00111 // GpuControl implementation:
danakj10057772016-04-12 19:35:44112 // NOTE: The GpuControlClient will be called on the client thread.
113 void SetGpuControlClient(GpuControlClient*) override;
Zhenyao Moeb86a1712017-10-06 14:17:52114 const Capabilities& GetCapabilities() const override;
avif15d60a2015-12-21 17:06:33115 int32_t CreateImage(ClientBuffer buffer,
116 size_t width,
117 size_t height,
118 unsigned internalformat) override;
119 void DestroyImage(int32_t id) override;
Jonathan Backerbd345c1f2018-02-14 21:44:23120 void SignalQuery(uint32_t query_id, base::OnceClosure callback) override;
Klaus Weidnere66cc7d2017-12-09 17:26:30121 void CreateGpuFence(uint32_t gpu_fence_id, ClientGpuFence source) override;
122 void GetGpuFence(uint32_t gpu_fence_id,
123 base::OnceCallback<void(std::unique_ptr<gfx::GpuFence>)>
124 callback) override;
jbauman6875d4e02015-02-12 00:44:59125 void SetLock(base::Lock*) override;
dyen293de3c2016-01-05 02:08:05126 void EnsureWorkVisible() override;
dyen12e45962015-09-18 00:13:51127 CommandBufferNamespace GetNamespaceID() const override;
lukasza2573ce7d2016-02-16 19:17:22128 CommandBufferId GetCommandBufferID() const override;
Sunny Sachanandani9b8fb342017-08-26 00:49:56129 void FlushPendingWork() override;
dyen5c38a032015-10-07 18:58:31130 uint64_t GenerateFenceSyncRelease() override;
sunnyps128566052016-12-09 21:06:43131 bool IsFenceSyncReleased(uint64_t release) override;
dyen6f3b439c2015-10-22 20:17:23132 void SignalSyncToken(const SyncToken& sync_token,
Jonathan Backerbd345c1f2018-02-14 21:44:23133 base::OnceClosure callback) override;
sunnyps74996292017-03-15 02:35:48134 void WaitSyncTokenHint(const SyncToken& sync_token) override;
135 bool CanWaitUnverifiedSyncToken(const SyncToken& sync_token) override;
[email protected]bac37fd32013-08-16 17:31:00136
Antoine Labour293e93e2017-05-26 18:19:11137 // CommandBufferServiceClient implementation:
138 CommandBatchProcessedResult OnCommandBatchProcessed() override;
139 void OnParseError() override;
140
Jonathan Backer1d807a42018-01-08 20:45:54141 // DecoderClient implementation:
Antoine Labourf679fa42017-06-07 00:32:43142 void OnConsoleMessage(int32_t id, const std::string& message) override;
143 void CacheShader(const std::string& key, const std::string& shader) override;
144 void OnFenceSyncRelease(uint64_t release) override;
145 bool OnWaitSyncToken(const SyncToken& sync_token) override;
146 void OnDescheduleUntilFinished() override;
147 void OnRescheduleAfterFinished() override;
Eric Karlb6b2c632018-05-07 22:45:04148 void OnSwapBuffers(uint64_t swap_id, uint32_t flags) override;
Antoine Labourf679fa42017-06-07 00:32:43149
fsamueledc0c2c2016-11-18 22:28:04150// ImageTransportSurfaceDelegate implementation:
151#if defined(OS_WIN)
152 void DidCreateAcceleratedSurfaceChildWindow(
153 SurfaceHandle parent_window,
154 SurfaceHandle child_window) override;
155#endif
156 void DidSwapBuffersComplete(SwapBuffersCompleteParams params) override;
157 const gles2::FeatureInfo* GetFeatureInfo() const override;
John Bauman39210ea2017-07-27 23:11:55158 const GpuPreferences& GetGpuPreferences() const override;
Brian Andersonfeaa47c2017-11-17 23:40:21159
Eric Karlb6b2c632018-05-07 22:45:04160 void BufferPresented(const gfx::PresentationFeedback& feedback) override;
fsamueledc0c2c2016-11-18 22:28:04161
stanisceed2187b2017-02-15 19:56:05162 void AddFilter(IPC::MessageFilter* message_filter) override;
163 int32_t GetRouteID() const override;
164
Zhenyao Mo04ea0f02017-10-12 01:15:54165 // Upstream this function to GpuControl if needs arise.
166 const GpuFeatureInfo& GetGpuFeatureInfo() const;
167
fsamueledc0c2c2016-11-18 22:28:04168 using UpdateVSyncParametersCallback =
169 base::Callback<void(base::TimeTicks timebase, base::TimeDelta interval)>;
170 void SetUpdateVSyncParametersCallback(
171 const UpdateVSyncParametersCallback& callback);
172
fsamuel58b5a222016-11-23 23:50:24173 void DidSwapBuffersCompleteOnOriginThread(SwapBuffersCompleteParams params);
Peng Huang6bf92772017-11-30 18:57:08174 void BufferPresentedOnOriginThread(uint64_t swap_id,
Eric Karlb6b2c632018-05-07 22:45:04175 uint32_t flags,
Peng Huang6bf92772017-11-30 18:57:08176 const gfx::PresentationFeedback& feedback);
fsamuel58b5a222016-11-23 23:50:24177
Zhenyao Mo56b32be2017-08-25 22:59:30178 // Mostly the GpuFeatureInfo from GpuInit will be used to create a gpu thread
179 // service. In certain tests GpuInit is not part of the execution path, so
180 // the test suite need to compute it and pass it to the default service.
181 // See "gpu/ipc/in_process_command_buffer.cc".
182 static void InitializeDefaultServiceForTesting(
183 const GpuFeatureInfo& gpu_feature_info);
184
Jonathan Backer862b08d2018-05-10 15:37:04185 gpu::ServiceTransferCache* GetTransferCacheForTest() const;
Eric Karl16711ec2017-11-18 00:58:11186
Sadrul Habib Chowdhury7102df0b2018-05-30 03:04:17187 static const int kGpuClientId;
Christopher Cameron9656d1f2018-01-28 09:23:19188
kylechar2fdaa042018-07-03 17:36:23189 CommandBufferTaskExecutor* service_for_testing() const {
190 return task_executor_.get();
191 }
Khushaldb6ea3c2018-05-31 00:53:09192
[email protected]92dd77772013-08-01 23:57:56193 private:
[email protected]6d668892013-12-04 21:37:12194 struct InitializeOnGpuThreadParams {
195 bool is_offscreen;
fsamueledc0c2c2016-11-18 22:28:04196 SurfaceHandle window;
Antoine Labourfeab2392017-12-21 20:28:39197 const ContextCreationAttribs& attribs;
Chandan Padhi07f05c02017-09-19 02:52:53198 Capabilities* capabilities; // Ouptut.
kylechar22b56412018-04-13 15:58:21199 InProcessCommandBuffer* share_command_buffer;
reveman2232bce2014-10-29 01:28:05200 ImageFactory* image_factory;
[email protected]6d668892013-12-04 21:37:12201
Antoine Labourfeab2392017-12-21 20:28:39202 InitializeOnGpuThreadParams(bool is_offscreen,
203 SurfaceHandle window,
204 const ContextCreationAttribs& attribs,
205 Capabilities* capabilities,
kylechar22b56412018-04-13 15:58:21206 InProcessCommandBuffer* share_command_buffer,
Antoine Labourfeab2392017-12-21 20:28:39207 ImageFactory* image_factory)
[email protected]6d668892013-12-04 21:37:12208 : is_offscreen(is_offscreen),
209 window(window),
[email protected]6d668892013-12-04 21:37:12210 attribs(attribs),
[email protected]ccb82022014-02-12 18:51:33211 capabilities(capabilities),
kylechar22b56412018-04-13 15:58:21212 share_command_buffer(share_command_buffer),
reveman2232bce2014-10-29 01:28:05213 image_factory(image_factory) {}
[email protected]6d668892013-12-04 21:37:12214 };
215
danakj45cfd232017-10-18 19:31:31216 gpu::ContextResult InitializeOnGpuThread(
217 const InitializeOnGpuThreadParams& params);
danakjcdf75f562016-04-12 19:37:02218 void Destroy();
[email protected]92dd77772013-08-01 23:57:56219 bool DestroyOnGpuThread();
Sadrul Habib Chowdhury89a1fbde2018-06-14 17:00:41220 void FlushOnGpuThread(int32_t put_offset);
sunnyps128566052016-12-09 21:06:43221 void UpdateLastStateOnGpuThread();
reveman87580eb2015-09-17 21:45:22222 void ScheduleDelayedWorkOnGpuThread();
[email protected]92dd77772013-08-01 23:57:56223 bool MakeCurrent();
Jonathan Backerbd345c1f2018-02-14 21:44:23224 base::OnceClosure WrapCallback(base::OnceClosure callback);
225
226 void QueueOnceTask(bool out_of_order, base::OnceClosure task);
227 void QueueRepeatableTask(base::RepeatingClosure task);
228
fsamueledc0c2c2016-11-18 22:28:04229 void ProcessTasksOnGpuThread();
[email protected]61724842013-08-07 09:46:09230 void CheckSequencedThread();
sunnyps9147a5312017-03-02 20:26:37231 void OnWaitSyncTokenCompleted(const SyncToken& sync_token);
dyenae103dce2015-11-17 19:59:04232 void SignalSyncTokenOnGpuThread(const SyncToken& sync_token,
Jonathan Backerbd345c1f2018-02-14 21:44:23233 base::OnceClosure callback);
234 void SignalQueryOnGpuThread(unsigned query_id, base::OnceClosure callback);
avif15d60a2015-12-21 17:06:33235 void DestroyTransferBufferOnGpuThread(int32_t id);
236 void CreateImageOnGpuThread(int32_t id,
Alexandr Ilind82fcd82018-06-25 17:47:38237 gfx::GpuMemoryBufferHandle handle,
reveman2232bce2014-10-29 01:28:05238 const gfx::Size& size,
spangfcf5fab42015-08-04 19:25:35239 gfx::BufferFormat format,
avif15d60a2015-12-21 17:06:33240 uint32_t internalformat,
fsamueledc0c2c2016-11-18 22:28:04241 // uint32_t order_num,
dyenac45ecf2015-11-06 17:40:56242 uint64_t fence_sync);
avif15d60a2015-12-21 17:06:33243 void DestroyImageOnGpuThread(int32_t id);
244 void SetGetBufferOnGpuThread(int32_t shm_id, base::WaitableEvent* completion);
Klaus Weidnere66cc7d2017-12-09 17:26:30245 void CreateGpuFenceOnGpuThread(uint32_t gpu_fence_id,
246 const gfx::GpuFenceHandle& handle);
247 void GetGpuFenceOnGpuThread(
248 uint32_t gpu_fence_id,
249 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
250 base::OnceCallback<void(std::unique_ptr<gfx::GpuFence>)> callback);
[email protected]92dd77772013-08-01 23:57:56251
danakj10057772016-04-12 19:35:44252 // Callbacks on the gpu thread.
danakj10057772016-04-12 19:35:44253 void PerformDelayedWorkOnGpuThread();
254 // Callback implementations on the client thread.
[email protected]92dd77772013-08-01 23:57:56255 void OnContextLost();
[email protected]92dd77772013-08-01 23:57:56256
lukasza2573ce7d2016-02-16 19:17:22257 const CommandBufferId command_buffer_id_;
dyen12e45962015-09-18 00:13:51258
[email protected]92dd77772013-08-01 23:57:56259 // Members accessed on the gpu thread (possibly with the exception of
260 // creation):
fsamueledc0c2c2016-11-18 22:28:04261 bool waiting_for_sync_point_ = false;
Sunny Sachanandani93c2ec12017-06-30 03:26:45262 bool use_virtualized_gl_context_ = false;
fsamueledc0c2c2016-11-18 22:28:04263
danakj10057772016-04-12 19:35:44264 scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner_;
Antoine Labourf43993b2017-05-16 19:59:39265 std::unique_ptr<TransferBufferManager> transfer_buffer_manager_;
Jonathan Backer0cd1c4322018-04-17 16:57:10266 std::unique_ptr<DecoderContext> decoder_;
kylechar7a463842016-05-26 14:46:12267 scoped_refptr<gl::GLContext> context_;
268 scoped_refptr<gl::GLSurface> surface_;
dyen5c38a032015-10-07 18:58:31269 scoped_refptr<SyncPointOrderData> sync_point_order_data_;
sunnypsc8cc93e272017-03-21 20:52:27270 scoped_refptr<SyncPointClientState> sync_point_client_state_;
danakj10057772016-04-12 19:35:44271 // Used to throttle PerformDelayedWorkOnGpuThread.
kylechar8e7c5e4d2017-12-04 23:43:17272 bool delayed_work_pending_ = false;
273 ImageFactory* image_factory_ = nullptr;
274 GpuChannelManagerDelegate* gpu_channel_manager_delegate_ = nullptr;
[email protected]92dd77772013-08-01 23:57:56275
[email protected]92dd77772013-08-01 23:57:56276 // Members accessed on the client thread:
kylechar8e7c5e4d2017-12-04 23:43:17277 GpuControlClient* gpu_control_client_ = nullptr;
danakj10057772016-04-12 19:35:44278#if DCHECK_IS_ON()
kylechar8e7c5e4d2017-12-04 23:43:17279 bool context_lost_ = false;
danakj10057772016-04-12 19:35:44280#endif
[email protected]92dd77772013-08-01 23:57:56281 State last_state_;
sunnyps128566052016-12-09 21:06:43282 base::Lock last_state_lock_;
kylechar8e7c5e4d2017-12-04 23:43:17283 int32_t last_put_offset_ = -1;
Chandan Padhi07f05c02017-09-19 02:52:53284 Capabilities capabilities_;
kylechar8e7c5e4d2017-12-04 23:43:17285 GpuMemoryBufferManager* gpu_memory_buffer_manager_ = nullptr;
286 uint64_t next_fence_sync_release_ = 1;
287 uint64_t flushed_fence_sync_release_ = 0;
[email protected]92dd77772013-08-01 23:57:56288
289 // Accessed on both threads:
Antoine Labour33555ec2017-05-23 18:16:39290 std::unique_ptr<CommandBufferService> command_buffer_;
[email protected]92dd77772013-08-01 23:57:56291 base::Lock command_buffer_lock_;
292 base::WaitableEvent flush_event_;
kylechar2fdaa042018-07-03 17:36:23293 scoped_refptr<CommandBufferTaskExecutor> task_executor_;
fsamueledc0c2c2016-11-18 22:28:04294
295 // The group of contexts that share namespaces with this context.
296 scoped_refptr<gles2::ContextGroup> context_group_;
297
kylechar7a463842016-05-26 14:46:12298 scoped_refptr<gl::GLShareGroup> gl_share_group_;
dyen5c38a032015-10-07 18:58:31299 base::WaitableEvent fence_sync_wait_event_;
[email protected]92dd77772013-08-01 23:57:56300
[email protected]61724842013-08-07 09:46:09301 // Only used with explicit scheduling and the gpu thread is the same as
302 // the client thread.
mostynb6682b1c42016-04-19 10:17:30303 std::unique_ptr<base::SequenceChecker> sequence_checker_;
[email protected]61724842013-08-07 09:46:09304
fsamueledc0c2c2016-11-18 22:28:04305 base::Lock task_queue_lock_;
Jonathan Backerbd345c1f2018-02-14 21:44:23306 class GpuTask {
307 public:
308 GpuTask(base::OnceClosure callback, uint32_t order_number);
309 GpuTask(base::RepeatingClosure callback, uint32_t order_number);
fsamueledc0c2c2016-11-18 22:28:04310 ~GpuTask();
Jonathan Backerbd345c1f2018-02-14 21:44:23311
312 uint32_t order_number() { return order_number_; }
313 bool is_repeatable() { return !!repeating_closure_; }
314 void Run();
315
316 private:
317 base::OnceClosure once_closure_;
318 base::RepeatingClosure repeating_closure_;
319 uint32_t order_number_;
320
321 DISALLOW_COPY_AND_ASSIGN(GpuTask);
fsamueledc0c2c2016-11-18 22:28:04322 };
Brett Wilsona62d9c02017-09-20 20:53:20323 base::queue<std::unique_ptr<GpuTask>> task_queue_;
fsamueledc0c2c2016-11-18 22:28:04324
fsamueledc0c2c2016-11-18 22:28:04325 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_;
326
Eric Karlb6b2c632018-05-07 22:45:04327 // Params pushed each time we call OnSwapBuffers, and popped when a buffer
328 // is presented or a swap completed.
329 struct SwapBufferParams {
330 uint64_t swap_id;
331 uint32_t flags;
332 };
333 base::circular_deque<SwapBufferParams> pending_presented_params_;
334 base::circular_deque<SwapBufferParams> pending_swap_completed_params_;
335
danakj10057772016-04-12 19:35:44336 base::WeakPtr<InProcessCommandBuffer> client_thread_weak_ptr_;
[email protected]3f0855c02013-10-09 07:56:25337 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_;
danakj10057772016-04-12 19:35:44338 base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_;
[email protected]3f0855c02013-10-09 07:56:25339 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_;
340
[email protected]92dd77772013-08-01 23:57:56341 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer);
342};
343
[email protected]92dd77772013-08-01 23:57:56344} // namespace gpu
345
fsamuel600b99e2016-11-11 07:50:26346#endif // GPU_IPC_IN_PROCESS_COMMAND_BUFFER_H_