| 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;
|
| }
|
| };
|
|
|
|
|