Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: src/effects/SkBlurImageFilter.cpp

Issue 1407133019: Revert of Make SkBlurImageFilter capable of cropping during blur (GPU path). (Closed) Base URL: senorblanco-linux.mon:src/skia@blur-applyCropRect4-separate-loops
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurImageFilter.cpp
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index 928793de62fcf0b2013af246a197a1193cf76a40..3f4c852c12b887e7316bbd4129124d0ca332a83b 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -205,30 +205,28 @@
if (!this->filterInputGPU(0, proxy, src, ctx, &input, &srcOffset)) {
return false;
}
- SkIRect srcBounds, dstBounds;
- if (!this->applyCropRect(ctx, input, srcOffset, &dstBounds, &srcBounds)) {
+ SkIRect rect;
+ if (!this->applyCropRect(ctx, proxy, input, &srcOffset, &rect, &input)) {
return false;
}
GrTexture* source = input.getTexture();
SkVector sigma = mapSigma(fSigma, ctx.ctm());
- offset->fX = dstBounds.fLeft;
- offset->fY = dstBounds.fTop;
- srcBounds.offset(-srcOffset);
- dstBounds.offset(-srcOffset);
- SkRect srcBoundsF(SkRect::Make(srcBounds));
+ offset->fX = rect.fLeft;
+ offset->fY = rect.fTop;
+ rect.offset(-srcOffset);
auto constraint = GrTextureProvider::FromImageFilter(ctx.sizeConstraint());
SkAutoTUnref<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(source->getContext(),
source,
false,
- SkRect::Make(dstBounds),
- &srcBoundsF,
+ SkRect::Make(rect),
+ true,
sigma.x(),
sigma.y(),
constraint));
if (!tex) {
return false;
}
- WrapTexture(tex, dstBounds.width(), dstBounds.height(), result);
+ WrapTexture(tex, rect.width(), rect.height(), result);
return true;
#else
SkDEBUGFAIL("Should not call in GPU-less build");
« no previous file with comments | « no previous file | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698