| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 const std::string& shader)> ShaderCacheCallback; | 76 const std::string& shader)> ShaderCacheCallback; |
| 76 | 77 |
| 77 // This class implements the AsyncAPIInterface interface, decoding GLES2 | 78 // This class implements the AsyncAPIInterface interface, decoding GLES2 |
| 78 // commands and calling GL. | 79 // commands and calling GL. |
| 79 class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, | 80 class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, |
| 80 public CommonDecoder { | 81 public CommonDecoder { |
| 81 public: | 82 public: |
| 82 typedef error::Error Error; | 83 typedef error::Error Error; |
| 83 typedef base::Callback<void(uint64_t release)> FenceSyncReleaseCallback; | 84 typedef base::Callback<void(uint64_t release)> FenceSyncReleaseCallback; |
| 84 typedef base::Callback<bool(gpu::CommandBufferNamespace namespace_id, | 85 typedef base::Callback<bool(gpu::CommandBufferNamespace namespace_id, |
| 85 uint64_t command_buffer_id, | 86 gpu::CommandBufferId command_buffer_id, |
| 86 uint64_t release)> WaitFenceSyncCallback; | 87 uint64_t release)> |
| 88 WaitFenceSyncCallback; |
| 87 | 89 |
| 88 // The default stencil mask, which has all bits set. This really should be a | 90 // The default stencil mask, which has all bits set. This really should be a |
| 89 // GLuint, but we can't #include gl_bindings.h in this file without causing | 91 // GLuint, but we can't #include gl_bindings.h in this file without causing |
| 90 // macro redefinitions. | 92 // macro redefinitions. |
| 91 static const unsigned int kDefaultStencilMask; | 93 static const unsigned int kDefaultStencilMask; |
| 92 | 94 |
| 93 // Creates a decoder. | 95 // Creates a decoder. |
| 94 static GLES2Decoder* Create(ContextGroup* group); | 96 static GLES2Decoder* Create(ContextGroup* group); |
| 95 | 97 |
| 96 ~GLES2Decoder() override; | 98 ~GLES2Decoder() override; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 bool log_commands_; | 287 bool log_commands_; |
| 286 bool unsafe_es3_apis_enabled_; | 288 bool unsafe_es3_apis_enabled_; |
| 287 bool force_shader_name_hashing_for_test_; | 289 bool force_shader_name_hashing_for_test_; |
| 288 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 290 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
| 289 }; | 291 }; |
| 290 | 292 |
| 291 } // namespace gles2 | 293 } // namespace gles2 |
| 292 } // namespace gpu | 294 } // namespace gpu |
| 293 | 295 |
| 294 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 296 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| OLD | NEW |