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

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

Issue 1273693002: command_buffer: Use GLSL core version that matches the OpenGL version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 858014dc0494fb9af555aa3027f705094448fdcf..4866bdc63599d1f978217771b8075d515823088a 100644
--- a/gpu/command_buffer/service/shader_translator.h
+++ b/gpu/command_buffer/service/shader_translator.h
@@ -31,19 +31,14 @@ class ShaderTranslatorInterface
: public base::RefCounted<ShaderTranslatorInterface> {
public:
ShaderTranslatorInterface() {}
- enum GlslImplementationType {
- kGlsl,
- kGlslES
- };
// Initializes the translator.
// Must be called once before using the translator object.
- virtual bool Init(
- sh::GLenum shader_type,
- ShShaderSpec shader_spec,
- const ShBuiltInResources* resources,
- GlslImplementationType glsl_implementation_type,
- ShCompileOptions driver_bug_workarounds) = 0;
+ virtual bool Init(sh::GLenum shader_type,
+ ShShaderSpec shader_spec,
+ const ShBuiltInResources* resources,
+ ShShaderOutput shader_output_language,
+ ShCompileOptions driver_bug_workarounds) = 0;
// Translates the given shader source.
// Returns true if translation is successful, false otherwise.
@@ -92,7 +87,7 @@ class GPU_EXPORT ShaderTranslator
bool Init(sh::GLenum shader_type,
ShShaderSpec shader_spec,
const ShBuiltInResources* resources,
- GlslImplementationType glsl_implementation_type,
+ ShShaderOutput shader_output_language,
ShCompileOptions driver_bug_workarounds) override;
// Overridden from ShaderTranslatorInterface.
@@ -116,7 +111,6 @@ class GPU_EXPORT ShaderTranslator
int GetCompileOptions() const;
ShHandle compiler_;
- bool implementation_is_glsl_es_;
ShCompileOptions driver_bug_workarounds_;
base::ObserverList<DestructionObserver> destruction_observers_;
};

Powered by Google App Engine
This is Rietveld 408576698