Some refactoring of GrCustomStage and friends
Review URL: http://codereview.appspot.com/6209071/
git-svn-id: http://skia.googlecode.com/svn/trunk@4003 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGLShaders.cpp b/src/gpu/gl/GrGpuGLShaders.cpp
index d32c57e..08cfaf7 100644
--- a/src/gpu/gl/GrGpuGLShaders.cpp
+++ b/src/gpu/gl/GrGpuGLShaders.cpp
@@ -302,7 +302,7 @@
(GrSamplerState::FilterDirection)direction,
stage.fKernelWidth, kernel);
stage.fCustomStageKey =
- customStages[s]->getFactory()->stageKey(customStages[s]);
+ customStages[s]->getFactory().stageKey(customStages[s]);
}
}
CachedData cachedData;
@@ -933,8 +933,8 @@
GrGLProgram* program, int index) {
GrCustomStage* customStage = sampler.getCustomStage();
if (customStage) {
- GrProgramStageFactory* factory = customStage->getFactory();
- stage->fCustomStageKey = factory->stageKey(customStage);
+ const GrProgramStageFactory& factory = customStage->getFactory();
+ stage->fCustomStageKey = factory.stageKey(customStage);
customStages[index] = customStage;
} else {
stage->fCustomStageKey = 0;