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

Unified Diff: src/gpu/gl/GrGLProgram.h

Issue 13296005: Revise attribute binding interface (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix fExperimentalGS in GrGLProgramDesc Created 7 years, 9 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 | « src/gpu/GrTextContext.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgram.h
===================================================================
--- src/gpu/gl/GrGLProgram.h (revision 8462)
+++ src/gpu/gl/GrGLProgram.h (working copy)
@@ -60,18 +60,23 @@
GrGLuint programID() const { return fProgramID; }
/**
- * Some GL state that is relevant to programs is not stored per-program. In particular vertex
- * attributes are global state. This struct is read and updated by GrGLProgram::setData to
- * allow us to avoid setting this state redundantly.
+ * Some GL state that is relevant to programs is not stored per-program. In particular color
+ * and coverage attributes can be global state. This struct is read and updated by
+ * GrGLProgram::setColor and GrGLProgram::setCoverage to allow us to avoid setting this state
+ * redundantly.
*/
struct SharedGLState {
GrColor fConstAttribColor;
+ int fConstAttribColorIndex;
GrColor fConstAttribCoverage;
+ int fConstAttribCoverageIndex;
SharedGLState() { this->invalidate(); }
void invalidate() {
fConstAttribColor = GrColor_ILLEGAL;
+ fConstAttribColorIndex = -1;
fConstAttribCoverage = GrColor_ILLEGAL;
+ fConstAttribCoverageIndex = -1;
}
};
« no previous file with comments | « src/gpu/GrTextContext.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698