Index: src/effects/SkLightingImageFilter.cpp |
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp |
index ec33c2930c074eba0e7ad9b2e14e2cfaf0d5ef0e..206be1b62d847fdaa59b033e864f006538db9e6f 100644 |
--- a/src/effects/SkLightingImageFilter.cpp |
+++ b/src/effects/SkLightingImageFilter.cpp |
@@ -271,7 +271,7 @@ public: |
protected: |
explicit SkDiffuseLightingImageFilter(SkReadBuffer& buffer); |
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; |
- virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
+ virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; |
#if SK_SUPPORT_GPU |
virtual bool asNewEffect(GrEffectRef** effect, GrTexture*, const SkMatrix& matrix, const SkIRect& bounds) const SK_OVERRIDE; |
@@ -293,7 +293,7 @@ public: |
protected: |
explicit SkSpecularLightingImageFilter(SkReadBuffer& buffer); |
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; |
- virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
+ virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; |
#if SK_SUPPORT_GPU |
virtual bool asNewEffect(GrEffectRef** effect, GrTexture*, const SkMatrix& matrix, const SkIRect& bounds) const SK_OVERRIDE; |
@@ -933,13 +933,13 @@ void SkDiffuseLightingImageFilter::flatten(SkWriteBuffer& buffer) const { |
bool SkDiffuseLightingImageFilter::onFilterImage(Proxy* proxy, |
const SkBitmap& source, |
- const SkMatrix& ctm, |
+ const Context& ctx, |
SkBitmap* dst, |
SkIPoint* offset) const { |
SkImageFilter* input = getInput(0); |
SkBitmap src = source; |
SkIPoint srcOffset = SkIPoint::Make(0, 0); |
- if (input && !input->filterImage(proxy, source, ctm, &src, &srcOffset)) { |
+ if (input && !input->filterImage(proxy, source, ctx, &src, &srcOffset)) { |
return false; |
} |
@@ -954,7 +954,7 @@ bool SkDiffuseLightingImageFilter::onFilterImage(Proxy* proxy, |
SkIRect bounds; |
src.getBounds(&bounds); |
bounds.offset(srcOffset); |
- if (!this->applyCropRect(&bounds, ctm)) { |
+ if (!this->applyCropRect(&bounds, ctx.ctm())) { |
return false; |
} |
@@ -967,7 +967,7 @@ bool SkDiffuseLightingImageFilter::onFilterImage(Proxy* proxy, |
return false; |
} |
- SkAutoTUnref<SkLight> transformedLight(light()->transform(ctm)); |
+ SkAutoTUnref<SkLight> transformedLight(light()->transform(ctx.ctm())); |
DiffuseLightingType lightingType(fKD); |
offset->fX = bounds.left(); |
@@ -1026,13 +1026,13 @@ void SkSpecularLightingImageFilter::flatten(SkWriteBuffer& buffer) const { |
bool SkSpecularLightingImageFilter::onFilterImage(Proxy* proxy, |
const SkBitmap& source, |
- const SkMatrix& ctm, |
+ const Context& ctx, |
SkBitmap* dst, |
SkIPoint* offset) const { |
SkImageFilter* input = getInput(0); |
SkBitmap src = source; |
SkIPoint srcOffset = SkIPoint::Make(0, 0); |
- if (input && !input->filterImage(proxy, source, ctm, &src, &srcOffset)) { |
+ if (input && !input->filterImage(proxy, source, ctx, &src, &srcOffset)) { |
return false; |
} |
@@ -1047,7 +1047,7 @@ bool SkSpecularLightingImageFilter::onFilterImage(Proxy* proxy, |
SkIRect bounds; |
src.getBounds(&bounds); |
bounds.offset(srcOffset); |
- if (!this->applyCropRect(&bounds, ctm)) { |
+ if (!this->applyCropRect(&bounds, ctx.ctm())) { |
return false; |
} |
@@ -1065,7 +1065,7 @@ bool SkSpecularLightingImageFilter::onFilterImage(Proxy* proxy, |
offset->fX = bounds.left(); |
offset->fY = bounds.top(); |
bounds.offset(-srcOffset); |
- SkAutoTUnref<SkLight> transformedLight(light()->transform(ctm)); |
+ SkAutoTUnref<SkLight> transformedLight(light()->transform(ctx.ctm())); |
switch (transformedLight->type()) { |
case SkLight::kDistant_LightType: |
lightBitmap<SpecularLightingType, SkDistantLight>(lightingType, transformedLight, src, dst, surfaceScale(), bounds); |