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/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
14 #include "gpu/command_buffer/service/shader_translator.h" | 14 #include "gpu/command_buffer/service/shader_translator.h" |
| 15 |
| 16 #if defined(ANGLE_DX11) |
| 17 #include "third_party/angle_dx11/include/GLSLANG/ShaderLang.h" |
| 18 #else |
15 #include "third_party/angle/include/GLSLANG/ShaderLang.h" | 19 #include "third_party/angle/include/GLSLANG/ShaderLang.h" |
| 20 #endif |
16 | 21 |
17 namespace gpu { | 22 namespace gpu { |
18 namespace gles2 { | 23 namespace gles2 { |
19 | 24 |
20 // This singleton and the cache that it implements is NOT thread safe. | 25 // This singleton and the cache that it implements is NOT thread safe. |
21 // We're relying on the fact that the all GLES2DecoderImpl's are used | 26 // We're relying on the fact that the all GLES2DecoderImpl's are used |
22 // on one thread. | 27 // on one thread. |
23 // | 28 // |
24 // TODO(backer): Investigate using glReleaseShaderCompiler as an alternative to | 29 // TODO(backer): Investigate using glReleaseShaderCompiler as an alternative to |
25 // to this cache. | 30 // to this cache. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 typedef std::map<ShaderTranslatorInitParams, ShaderTranslator* > Cache; | 91 typedef std::map<ShaderTranslatorInitParams, ShaderTranslator* > Cache; |
87 Cache cache_; | 92 Cache cache_; |
88 | 93 |
89 DISALLOW_COPY_AND_ASSIGN(ShaderTranslatorCache); | 94 DISALLOW_COPY_AND_ASSIGN(ShaderTranslatorCache); |
90 }; | 95 }; |
91 | 96 |
92 } // namespace gles2 | 97 } // namespace gles2 |
93 } // namespace gpu | 98 } // namespace gpu |
94 | 99 |
95 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ | 100 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_CACHE_H_ |
OLD | NEW |