Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(31)

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

Issue 6744061: Automatically handle converting gl_FragCoord to Skia's y-down device coords. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Automatically handle converting gl_FragCoord to Skia's y-down device coords. Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.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 6029)
+++ src/gpu/gl/GrGLProgram.h (working copy)
@@ -72,7 +72,7 @@
* This function uploads uniforms and calls each GrCustomStage's setData. It is called before a
* draw occurs using the program after the program has already been bound.
*/
- void setData(const GrDrawState& drawState) const;
+ void setData(const GrDrawState& drawState);
// Parameters that affect code generation
// These structs should be kept compact; they are the input to an
@@ -221,12 +221,16 @@
UniformHandle fColorUni;
UniformHandle fCoverageUni;
UniformHandle fColorFilterUni;
+ // We use the render target height to provide a y-down frag coord when specifying
+ // origin_upper_left is not supported.
+ UniformHandle fRTHeight;
StageUniforms fStages[GrDrawState::kNumStages];
Uniforms() {
fViewMatrixUni = GrGLUniformManager::kInvalidUniformHandle;
fColorUni = GrGLUniformManager::kInvalidUniformHandle;
fCoverageUni = GrGLUniformManager::kInvalidUniformHandle;
fColorFilterUni = GrGLUniformManager::kInvalidUniformHandle;
+ fRTHeight = GrGLUniformManager::kInvalidUniformHandle;
}
};
@@ -246,6 +250,7 @@
GrColor fColor;
GrColor fCoverage;
GrColor fColorFilterColor;
+ int fRTHeight;
/// When it is sent to GL, the texture matrix will be flipped if the texture orientation
/// (below) requires.
GrMatrix fTextureMatrices[GrDrawState::kNumStages];
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b