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

Side by Side Diff: gpu/command_buffer/service/shader_translator.h

Issue 663363002: Standardize usage of virtual/override/final in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update generator script Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 virtual void OnDestruct(ShaderTranslator* translator) = 0; 77 virtual void OnDestruct(ShaderTranslator* translator) = 0;
78 78
79 private: 79 private:
80 DISALLOW_COPY_AND_ASSIGN(DestructionObserver); 80 DISALLOW_COPY_AND_ASSIGN(DestructionObserver);
81 }; 81 };
82 82
83 ShaderTranslator(); 83 ShaderTranslator();
84 84
85 // Overridden from ShaderTranslatorInterface. 85 // Overridden from ShaderTranslatorInterface.
86 virtual bool Init( 86 bool Init(sh::GLenum shader_type,
87 sh::GLenum shader_type, 87 ShShaderSpec shader_spec,
88 ShShaderSpec shader_spec, 88 const ShBuiltInResources* resources,
89 const ShBuiltInResources* resources, 89 GlslImplementationType glsl_implementation_type,
90 GlslImplementationType glsl_implementation_type, 90 ShCompileOptions driver_bug_workarounds) override;
91 ShCompileOptions driver_bug_workarounds) override;
92 91
93 // Overridden from ShaderTranslatorInterface. 92 // Overridden from ShaderTranslatorInterface.
94 virtual bool Translate(const std::string& shader_source, 93 bool Translate(const std::string& shader_source,
95 std::string* info_log, 94 std::string* info_log,
96 std::string* translated_source, 95 std::string* translated_source,
97 AttributeMap* attrib_map, 96 AttributeMap* attrib_map,
98 UniformMap* uniform_map, 97 UniformMap* uniform_map,
99 VaryingMap* varying_map, 98 VaryingMap* varying_map,
100 NameMap* name_map) const override; 99 NameMap* name_map) const override;
101 100
102 virtual std::string GetStringForOptionsThatWouldAffectCompilation() const 101 std::string GetStringForOptionsThatWouldAffectCompilation() const override;
103 override;
104 102
105 void AddDestructionObserver(DestructionObserver* observer); 103 void AddDestructionObserver(DestructionObserver* observer);
106 void RemoveDestructionObserver(DestructionObserver* observer); 104 void RemoveDestructionObserver(DestructionObserver* observer);
107 105
108 private: 106 private:
109 friend class base::RefCounted<ShaderTranslator>; 107 friend class base::RefCounted<ShaderTranslator>;
110 108
111 virtual ~ShaderTranslator(); 109 ~ShaderTranslator() override;
112 int GetCompileOptions() const; 110 int GetCompileOptions() const;
113 111
114 ShHandle compiler_; 112 ShHandle compiler_;
115 ShBuiltInResources compiler_options_; 113 ShBuiltInResources compiler_options_;
116 bool implementation_is_glsl_es_; 114 bool implementation_is_glsl_es_;
117 ShCompileOptions driver_bug_workarounds_; 115 ShCompileOptions driver_bug_workarounds_;
118 ObserverList<DestructionObserver> destruction_observers_; 116 ObserverList<DestructionObserver> destruction_observers_;
119 117
120 DISALLOW_COPY_AND_ASSIGN(ShaderTranslator); 118 DISALLOW_COPY_AND_ASSIGN(ShaderTranslator);
121 }; 119 };
122 120
123 } // namespace gles2 121 } // namespace gles2
124 } // namespace gpu 122 } // namespace gpu
125 123
126 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_ 124 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
127 125
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/query_manager_unittest.cc ('k') | gpu/command_buffer/service/shader_translator_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698