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

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

Issue 2852923004: Remove NameMap from shader translator and shader/program managers (Closed)
Patch Set: remove some TODO(zmo)s Created 3 years, 8 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.cc
diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc
index 3d3012de0fce647e9f74e540d31a3a8fb9ac6a44..40f45e8d104dee4010f74fca8343b311093ec06e 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -90,23 +90,6 @@ void GetInterfaceBlocks(ShHandle compiler, InterfaceBlockMap* var_map) {
}
}
-void GetNameHashingInfo(ShHandle compiler, NameMap* name_map) {
- if (!name_map)
- return;
- name_map->clear();
-
- typedef std::map<std::string, std::string> NameMapANGLE;
- const NameMapANGLE* angle_map = sh::GetNameHashingMap(compiler);
- DCHECK(angle_map);
-
- for (NameMapANGLE::const_iterator iter = angle_map->begin();
- iter != angle_map->end(); ++iter) {
- // Note that in ANGLE, the map is (original_name, hash);
- // here, we want (hash, original_name).
- (*name_map)[iter->second] = iter->first;
- }
-}
-
} // namespace
ShShaderOutput ShaderTranslator::GetShaderOutputLanguageForContext(
@@ -209,16 +192,16 @@ ShCompileOptions ShaderTranslator::GetCompileOptions() const {
return compile_options_;
}
-bool ShaderTranslator::Translate(const std::string& shader_source,
- std::string* info_log,
- std::string* translated_source,
- int* shader_version,
- AttributeMap* attrib_map,
- UniformMap* uniform_map,
- VaryingMap* varying_map,
- InterfaceBlockMap* interface_block_map,
- OutputVariableList* output_variable_list,
- NameMap* name_map) const {
+bool ShaderTranslator::Translate(
+ const std::string& shader_source,
+ std::string* info_log,
+ std::string* translated_source,
+ int* shader_version,
+ AttributeMap* attrib_map,
+ UniformMap* uniform_map,
+ VaryingMap* varying_map,
+ InterfaceBlockMap* interface_block_map,
+ OutputVariableList* output_variable_list) const {
// Make sure this instance is initialized.
DCHECK(compiler_ != NULL);
@@ -241,8 +224,6 @@ bool ShaderTranslator::Translate(const std::string& shader_source,
GetVaryings(compiler_, varying_map);
GetInterfaceBlocks(compiler_, interface_block_map);
GetOutputVariables(compiler_, output_variable_list);
- // Get info for name hashing.
- GetNameHashingInfo(compiler_, name_map);
}
// Get info log.
« no previous file with comments | « gpu/command_buffer/service/shader_translator.h ('k') | gpu/command_buffer/service/shader_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698