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 #ifndef GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ |
7 | 7 |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 | 11 |
| 12 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 #include "gpu/command_buffer/service/shader_translator.h" | 14 #include "gpu/command_buffer/service/shader_translator.h" |
14 #include "third_party/angle/include/GLSLANG/ShaderLang.h" | 15 #include "third_party/angle/include/GLSLANG/ShaderLang.h" |
15 | 16 |
16 namespace gpu { | 17 namespace gpu { |
17 namespace gles2 { | 18 namespace gles2 { |
18 | 19 |
19 // This class is not thread safe and can only be created and destroyed | 20 // This class is not thread safe and can only be created and destroyed |
20 // on a single thread. But it is safe to use two independent instances on two | 21 // on a single thread. But it is safe to use two independent instances on two |
21 // threads without synchronization. | 22 // threads without synchronization. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 typedef std::map<ShaderTranslatorInitParams, ShaderTranslator* > Cache; | 85 typedef std::map<ShaderTranslatorInitParams, ShaderTranslator* > Cache; |
85 Cache cache_; | 86 Cache cache_; |
86 | 87 |
87 DISALLOW_COPY_AND_ASSIGN(ShaderTranslatorCache); | 88 DISALLOW_COPY_AND_ASSIGN(ShaderTranslatorCache); |
88 }; | 89 }; |
89 | 90 |
90 } // namespace gles2 | 91 } // namespace gles2 |
91 } // namespace gpu | 92 } // namespace gpu |
92 | 93 |
93 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ | 94 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ |
OLD | NEW |