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

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

Issue 1126243002: Check for shader version mismatch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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_manager.h
diff --git a/gpu/command_buffer/service/shader_manager.h b/gpu/command_buffer/service/shader_manager.h
index 0c48b9932f918cac2d4fd30d78bbf85d4fedaf5f..c7355a815cc7e4978d0dfbb6357ef2ec4255253f 100644
--- a/gpu/command_buffer/service/shader_manager.h
+++ b/gpu/command_buffer/service/shader_manager.h
@@ -35,6 +35,8 @@ class GPU_EXPORT Shader : public base::RefCounted<Shader> {
kShaderStateCompiled, // Signifies compile happened, not valid compile.
};
+ static const int kUndefinedShaderVersion = -1;
+
void RequestCompile(scoped_refptr<ShaderTranslatorInterface> translator,
TranslatedShaderSourceType type);
@@ -52,6 +54,10 @@ class GPU_EXPORT Shader : public base::RefCounted<Shader> {
return shader_type_;
}
+ int shader_version() const {
+ return shader_version_;
+ }
+
const std::string& source() const {
return source_;
}
@@ -168,6 +174,10 @@ class GPU_EXPORT Shader : public base::RefCounted<Shader> {
// Type of shader - GL_VERTEX_SHADER or GL_FRAGMENT_SHADER.
GLenum shader_type_;
+ // Version of the shader. Can be kUndefinedShaderVersion or version returned
+ // by ANGLE.
+ int shader_version_;
+
// Translated source type when shader was last requested to be compiled.
TranslatedShaderSourceType source_type_;

Powered by Google App Engine
This is Rietveld 408576698