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

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

Issue 2518413002: Add validation to the mailbox functions in the passthrough cmd decoder. (Closed)
Patch Set: Fix explicit. Created 4 years 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 void BuildExtensionsString(); 281 void BuildExtensionsString();
282 282
283 void InsertError(GLenum error, const std::string& message); 283 void InsertError(GLenum error, const std::string& message);
284 GLenum PopError(); 284 GLenum PopError();
285 bool FlushErrors(); 285 bool FlushErrors();
286 286
287 bool IsEmulatedQueryTarget(GLenum target) const; 287 bool IsEmulatedQueryTarget(GLenum target) const;
288 error::Error ProcessQueries(bool did_finish); 288 error::Error ProcessQueries(bool did_finish);
289 289
290 void UpdateTextureBinding(GLenum target, GLuint client_id, GLuint service_id);
291
290 int commands_to_process_; 292 int commands_to_process_;
291 293
292 DebugMarkerManager debug_marker_manager_; 294 DebugMarkerManager debug_marker_manager_;
293 Logger logger_; 295 Logger logger_;
294 296
295 #define GLES2_CMD_OP(name) \ 297 #define GLES2_CMD_OP(name) \
296 Error Handle##name(uint32_t immediate_data_size, const volatile void* data); 298 Error Handle##name(uint32_t immediate_data_size, const volatile void* data);
297 299
298 GLES2_COMMAND_LIST(GLES2_CMD_OP) 300 GLES2_COMMAND_LIST(GLES2_CMD_OP)
299 #undef GLES2_CMD_OP 301 #undef GLES2_CMD_OP
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 ClientServiceMap<GLuint, GLuint> framebuffer_id_map_; 342 ClientServiceMap<GLuint, GLuint> framebuffer_id_map_;
341 ClientServiceMap<GLuint, GLuint> transform_feedback_id_map_; 343 ClientServiceMap<GLuint, GLuint> transform_feedback_id_map_;
342 ClientServiceMap<GLuint, GLuint> query_id_map_; 344 ClientServiceMap<GLuint, GLuint> query_id_map_;
343 ClientServiceMap<GLuint, GLuint> vertex_array_id_map_; 345 ClientServiceMap<GLuint, GLuint> vertex_array_id_map_;
344 346
345 // Mailboxes 347 // Mailboxes
346 scoped_refptr<MailboxManager> mailbox_manager_; 348 scoped_refptr<MailboxManager> mailbox_manager_;
347 349
348 // State tracking of currently bound 2D textures (client IDs) 350 // State tracking of currently bound 2D textures (client IDs)
349 size_t active_texture_unit_; 351 size_t active_texture_unit_;
350 std::vector<GLuint> bound_textures_; 352 std::unordered_map<GLenum, std::vector<GLuint>> bound_textures_;
351 353
352 // Track the service-id to type of all queries for validation 354 // Track the service-id to type of all queries for validation
353 struct QueryInfo { 355 struct QueryInfo {
354 GLenum type = GL_NONE; 356 GLenum type = GL_NONE;
355 }; 357 };
356 std::unordered_map<GLuint, QueryInfo> query_info_map_; 358 std::unordered_map<GLuint, QueryInfo> query_info_map_;
357 359
358 // All queries that are waiting for their results to be ready 360 // All queries that are waiting for their results to be ready
359 struct PendingQuery { 361 struct PendingQuery {
360 GLenum target = GL_NONE; 362 GLenum target = GL_NONE;
(...skipping 23 matching lines...) Expand all
384 386
385 // Include the prototypes of all the doer functions from a separate header to 387 // Include the prototypes of all the doer functions from a separate header to
386 // keep this file clean. 388 // keep this file clean.
387 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototyp es.h" 389 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototyp es.h"
388 }; 390 };
389 391
390 } // namespace gles2 392 } // namespace gles2
391 } // namespace gpu 393 } // namespace gpu
392 394
393 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_ 395 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698