| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 GLES2Decoder class. | 5 // This file contains the GLES2Decoder class. |
| 6 | 6 |
| 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/callback_forward.h" | 15 #include "base/callback_forward.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 21 #include "gpu/command_buffer/common/capabilities.h" | 21 #include "gpu/command_buffer/common/capabilities.h" |
| 22 #include "gpu/command_buffer/common/command_buffer_id.h" |
| 22 #include "gpu/command_buffer/common/constants.h" | 23 #include "gpu/command_buffer/common/constants.h" |
| 23 #include "gpu/command_buffer/service/common_decoder.h" | 24 #include "gpu/command_buffer/service/common_decoder.h" |
| 24 #include "gpu/gpu_export.h" | 25 #include "gpu/gpu_export.h" |
| 25 | 26 |
| 26 namespace gfx { | 27 namespace gfx { |
| 27 class GLContext; | 28 class GLContext; |
| 28 class GLSurface; | 29 class GLSurface; |
| 29 class Size; | 30 class Size; |
| 30 } | 31 } |
| 31 | 32 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const std::string& shader)> ShaderCacheCallback; | 79 const std::string& shader)> ShaderCacheCallback; |
| 79 | 80 |
| 80 // This class implements the AsyncAPIInterface interface, decoding GLES2 | 81 // This class implements the AsyncAPIInterface interface, decoding GLES2 |
| 81 // commands and calling GL. | 82 // commands and calling GL. |
| 82 class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, | 83 class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, |
| 83 public CommonDecoder { | 84 public CommonDecoder { |
| 84 public: | 85 public: |
| 85 typedef error::Error Error; | 86 typedef error::Error Error; |
| 86 typedef base::Callback<void(uint64_t release)> FenceSyncReleaseCallback; | 87 typedef base::Callback<void(uint64_t release)> FenceSyncReleaseCallback; |
| 87 typedef base::Callback<bool(gpu::CommandBufferNamespace namespace_id, | 88 typedef base::Callback<bool(gpu::CommandBufferNamespace namespace_id, |
| 88 uint64_t command_buffer_id, | 89 gpu::CommandBufferId command_buffer_id, |
| 89 uint64_t release)> WaitFenceSyncCallback; | 90 uint64_t release)> |
| 91 WaitFenceSyncCallback; |
| 90 | 92 |
| 91 // The default stencil mask, which has all bits set. This really should be a | 93 // The default stencil mask, which has all bits set. This really should be a |
| 92 // GLuint, but we can't #include gl_bindings.h in this file without causing | 94 // GLuint, but we can't #include gl_bindings.h in this file without causing |
| 93 // macro redefinitions. | 95 // macro redefinitions. |
| 94 static const unsigned int kDefaultStencilMask; | 96 static const unsigned int kDefaultStencilMask; |
| 95 | 97 |
| 96 // Creates a decoder. | 98 // Creates a decoder. |
| 97 static GLES2Decoder* Create(ContextGroup* group); | 99 static GLES2Decoder* Create(ContextGroup* group); |
| 98 | 100 |
| 99 ~GLES2Decoder() override; | 101 ~GLES2Decoder() override; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 bool log_commands_; | 290 bool log_commands_; |
| 289 bool unsafe_es3_apis_enabled_; | 291 bool unsafe_es3_apis_enabled_; |
| 290 bool force_shader_name_hashing_for_test_; | 292 bool force_shader_name_hashing_for_test_; |
| 291 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 293 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
| 292 }; | 294 }; |
| 293 | 295 |
| 294 } // namespace gles2 | 296 } // namespace gles2 |
| 295 } // namespace gpu | 297 } // namespace gpu |
| 296 | 298 |
| 297 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 299 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| OLD | NEW |