aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PictureTest.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-13 12:32:36 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-13 12:32:36 -0700
commitce563cdd48ec7ce4e0420dd88760df9be9dba50c (patch)
tree8d247c8564cf2fa112f7d34d2c139ed6317fc9a8 /tests/PictureTest.cpp
parent94ad73ac1648fec5e73e29839d461ecb6366a888 (diff)
more shader-->sp conversions
Diffstat (limited to 'tests/PictureTest.cpp')
-rw-r--r--tests/PictureTest.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 448e079958..3654a77173 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -79,10 +79,9 @@ static void test_analysis(skiatest::Reporter* reporter) {
bitmap.allocPixels(SkImageInfo::MakeN32Premul(2, 2));
bitmap.eraseColor(SK_ColorBLUE);
*(bitmap.getAddr32(0, 0)) = SK_ColorGREEN;
- SkShader* shader = SkShader::CreateBitmapShader(bitmap, SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode);
- paint.setShader(shader)->unref();
- REPORTER_ASSERT(reporter, shader->isABitmap());
+ paint.setShader(SkShader::MakeBitmapShader(bitmap, SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode));
+ REPORTER_ASSERT(reporter, paint.getShader()->isABitmap());
canvas->drawRect(SkRect::MakeWH(10, 10), paint);
}
@@ -1389,7 +1388,7 @@ DEF_TEST(Picture_getRecordingCanvas, r) {
DEF_TEST(MiniRecorderLeftHanging, r) {
// Any shader or other ref-counted effect will do just fine here.
SkPaint paint;
- paint.setShader(SkShader::CreateColorShader(SK_ColorRED))->unref();
+ paint.setShader(SkShader::MakeColorShader(SK_ColorRED));
SkMiniRecorder rec;
REPORTER_ASSERT(r, rec.drawRect(SkRect::MakeWH(20,30), paint));