Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h

Issue 2383753002: gpu: Add GpuFence framework.
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 // This file contains the GLES2DecoderPassthroughImpl class. 5 // This file contains the GLES2DecoderPassthroughImpl class.
6 6
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_ 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_ 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "gpu/command_buffer/common/debug_marker_manager.h" 11 #include "gpu/command_buffer/common/debug_marker_manager.h"
12 #include "gpu/command_buffer/common/gles2_cmd_format.h" 12 #include "gpu/command_buffer/common/gles2_cmd_format.h"
13 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 13 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
14 #include "gpu/command_buffer/common/mailbox.h" 14 #include "gpu/command_buffer/common/mailbox.h"
15 #include "gpu/command_buffer/service/client_service_map.h" 15 #include "gpu/command_buffer/service/client_service_map.h"
16 #include "gpu/command_buffer/service/context_group.h" 16 #include "gpu/command_buffer/service/context_group.h"
17 #include "gpu/command_buffer/service/fence_manager.h"
17 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
18 #include "gpu/command_buffer/service/image_manager.h" 19 #include "gpu/command_buffer/service/image_manager.h"
19 #include "gpu/command_buffer/service/logger.h" 20 #include "gpu/command_buffer/service/logger.h"
20 #include "gpu/command_buffer/service/mailbox_manager.h" 21 #include "gpu/command_buffer/service/mailbox_manager.h"
21 #include "gpu/command_buffer/service/texture_manager.h" 22 #include "gpu/command_buffer/service/texture_manager.h"
22 #include "ui/gl/gl_bindings.h" 23 #include "ui/gl/gl_bindings.h"
23 #include "ui/gl/gl_context.h" 24 #include "ui/gl/gl_context.h"
24 #include "ui/gl/gl_image.h" 25 #include "ui/gl/gl_image.h"
25 #include "ui/gl/gl_surface.h" 26 #include "ui/gl/gl_surface.h"
26 27
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 146
146 // Gets the TransformFeedbackManager for this context. 147 // Gets the TransformFeedbackManager for this context.
147 TransformFeedbackManager* GetTransformFeedbackManager() override; 148 TransformFeedbackManager* GetTransformFeedbackManager() override;
148 149
149 // Gets the VertexArrayManager for this context. 150 // Gets the VertexArrayManager for this context.
150 VertexArrayManager* GetVertexArrayManager() override; 151 VertexArrayManager* GetVertexArrayManager() override;
151 152
152 // Gets the ImageManager for this context. 153 // Gets the ImageManager for this context.
153 ImageManager* GetImageManager() override; 154 ImageManager* GetImageManager() override;
154 155
156 // Gets the FenceManager for this context.
157 FenceManager* GetFenceManager() override;
158
155 // Returns false if there are no pending queries. 159 // Returns false if there are no pending queries.
156 bool HasPendingQueries() const override; 160 bool HasPendingQueries() const override;
157 161
158 // Process any pending queries. 162 // Process any pending queries.
159 void ProcessPendingQueries(bool did_finish) override; 163 void ProcessPendingQueries(bool did_finish) override;
160 164
161 // Returns false if there is no idle work to be made. 165 // Returns false if there is no idle work to be made.
162 bool HasMoreIdleWork() const override; 166 bool HasMoreIdleWork() const override;
163 167
164 // Perform any idle work that needs to be made. 168 // Perform any idle work that needs to be made.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 268
265 // A table of CommandInfo for all the commands. 269 // A table of CommandInfo for all the commands.
266 static const CommandInfo command_info[kNumCommands - kFirstGLES2Command]; 270 static const CommandInfo command_info[kNumCommands - kFirstGLES2Command];
267 271
268 // The GL context this decoder renders to on behalf of the client. 272 // The GL context this decoder renders to on behalf of the client.
269 scoped_refptr<gl::GLSurface> surface_; 273 scoped_refptr<gl::GLSurface> surface_;
270 scoped_refptr<gl::GLContext> context_; 274 scoped_refptr<gl::GLContext> context_;
271 275
272 // Managers 276 // Managers
273 std::unique_ptr<ImageManager> image_manager_; 277 std::unique_ptr<ImageManager> image_manager_;
278 std::unique_ptr<FenceManager> fence_manager_;
274 279
275 // The ContextGroup for this decoder uses to track resources. 280 // The ContextGroup for this decoder uses to track resources.
276 scoped_refptr<ContextGroup> group_; 281 scoped_refptr<ContextGroup> group_;
277 scoped_refptr<FeatureInfo> feature_info_; 282 scoped_refptr<FeatureInfo> feature_info_;
278 283
279 // Callbacks 284 // Callbacks
280 FenceSyncReleaseCallback fence_sync_release_callback_; 285 FenceSyncReleaseCallback fence_sync_release_callback_;
281 WaitFenceSyncCallback wait_fence_sync_callback_; 286 WaitFenceSyncCallback wait_fence_sync_callback_;
282 287
283 // Some objects may generate resources when they are bound even if they were 288 // Some objects may generate resources when they are bound even if they were
(...skipping 19 matching lines...) Expand all
303 308
304 // Include the prototypes of all the doer functions from a separate header to 309 // Include the prototypes of all the doer functions from a separate header to
305 // keep this file clean. 310 // keep this file clean.
306 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototyp es.h" 311 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototyp es.h"
307 }; 312 };
308 313
309 } // namespace gles2 314 } // namespace gles2
310 } // namespace gpu 315 } // namespace gpu
311 316
312 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_ 317 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698