diff options
Diffstat (limited to 'gpu/command_buffer/service/shader_translator.h')
-rw-r--r-- | gpu/command_buffer/service/shader_translator.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gpu/command_buffer/service/shader_translator.h b/gpu/command_buffer/service/shader_translator.h index ef25ebb..818be5d 100644 --- a/gpu/command_buffer/service/shader_translator.h +++ b/gpu/command_buffer/service/shader_translator.h @@ -27,8 +27,10 @@ typedef base::hash_map<std::string, std::string> NameMap; // 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. -class ShaderTranslatorInterface { +class ShaderTranslatorInterface + : public base::RefCounted<ShaderTranslatorInterface> { public: + ShaderTranslatorInterface() {} enum GlslImplementationType { kGlsl, kGlslES @@ -62,12 +64,15 @@ class ShaderTranslatorInterface { protected: virtual ~ShaderTranslatorInterface() {} + + private: + friend class base::RefCounted<ShaderTranslatorInterface>; + DISALLOW_COPY_AND_ASSIGN(ShaderTranslatorInterface); }; // Implementation of ShaderTranslatorInterface class GPU_EXPORT ShaderTranslator - : public base::RefCounted<ShaderTranslator>, - NON_EXPORTED_BASE(public ShaderTranslatorInterface) { + : NON_EXPORTED_BASE(public ShaderTranslatorInterface) { public: class DestructionObserver { public: @@ -104,17 +109,14 @@ class GPU_EXPORT ShaderTranslator void RemoveDestructionObserver(DestructionObserver* observer); private: - friend class base::RefCounted<ShaderTranslator>; - ~ShaderTranslator() override; + int GetCompileOptions() const; ShHandle compiler_; bool implementation_is_glsl_es_; ShCompileOptions driver_bug_workarounds_; ObserverList<DestructionObserver> destruction_observers_; - - DISALLOW_COPY_AND_ASSIGN(ShaderTranslator); }; } // namespace gles2 |