Index: tests/PictureTest.cpp |
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp |
index 3654a77173e9fcd1e872d22c1b47dbba2e727f10..448e079958ef5a01444fc0c5a9b009c16325b27e 100644 |
--- a/tests/PictureTest.cpp |
+++ b/tests/PictureTest.cpp |
@@ -79,9 +79,10 @@ |
bitmap.allocPixels(SkImageInfo::MakeN32Premul(2, 2)); |
bitmap.eraseColor(SK_ColorBLUE); |
*(bitmap.getAddr32(0, 0)) = SK_ColorGREEN; |
- paint.setShader(SkShader::MakeBitmapShader(bitmap, SkShader::kClamp_TileMode, |
- SkShader::kClamp_TileMode)); |
- REPORTER_ASSERT(reporter, paint.getShader()->isABitmap()); |
+ SkShader* shader = SkShader::CreateBitmapShader(bitmap, SkShader::kClamp_TileMode, |
+ SkShader::kClamp_TileMode); |
+ paint.setShader(shader)->unref(); |
+ REPORTER_ASSERT(reporter, shader->isABitmap()); |
canvas->drawRect(SkRect::MakeWH(10, 10), paint); |
} |
@@ -1388,7 +1389,7 @@ |
DEF_TEST(MiniRecorderLeftHanging, r) { |
// Any shader or other ref-counted effect will do just fine here. |
SkPaint paint; |
- paint.setShader(SkShader::MakeColorShader(SK_ColorRED)); |
+ paint.setShader(SkShader::CreateColorShader(SK_ColorRED))->unref(); |
SkMiniRecorder rec; |
REPORTER_ASSERT(r, rec.drawRect(SkRect::MakeWH(20,30), paint)); |