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

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

Issue 24853002: Make GPU coord transforms automatic (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 3 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/gl/GrGLEffectMatrix.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
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index 0304acf2c7d15714379d817d298dc1e5c723cd0c..441230938b743f3844dec7aee8c84188625df525 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -11,6 +11,7 @@
#include "GrDrawState.h"
#include "GrGLContext.h"
+#include "GrGLCoordTransform.h"
#include "GrGLProgramDesc.h"
#include "GrGLShaderBuilder.h"
#include "GrGLSL.h"
@@ -148,15 +149,17 @@ private:
UniformHandle fDstCopySamplerUni;
};
+ typedef SkSTArray<4, GrGLCoordTransform, false> CoordTransformSArray;
typedef SkSTArray<4, UniformHandle, true> SamplerUniSArray;
typedef SkSTArray<4, int, true> TextureUnitSArray;
struct EffectAndSamplers {
EffectAndSamplers() : fGLEffect(NULL) {}
~EffectAndSamplers() { delete fGLEffect; }
- GrGLEffect* fGLEffect;
- SamplerUniSArray fSamplerUnis; // sampler uni handles for effect's GrTextureAccess
- TextureUnitSArray fTextureUnits; // texture unit used for each entry of fSamplerUnis
+ GrGLEffect* fGLEffect;
+ CoordTransformSArray fCoordTransforms;
+ SamplerUniSArray fSamplerUnis; // sampler uni handles for effect's GrTextureAccess
+ TextureUnitSArray fTextureUnits; // texture unit used for each entry of fSamplerUnis
};
GrGLProgram(GrGpuGL* gpu,
@@ -177,7 +180,7 @@ private:
void initEffectSamplerUniforms(EffectAndSamplers* effect, int* texUnitIdx);
// Helper for setData().
- void setEffectData(const GrEffectStage& stage, const EffectAndSamplers& effect);
+ void setEffectData(const GrEffectStage& stage, EffectAndSamplers& effect);
// Helper for setData(). Makes GL calls to specify the initial color when there is not
// per-vertex colors.
« no previous file with comments | « src/gpu/gl/GrGLEffectMatrix.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698