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

Unified Diff: tests/ImageFilterTest.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: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 6a6a7a92d645ac56bcb6d3e702cbf4c5e89a237e..1bf8cbdb736962aec6104b1e3dcaa35d90cd50d8 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -977,7 +977,7 @@ static void test_huge_blur(SkCanvas* canvas, skiatest::Reporter* reporter) {
SkPaint paint;
paint.setImageFilter(blur);
- canvas->drawSprite(bitmap, 0, 0, &paint);
+ canvas->drawBitmap(bitmap, 0, 0, &paint);
}
DEF_TEST(HugeBlurImageFilter, reporter) {
@@ -1067,7 +1067,7 @@ static void test_xfermode_cropped_input(SkCanvas* canvas, skiatest::Reporter* re
SkPaint paint;
paint.setImageFilter(xfermodeNoFg);
- canvas->drawSprite(bitmap, 0, 0, &paint);
+ canvas->drawBitmap(bitmap, 0, 0, &paint); // drawSprite
uint32_t pixel;
SkImageInfo info = SkImageInfo::Make(1, 1, kBGRA_8888_SkColorType, kUnpremul_SkAlphaType);
@@ -1075,12 +1075,12 @@ static void test_xfermode_cropped_input(SkCanvas* canvas, skiatest::Reporter* re
REPORTER_ASSERT(reporter, pixel == SK_ColorGREEN);
paint.setImageFilter(xfermodeNoBg);
- canvas->drawSprite(bitmap, 0, 0, &paint);
+ canvas->drawBitmap(bitmap, 0, 0, &paint); // drawSprite
canvas->readPixels(info, &pixel, 4, 0, 0);
REPORTER_ASSERT(reporter, pixel == SK_ColorGREEN);
paint.setImageFilter(xfermodeNoFgNoBg);
- canvas->drawSprite(bitmap, 0, 0, &paint);
+ canvas->drawBitmap(bitmap, 0, 0, &paint); // drawSprite
canvas->readPixels(info, &pixel, 4, 0, 0);
REPORTER_ASSERT(reporter, pixel == SK_ColorGREEN);
}
@@ -1128,7 +1128,7 @@ DEF_TEST(ImageFilterNestedSaveLayer, reporter) {
canvas.clear(0x0);
canvas.readPixels(info, &pixel, 4, 25, 25);
canvas.saveLayer(&bounds1, nullptr);
- canvas.drawSprite(bitmap, 20, 20, &filterPaint);
+ canvas.drawBitmap(bitmap, 20, 20, &filterPaint); // drawSprite
canvas.restore();
canvas.readPixels(info, &pixel, 4, 25, 25);

Powered by Google App Engine
This is Rietveld 408576698