Removing remnants of GrGLEffect.
Bug: http://code.google.com/p/skia/issues/detail?id=264
Code review: http://codereview.appspot.com/4517073/
git-svn-id: http://skia.googlecode.com/svn/trunk@1350 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGLProgram.h b/gpu/src/GrGLProgram.h
index 64d7088..e02d15b 100644
--- a/gpu/src/GrGLProgram.h
+++ b/gpu/src/GrGLProgram.h
@@ -24,8 +24,15 @@
#include "SkXfermode.h"
class GrBinHashKeyBuilder;
-class GrGLEffect;
-struct ShaderCodeSegments;
+
+struct ShaderCodeSegments {
+ GrStringBuilder fVSUnis;
+ GrStringBuilder fVSAttrs;
+ GrStringBuilder fVaryings;
+ GrStringBuilder fFSUnis;
+ GrStringBuilder fVSCode;
+ GrStringBuilder fFSCode;
+};
/**
* This class manages a GPU program and records per-program information.
@@ -58,18 +65,6 @@
*/
bool genProgram(CachedData* programData) const;
- /**
- * Routine that is called before rendering. Sets-up all the state and
- * other initializations required for the Gpu Program to run.
- */
- bool doGLSetup(GrPrimitiveType type, CachedData* programData) const;
-
- /**
- * Routine that is called after rendering. Performs state restoration.
- * May perform secondary render passes.
- */
- void doGLPost() const;
-
static int PositionAttributeIdx() { return 0; }
static int TexCoordAttributeIdx(int tcIdx) { return 1 + tcIdx; }
static int ColorAttributeIdx() { return 1 + GrDrawTarget::kMaxTexCoords; }
@@ -177,36 +172,15 @@
class CachedData : public ::GrNoncopyable {
public:
CachedData() {
- GR_DEBUGCODE(fEffectUniCount = 0;)
- fEffectUniLocationsExtended = NULL;
}
~CachedData() {
- GrFree(fEffectUniLocationsExtended);
}
void copyAndTakeOwnership(CachedData& other) {
memcpy(this, &other, sizeof(*this));
- other.fEffectUniLocationsExtended = NULL; // ownership transfer
- GR_DEBUGCODE(other.fEffectUniCount = 0;)
}
- void setEffectUniformCount(size_t effectUniforms) {
- GR_DEBUGCODE(fEffectUniCount = effectUniforms;)
- GrFree(fEffectUniLocationsExtended);
- if (effectUniforms > kUniLocationPreAllocSize) {
- fEffectUniLocationsExtended = (GrGLint*)GrMalloc(sizeof(GrGLint)*(effectUniforms-kUniLocationPreAllocSize));
- } else {
- fEffectUniLocationsExtended = NULL;
- }
- }
-
- GrGLint& effectUniLocation(size_t index) {
- GrAssert(index < fEffectUniCount);
- return (index < kUniLocationPreAllocSize) ?
- fEffectUniLocations[index] :
- fEffectUniLocationsExtended[index - kUniLocationPreAllocSize];
- }
public:
@@ -236,13 +210,8 @@
kUniLocationPreAllocSize = 8
};
- GrGLint fEffectUniLocations[kUniLocationPreAllocSize];
- GrGLint* fEffectUniLocationsExtended;
- GR_DEBUGCODE(size_t fEffectUniCount;)
}; // CachedData
- GrGLEffect* fStageEffects[GrDrawTarget::kNumStages];
-
private:
enum {
kUseUniform = 2000