Index: gpu/command_buffer/service/shader_translator_cache.h |
diff --git a/gpu/command_buffer/service/shader_translator_cache.h b/gpu/command_buffer/service/shader_translator_cache.h |
index 06f00f7e89aab33e06168fa6928697b06feacf12..67b9158de63459f42b3341f693db0d76151c848a 100644 |
--- a/gpu/command_buffer/service/shader_translator_cache.h |
+++ b/gpu/command_buffer/service/shader_translator_cache.h |
@@ -15,6 +15,9 @@ |
#include "third_party/angle/include/GLSLANG/ShaderLang.h" |
namespace gpu { |
+ |
+struct GpuPreferences; |
+ |
namespace gles2 { |
// This class is not thread safe and can only be created and destroyed |
@@ -27,7 +30,7 @@ class GPU_EXPORT ShaderTranslatorCache |
: public base::RefCounted<ShaderTranslatorCache>, |
public NON_EXPORTED_BASE(ShaderTranslator::DestructionObserver) { |
public: |
- ShaderTranslatorCache(); |
+ explicit ShaderTranslatorCache(const GpuPreferences& gpu_preferences); |
// ShaderTranslator::DestructionObserver implementation |
void OnDestruct(ShaderTranslator* translator) override; |
@@ -82,6 +85,8 @@ class GPU_EXPORT ShaderTranslatorCache |
ShaderTranslatorInitParams& operator=(const ShaderTranslatorInitParams&); |
}; |
+ const GpuPreferences& gpu_preferences_; |
+ |
typedef std::map<ShaderTranslatorInitParams, ShaderTranslator* > Cache; |
Cache cache_; |