diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-05 16:53:50 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-05 16:53:50 +0000 |
commit | 1aa54bf6696afc7d06fc8ecc63dad2840a4d6179 (patch) | |
tree | 6f1b09fd64bd228ab21be8faf6c7ff36d2c99e11 /src/core | |
parent | a27622c18de99fdb2c68e23b01006d3aa2bd1699 (diff) |
Added ctm matrix to GPU path
There should be no changes in behavior caused by this cl, it just adds the ctm matrix to filterImageGPU so that it may be used for scaling on all platforms when it is implemented on the blink side.
BUG=
R=senorblanco@google.com, senorblanco@chromium.org
Author: sugoi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/22209002
git-svn-id: http://skia.googlecode.com/svn/trunk@10536 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkImageFilter.cpp | 6 | ||||
-rw-r--r-- | src/core/SkImageFilterUtils.cpp | 10 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp index f37a220a39..222a029997 100644 --- a/src/core/SkImageFilter.cpp +++ b/src/core/SkImageFilter.cpp @@ -105,12 +105,12 @@ bool SkImageFilter::canFilterImageGPU() const { return this->asNewEffect(NULL, NULL, SkIPoint::Make(0, 0)); } -bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, SkBitmap* result, - SkIPoint* offset) { +bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const SkMatrix& ctm, + SkBitmap* result, SkIPoint* offset) { #if SK_SUPPORT_GPU SkBitmap input; SkASSERT(fInputCount == 1); - if (!SkImageFilterUtils::GetInputResultGPU(this->getInput(0), proxy, src, &input, offset)) { + if (!SkImageFilterUtils::GetInputResultGPU(this->getInput(0), proxy, src, ctm, &input, offset)) { return false; } GrTexture* srcTexture = input.getTexture(); diff --git a/src/core/SkImageFilterUtils.cpp b/src/core/SkImageFilterUtils.cpp index 0680ccf45a..a4ce51eb91 100644 --- a/src/core/SkImageFilterUtils.cpp +++ b/src/core/SkImageFilterUtils.cpp @@ -21,17 +21,15 @@ bool SkImageFilterUtils::WrapTexture(GrTexture* texture, int width, int height, } bool SkImageFilterUtils::GetInputResultGPU(SkImageFilter* filter, SkImageFilter::Proxy* proxy, - const SkBitmap& src, SkBitmap* result, - SkIPoint* offset) { + const SkBitmap& src, const SkMatrix& ctm, + SkBitmap* result, SkIPoint* offset) { if (!filter) { *result = src; return true; } else if (filter->canFilterImageGPU()) { - return filter->filterImageGPU(proxy, src, result, offset); + return filter->filterImageGPU(proxy, src, ctm, result, offset); } else { - SkMatrix matrix; - matrix.reset(); - if (filter->filterImage(proxy, src, matrix, result, offset)) { + if (filter->filterImage(proxy, src, ctm, result, offset)) { if (!result->getTexture()) { GrContext* context = ((GrTexture *) src.getTexture())->getContext(); GrTexture* resultTex = GrLockAndRefCachedBitmapTexture(context, |