Index: src/core/SkLightingShader.cpp |
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp |
index a1a09b7491570d349296ce1ae679c715214b38e9..5b9277a57697b615315a4a80fb3bdd7a80934820 100644 |
--- a/src/core/SkLightingShader.cpp |
+++ b/src/core/SkLightingShader.cpp |
@@ -76,7 +76,8 @@ public: |
const GrFragmentProcessor* asFragmentProcessor(GrContext*, |
const SkMatrix& viewM, |
const SkMatrix* localMatrix, |
- SkFilterQuality) const override; |
+ SkFilterQuality, |
+ GrRenderTarget* dst) const override; |
#endif |
size_t contextSize() const override; |
@@ -142,11 +143,11 @@ public: |
LightingFP(GrTexture* diffuse, GrTexture* normal, const SkMatrix& diffMatrix, |
const SkMatrix& normMatrix, const GrTextureParams& diffParams, |
const GrTextureParams& normParams, const SkLightingShader::Lights* lights, |
- const SkVector& invNormRotation) |
+ const SkVector& invNormRotation, GrRenderTarget* dst) |
: fDiffDeviceTransform(kLocal_GrCoordSet, diffMatrix, diffuse, diffParams.filterMode()) |
, fNormDeviceTransform(kLocal_GrCoordSet, normMatrix, normal, normParams.filterMode()) |
- , fDiffuseTextureAccess(diffuse, diffParams) |
- , fNormalTextureAccess(normal, normParams) |
+ , fDiffuseTextureAccess(diffuse, diffParams, dst) |
+ , fNormalTextureAccess(normal, normParams, dst) |
, fInvNormRotation(invNormRotation) { |
this->addCoordTransform(&fDiffDeviceTransform); |
this->addCoordTransform(&fNormDeviceTransform); |
@@ -351,7 +352,8 @@ const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor( |
GrContext* context, |
const SkMatrix& viewM, |
const SkMatrix* localMatrix, |
- SkFilterQuality filterQuality) const { |
+ SkFilterQuality filterQuality, |
+ GrRenderTarget* dst) const { |
// we assume diffuse and normal maps have same width and height |
// TODO: support different sizes |
SkASSERT(fDiffuseMap.width() == fNormalMap.width() && |
@@ -400,7 +402,7 @@ const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor( |
SkAutoTUnref<const GrFragmentProcessor> inner ( |
new LightingFP(diffuseTexture, normalTexture, diffM, normM, diffParams, normParams, fLights, |
- fInvNormRotation)); |
+ fInvNormRotation, dst)); |
return GrFragmentProcessor::MulOutputByInputAlpha(inner); |
} |