diff options
Diffstat (limited to 'chromium/gpu/command_buffer/service/shader_translator.h')
-rw-r--r-- | chromium/gpu/command_buffer/service/shader_translator.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chromium/gpu/command_buffer/service/shader_translator.h b/chromium/gpu/command_buffer/service/shader_translator.h index 43ae7df7289..5d344636f0b 100644 --- a/chromium/gpu/command_buffer/service/shader_translator.h +++ b/chromium/gpu/command_buffer/service/shader_translator.h @@ -27,6 +27,7 @@ typedef std::vector<sh::OutputVariable> OutputVariableList; typedef base::hash_map<std::string, sh::Uniform> UniformMap; typedef base::hash_map<std::string, sh::Varying> VaryingMap; typedef base::hash_map<std::string, sh::InterfaceBlock> InterfaceBlockMap; +typedef base::RefCountedData<std::string> OptionsAffectingCompilationString; // Translates a GLSL ES 2.0 shader to desktop GLSL shader, or just // validates GLSL ES 2.0 shaders on a true GLSL ES implementation. @@ -61,7 +62,8 @@ class ShaderTranslatorInterface // Return a string that is unique for a specfic set of options that would // possibly affect compilation. - virtual std::string GetStringForOptionsThatWouldAffectCompilation() const = 0; + virtual OptionsAffectingCompilationString* + GetStringForOptionsThatWouldAffectCompilation() const = 0; protected: virtual ~ShaderTranslatorInterface() {} @@ -72,8 +74,7 @@ class ShaderTranslatorInterface }; // Implementation of ShaderTranslatorInterface -class GPU_EXPORT ShaderTranslator - : NON_EXPORTED_BASE(public ShaderTranslatorInterface) { +class GPU_EXPORT ShaderTranslator : public ShaderTranslatorInterface { public: class DestructionObserver { public: @@ -111,7 +112,8 @@ class GPU_EXPORT ShaderTranslator InterfaceBlockMap* interface_block_map, OutputVariableList* output_variable_list) const override; - std::string GetStringForOptionsThatWouldAffectCompilation() const override; + OptionsAffectingCompilationString* + GetStringForOptionsThatWouldAffectCompilation() const override; void AddDestructionObserver(DestructionObserver* observer); void RemoveDestructionObserver(DestructionObserver* observer); @@ -123,6 +125,8 @@ class GPU_EXPORT ShaderTranslator ShHandle compiler_; ShCompileOptions compile_options_; + scoped_refptr<OptionsAffectingCompilationString> + options_affecting_compilation_; base::ObserverList<DestructionObserver> destruction_observers_; }; |