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

Unified Diff: gm/imagefiltersbase.cpp

Issue 1534443003: remove drawSprite from canvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: really tired of unused variable warnings 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
Index: gm/imagefiltersbase.cpp
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp
index 0101a9c2a042816f2237874ccf1a15da4ea7f2b4..fbe4681da4276af5aa3a9616649dda78f4e033c1 100644
--- a/gm/imagefiltersbase.cpp
+++ b/gm/imagefiltersbase.cpp
@@ -165,26 +165,6 @@ static void draw_bitmap(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) {
canvas->drawBitmap(bm, 0, 0, &paint);
}
-static void draw_sprite(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) {
- SkPaint paint;
- paint.setImageFilter(imf);
-
- SkIRect bounds;
- r.roundOut(&bounds);
-
- SkBitmap bm;
- bm.allocN32Pixels(bounds.width(), bounds.height());
- bm.eraseColor(SK_ColorTRANSPARENT);
- SkCanvas c(bm);
- draw_path(&c, r, nullptr);
-
- SkPoint loc = { r.fLeft, r.fTop };
- canvas->getTotalMatrix().mapPoints(&loc, 1);
- canvas->drawSprite(bm,
- SkScalarRoundToInt(loc.fX), SkScalarRoundToInt(loc.fY),
- &paint);
-}
-
///////////////////////////////////////////////////////////////////////////////
class ImageFiltersBaseGM : public skiagm::GM {
@@ -210,7 +190,6 @@ protected:
draw_paint,
draw_line, draw_rect, draw_path, draw_text,
draw_bitmap,
- draw_sprite
};
SkColorFilter* cf = SkColorFilter::CreateModeFilter(SK_ColorRED,

Powered by Google App Engine
This is Rietveld 408576698