Allow GrEffects with multiple textures.
It will work as long as the total number of textures sis less than GrDrawState::kNumStages. That will be fixed in a follow up CL.
Review URL: https://codereview.appspot.com/7040052
git-svn-id: http://skia.googlecode.com/svn/trunk@7023 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index 33834cf..97b95d0 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -36,6 +36,11 @@
return fGLContextInfo.glslGeneration();
}
+ // Used by GrGLProgram to bind necessary textures for GrGLEffects.
+ void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* texture);
+
+ bool programUnitTest();
+
// GrGpu overrides
virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig config)
const SK_OVERRIDE;
@@ -51,9 +56,6 @@
virtual void abandonResources() SK_OVERRIDE;
- bool programUnitTest();
-
-
protected:
// GrGpu overrides
virtual void onResetContext() SK_OVERRIDE;
@@ -196,16 +198,6 @@
const GrGLContextInfo& fGL;
};
- // binds the texture and sets its texture params
- // This may also perform a downsample on the src texture which may or may
- // not modify the scissor test and rect. So in flushGraphicsState a
- // call to flushScissor must occur after all textures have been flushed via
- // this function.
- void flushBoundTextureAndParams(int stage);
- void flushBoundTextureAndParams(int stage,
- const GrTextureParams& params,
- GrGLTexture* nextTexture);
-
// sets the color specified by GrDrawState::setColor()
void flushColor(GrColor color);