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

Unified Diff: gm/tileimagefilter.cpp

Issue 1570133003: Fix SkTileImageFilter when srcRect is a superset of bitmap bounds. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix 100-col issues Created 4 years, 11 months 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/tileimagefilter.cpp
diff --git a/gm/tileimagefilter.cpp b/gm/tileimagefilter.cpp
index 10086c9c17ed734fd9abf113c9c15725b8d39eaa..eb0ad09f4be4cbfa6015532ee67ccd78d8b38e8e 100644
--- a/gm/tileimagefilter.cpp
+++ b/gm/tileimagefilter.cpp
@@ -47,6 +47,12 @@ protected:
void onDraw(SkCanvas* canvas) override {
canvas->clear(SK_ColorBLACK);
+ SkPaint red;
+ red.setColor(SK_ColorRED);
+ red.setStyle(SkPaint::kStroke_Style);
+ SkPaint blue;
+ blue.setColor(SK_ColorBLUE);
+ blue.setStyle(SkPaint::kStroke_Style);
int x = 0, y = 0;
for (size_t i = 0; i < 4; i++) {
@@ -67,6 +73,8 @@ protected:
SkPaint paint;
paint.setImageFilter(filter);
canvas->drawImage(fBitmap, 0, 0, &paint);
+ canvas->drawRect(srcRect, red);
+ canvas->drawRect(dstRect, blue);
canvas->restore();
x += image->width() + MARGIN;
if (x + image->width() > WIDTH) {
@@ -96,6 +104,8 @@ protected:
canvas->saveLayer(&dstRect, &paint);
canvas->drawImage(fBitmap, 0, 0);
canvas->restore();
+ canvas->drawRect(srcRect, red);
+ canvas->drawRect(dstRect, blue);
canvas->restore();
}
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