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

Unified Diff: gm/matrixconvolution.cpp

Issue 1497083005: Revert of Matrix convolution bounds fix; affectsTransparentBlack fixes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | include/core/SkImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/matrixconvolution.cpp
diff --git a/gm/matrixconvolution.cpp b/gm/matrixconvolution.cpp
index 3b159f455bd084df5255f3b4dcff62ad01d46030..6d16f8dfa74df4f5e92a93c176f8e527a1375f67 100644
--- a/gm/matrixconvolution.cpp
+++ b/gm/matrixconvolution.cpp
@@ -86,22 +86,21 @@
void onDraw(SkCanvas* canvas) override {
canvas->clear(SK_ColorBLACK);
SkIPoint kernelOffset = SkIPoint::Make(1, 0);
- SkImageFilter::CropRect rect(SkRect::Make(fBitmap.bounds()));
for (int x = 10; x < 310; x += 100) {
- this->draw(canvas, x, 10, kernelOffset, MCIF::kClamp_TileMode, true, &rect);
- this->draw(canvas, x, 110, kernelOffset, MCIF::kClampToBlack_TileMode, true, &rect);
- this->draw(canvas, x, 210, kernelOffset, MCIF::kRepeat_TileMode, true, &rect);
+ this->draw(canvas, x, 10, kernelOffset, MCIF::kClamp_TileMode, true);
+ this->draw(canvas, x, 110, kernelOffset, MCIF::kClampToBlack_TileMode, true);
+ this->draw(canvas, x, 210, kernelOffset, MCIF::kRepeat_TileMode, true);
kernelOffset.fY++;
}
kernelOffset.fY = 1;
- SkImageFilter::CropRect smallRect(SkRect::MakeXYWH(10, 5, 60, 60));
- this->draw(canvas, 310, 10, kernelOffset, MCIF::kClamp_TileMode, true, &smallRect);
- this->draw(canvas, 310, 110, kernelOffset, MCIF::kClampToBlack_TileMode, true, &smallRect);
- this->draw(canvas, 310, 210, kernelOffset, MCIF::kRepeat_TileMode, true, &smallRect);
+ SkImageFilter::CropRect rect(SkRect::MakeXYWH(10, 5, 60, 60));
+ this->draw(canvas, 310, 10, kernelOffset, MCIF::kClamp_TileMode, true, &rect);
+ this->draw(canvas, 310, 110, kernelOffset, MCIF::kClampToBlack_TileMode, true, &rect);
+ this->draw(canvas, 310, 210, kernelOffset, MCIF::kRepeat_TileMode, true, &rect);
- this->draw(canvas, 410, 10, kernelOffset, MCIF::kClamp_TileMode, false, &rect);
- this->draw(canvas, 410, 110, kernelOffset, MCIF::kClampToBlack_TileMode, false, &rect);
- this->draw(canvas, 410, 210, kernelOffset, MCIF::kRepeat_TileMode, false, &rect);
+ this->draw(canvas, 410, 10, kernelOffset, MCIF::kClamp_TileMode, false);
+ this->draw(canvas, 410, 110, kernelOffset, MCIF::kClampToBlack_TileMode, false);
+ this->draw(canvas, 410, 210, kernelOffset, MCIF::kRepeat_TileMode, false);
}
private:
« no previous file with comments | « no previous file | include/core/SkImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698