aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrGpuGLShaders2.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-19 21:15:09 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-19 21:15:09 +0000
commit4be283f3a82895530d1b70372cd48ddb1c663fd8 (patch)
tree6b439eed9d51302125f5448683b6984b7f113f0a /gpu/src/GrGpuGLShaders2.h
parentc733996e84cbac28492e133e00c573740a8708c4 (diff)
Adds a build flag for GL to never use vertex attributes that don't have per-vertex values.
Also promotes the ATTRIBUTE_MATRIX flag that was local to cpp files to the public config file. Review URL: http://codereview.appspot.com/4434057/ git-svn-id: http://skia.googlecode.com/svn/trunk@1155 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGpuGLShaders2.h')
-rw-r--r--gpu/src/GrGpuGLShaders2.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/gpu/src/GrGpuGLShaders2.h b/gpu/src/GrGpuGLShaders2.h
index b9a019b79b..205f9afedd 100644
--- a/gpu/src/GrGpuGLShaders2.h
+++ b/gpu/src/GrGpuGLShaders2.h
@@ -36,6 +36,19 @@ protected:
private:
+ struct Program;
+
+ struct StageDesc;
+ struct ProgramDesc;
+
+ struct UniLocations;
+ struct StageUniLocations;
+
+ struct ShaderCodeSegments;
+
+ class ProgramCache;
+
+ // GrGpu override
virtual void resetContext();
// Helpers to make code more readable
@@ -51,20 +64,12 @@ private:
// flushes the parameters to two point radial gradient
void flushRadial2(int stage);
- // called at flush time to setup the appropriate program
- void flushProgram(GrPrimitiveType type);
+ // called at flush time to setup the appropriate program, also returns
+ // the program description.
+ void flushProgram(GrPrimitiveType type, ProgramDesc* desc);
- struct Program;
-
- struct StageDesc;
- struct ProgramDesc;
-
- struct UniLocations;
- struct StageUniLocations;
-
- struct ShaderCodeSegments;
-
- class ProgramCache;
+ // called at flush time to handle the color specified by setColor()
+ void flushColor(const ProgramDesc& desc);
// gets a description of needed shader
void getProgramDesc(GrPrimitiveType primType, ProgramDesc* desc);
@@ -93,7 +98,7 @@ private:
ProgramCache* fProgramCache;
Program* fProgram;
- GrGLuint fHWProgramID;
+ GrGLuint fHWProgramID;
typedef GrGpuGL INHERITED;
};