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

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

Issue 12210057: Added temporary #ifdefs to support incompatible ANGLE API upgrade. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed SH_VERSION macro due to conflict on Android bot. Created 7 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/shader_translator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 3b441a2c76688e8432d3569c147e9dda7a60b69e..feb688cd016ba0316ce41811810659f394601f6e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -74,10 +74,12 @@ namespace {
static const char kOESDerivativeExtension[] = "GL_OES_standard_derivatives";
+#if !defined(ANGLE_SH_VERSION) || ANGLE_SH_VERSION < 108
khronos_uint64_t CityHashForAngle(const char* name, unsigned int len) {
return static_cast<khronos_uint64_t>(
CityHash64(name, static_cast<size_t>(len)));
}
+#endif
} // namespace
@@ -2500,7 +2502,11 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() {
ShShaderSpec shader_spec = force_webgl_glsl_validation_ ||
force_webgl_glsl_validation_ ? SH_WEBGL_SPEC : SH_GLES2_SPEC;
if (shader_spec == SH_WEBGL_SPEC && features().enable_shader_name_hashing)
+#if !defined(ANGLE_SH_VERSION) || ANGLE_SH_VERSION < 108
resources.HashFunction = &CityHashForAngle;
+#else
+ resources.HashFunction = &CityHash64;
+#endif
else
resources.HashFunction = NULL;
ShaderTranslatorInterface::GlslImplementationType implementation_type =
« no previous file with comments | « no previous file | gpu/command_buffer/service/shader_translator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698