Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: gpu/command_buffer/service/shader_translator.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/shader_translator.h
diff --git a/gpu/command_buffer/service/shader_translator.h b/gpu/command_buffer/service/shader_translator.h
index ef25ebb5592ece8e49fc6f707b76b91768c2bb61..818be5d22241c4550979c99f6770039f3015aa19 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
« no previous file with comments | « gpu/command_buffer/service/shader_manager_unittest.cc ('k') | gpu/command_buffer/service/sync_point_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698