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

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

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "gpu/gpu_export.h" 14 #include "gpu/gpu_export.h"
15 #include "third_party/angle/include/GLSLANG/ShaderLang.h" 15 #include "third_party/angle/include/GLSLANG/ShaderLang.h"
16 16
17 namespace gfx { 17 namespace gl {
18 struct GLVersionInfo; 18 struct GLVersionInfo;
19 } 19 }
20 20
21 namespace gpu { 21 namespace gpu {
22 namespace gles2 { 22 namespace gles2 {
23 23
24 // Mapping between variable name and info. 24 // Mapping between variable name and info.
25 typedef base::hash_map<std::string, sh::Attribute> AttributeMap; 25 typedef base::hash_map<std::string, sh::Attribute> AttributeMap;
26 typedef std::vector<sh::OutputVariable> OutputVariableList; 26 typedef std::vector<sh::OutputVariable> OutputVariableList;
27 typedef base::hash_map<std::string, sh::Uniform> UniformMap; 27 typedef base::hash_map<std::string, sh::Uniform> UniformMap;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual void OnDestruct(ShaderTranslator* translator) = 0; 86 virtual void OnDestruct(ShaderTranslator* translator) = 0;
87 87
88 private: 88 private:
89 DISALLOW_COPY_AND_ASSIGN(DestructionObserver); 89 DISALLOW_COPY_AND_ASSIGN(DestructionObserver);
90 }; 90 };
91 91
92 ShaderTranslator(); 92 ShaderTranslator();
93 93
94 // Return shader output lanaguage type based on the context version. 94 // Return shader output lanaguage type based on the context version.
95 static ShShaderOutput GetShaderOutputLanguageForContext( 95 static ShShaderOutput GetShaderOutputLanguageForContext(
96 const gfx::GLVersionInfo& context_version); 96 const gl::GLVersionInfo& context_version);
97 97
98 // Overridden from ShaderTranslatorInterface. 98 // Overridden from ShaderTranslatorInterface.
99 bool Init(sh::GLenum shader_type, 99 bool Init(sh::GLenum shader_type,
100 ShShaderSpec shader_spec, 100 ShShaderSpec shader_spec,
101 const ShBuiltInResources* resources, 101 const ShBuiltInResources* resources,
102 ShShaderOutput shader_output_language, 102 ShShaderOutput shader_output_language,
103 ShCompileOptions driver_bug_workarounds, 103 ShCompileOptions driver_bug_workarounds,
104 bool gl_shader_interm_output) override; 104 bool gl_shader_interm_output) override;
105 105
106 // Overridden from ShaderTranslatorInterface. 106 // Overridden from ShaderTranslatorInterface.
(...skipping 22 matching lines...) Expand all
129 ShCompileOptions driver_bug_workarounds_; 129 ShCompileOptions driver_bug_workarounds_;
130 bool gl_shader_interm_output_; 130 bool gl_shader_interm_output_;
131 base::ObserverList<DestructionObserver> destruction_observers_; 131 base::ObserverList<DestructionObserver> destruction_observers_;
132 }; 132 };
133 133
134 } // namespace gles2 134 } // namespace gles2
135 } // namespace gpu 135 } // namespace gpu
136 136
137 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_ 137 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
138 138
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/renderbuffer_manager.cc ('k') | gpu/command_buffer/service/shader_translator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698