Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 280 | 280 |
| 281 void InsertError(GLenum error, const std::string& message); | 281 void InsertError(GLenum error, const std::string& message); |
| 282 GLenum PopError(); | 282 GLenum PopError(); |
| 283 bool FlushErrors(); | 283 bool FlushErrors(); |
| 284 | 284 |
| 285 bool IsEmulatedQueryTarget(GLenum target) const; | 285 bool IsEmulatedQueryTarget(GLenum target) const; |
| 286 error::Error ProcessQueries(bool did_finish); | 286 error::Error ProcessQueries(bool did_finish); |
| 287 | 287 |
| 288 void UpdateTextureBinding(GLenum target, GLuint client_id, GLuint service_id); | 288 void UpdateTextureBinding(GLenum target, GLuint client_id, GLuint service_id); |
| 289 | 289 |
| 290 void InitializeNativeCaps(); | |
| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 // Currently active queries | 372 // Currently active queries |
| 371 struct ActiveQuery { | 373 struct ActiveQuery { |
| 372 GLuint service_id = 0; | 374 GLuint service_id = 0; |
| 373 int32_t shm_id = 0; | 375 int32_t shm_id = 0; |
| 374 uint32_t shm_offset = 0; | 376 uint32_t shm_offset = 0; |
| 375 }; | 377 }; |
| 376 std::unordered_map<GLenum, ActiveQuery> active_queries_; | 378 std::unordered_map<GLenum, ActiveQuery> active_queries_; |
| 377 | 379 |
| 378 std::set<GLenum> errors_; | 380 std::set<GLenum> errors_; |
| 379 | 381 |
| 382 // Native caps | |
| 383 bool has_es3_; | |
| 384 bool has_ext_discard_framebuffer_; | |
| 385 bool has_angle_framebuffer_multisample_; | |
| 386 bool has_ext_disjoint_timer_query_; | |
| 387 bool has_chromium_copy_texture_; | |
| 388 bool has_chromium_copy_compressed_texture_; | |
|
Zhenyao Mo
2017/02/13 18:12:08
Can we consolidate these to FeatureInfo? It seems
Geoff Lang
2017/02/13 19:53:06
I tried but these features are enabled sometimes w
| |
| 389 | |
| 380 // Cache of scratch memory | 390 // Cache of scratch memory |
| 381 std::vector<uint8_t> scratch_memory_; | 391 std::vector<uint8_t> scratch_memory_; |
| 382 | 392 |
| 383 // Include the prototypes of all the doer functions from a separate header to | 393 // Include the prototypes of all the doer functions from a separate header to |
| 384 // keep this file clean. | 394 // keep this file clean. |
| 385 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototyp es.h" | 395 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototyp es.h" |
| 386 }; | 396 }; |
| 387 | 397 |
| 388 } // namespace gles2 | 398 } // namespace gles2 |
| 389 } // namespace gpu | 399 } // namespace gpu |
| 390 | 400 |
| 391 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_ | 401 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_PASSTHROUGH_H_ |
| OLD | NEW |