Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h |
| index 6c3a5bdc37440d15795ece11cbfa8e58cbfb17ad..d9a47aacaad6b9ab2ab6c7b3a1da67c28e57efcd 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h |
| @@ -241,6 +241,13 @@ class GLES2DecoderPassthroughImpl : public GLES2Decoder { |
| private: |
| void BuildExtensionsString(); |
| + void InsertError(GLenum error, const std::string& message); |
| + GLenum PopError(); |
| + bool FlushErrors(); |
| + |
| + bool IsEmulatedQueryTarget(GLenum target) const; |
| + error::Error ProcessQueries(bool did_finish); |
| + |
| int commands_to_process_; |
| DebugMarkerManager debug_marker_manager_; |
| @@ -303,6 +310,33 @@ class GLES2DecoderPassthroughImpl : public GLES2Decoder { |
| size_t active_texture_unit_; |
| std::vector<GLuint> bound_textures_; |
| + // Track the service-id to type of all queries for validation |
| + struct QueryInfo { |
| + GLenum type = GL_NONE; |
| + }; |
| + std::unordered_map<GLuint, QueryInfo> query_info_map_; |
|
piman
2016/11/18 19:32:09
nit: any reason to use the service id to index her
Geoff Lang
2016/11/21 18:12:16
I found it needed the same number of lookups becau
|
| + |
| + // All queries that are waiting for their results to be ready |
| + struct PendingQuery { |
| + GLenum target = GL_NONE; |
| + GLuint service_id = 0; |
| + |
| + int32_t shm_id = 0; |
| + uint32_t shm_offset = 0; |
| + base::subtle::Atomic32 submit_count = 0; |
| + }; |
| + std::deque<PendingQuery> pending_queries_; |
| + |
| + // Currently active queries |
| + struct ActiveQuery { |
| + GLuint service_id = 0; |
| + int32_t shm_id = 0; |
| + uint32_t shm_offset = 0; |
| + }; |
| + std::unordered_map<GLenum, ActiveQuery> active_queries_; |
| + |
| + std::set<GLenum> errors_; |
| + |
| std::vector<std::string> emulated_extensions_; |
| std::string extension_string_; |