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/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index e576163..755a2f8 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -629,10 +629,10 @@
}
if (NULL != customStages[s]) {
- GrProgramStageFactory* factory =
+ const GrProgramStageFactory& factory =
customStages[s]->getFactory();
programData->fCustomStage[s] =
- factory->createGLInstance(customStages[s]);
+ factory.createGLInstance(customStages[s]);
}
this->genStageCode(gl,
s,
@@ -755,10 +755,10 @@
}
if (NULL != customStages[s]) {
- GrProgramStageFactory* factory =
+ const GrProgramStageFactory& factory =
customStages[s]->getFactory();
programData->fCustomStage[s] =
- factory->createGLInstance(customStages[s]);
+ factory.createGLInstance(customStages[s]);
}
this->genStageCode(gl, s,
fProgramDesc.fStages[s],