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

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

Issue 25605008: Repurpose GrGLCoordTransform as GrGLEffectArray (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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/GrGLEffect.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 441230938b743f3844dec7aee8c84188625df525..c8bcbf479ee6acb035bc4265c84f22a7d3099613 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -11,7 +11,6 @@
#include "GrDrawState.h"
#include "GrGLContext.h"
-#include "GrGLCoordTransform.h"
#include "GrGLProgramDesc.h"
#include "GrGLShaderBuilder.h"
#include "GrGLSL.h"
@@ -23,6 +22,7 @@
class GrBinHashKeyBuilder;
class GrGLEffect;
+class GrGLProgramEffects;
class GrGLShaderBuilder;
/**
@@ -149,19 +149,6 @@ 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;
- CoordTransformSArray fCoordTransforms;
- SamplerUniSArray fSamplerUnis; // sampler uni handles for effect's GrTextureAccess
- TextureUnitSArray fTextureUnits; // texture unit used for each entry of fSamplerUnis
- };
-
GrGLProgram(GrGpuGL* gpu,
const GrGLProgramDesc& desc,
const GrEffectStage* colorStages[],
@@ -177,10 +164,6 @@ private:
// Sets the texture units for samplers
void initSamplerUniforms();
- void initEffectSamplerUniforms(EffectAndSamplers* effect, int* texUnitIdx);
-
- // Helper for setData().
- 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.
@@ -197,20 +180,20 @@ private:
GrGLuint fProgramID;
// these reflect the current values of uniforms (GL uniform values travel with program)
- MatrixState fMatrixState;
- GrColor fColor;
- GrColor fCoverage;
- GrColor fColorFilterColor;
- int fDstCopyTexUnit;
+ MatrixState fMatrixState;
+ GrColor fColor;
+ GrColor fCoverage;
+ GrColor fColorFilterColor;
+ int fDstCopyTexUnit;
- SkTArray<EffectAndSamplers> fColorEffects;
- SkTArray<EffectAndSamplers> fCoverageEffects;
+ SkAutoTDelete<GrGLProgramEffects> fColorEffects;
+ SkAutoTDelete<GrGLProgramEffects> fCoverageEffects;
- GrGLProgramDesc fDesc;
- GrGpuGL* fGpu;
+ GrGLProgramDesc fDesc;
+ GrGpuGL* fGpu;
- GrGLUniformManager fUniformManager;
- UniformHandles fUniformHandles;
+ GrGLUniformManager fUniformManager;
+ UniformHandles fUniformHandles;
typedef SkRefCnt INHERITED;
};
« no previous file with comments | « src/gpu/gl/GrGLEffect.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698