Index: tests/SerializationTest.cpp |
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp |
index 95067298d03c05c8f1616211bcc32e31f12268c4..7b2914a1cbeac8eed286836ce15152b577d11a96 100644 |
--- a/tests/SerializationTest.cpp |
+++ b/tests/SerializationTest.cpp |
@@ -205,14 +205,15 @@ static void TestBitmapSerialization(const SkBitmap& validBitmap, |
const SkBitmap& invalidBitmap, |
bool shouldSucceed, |
skiatest::Reporter* reporter) { |
- SkBitmapSource validBitmapSource(validBitmap); |
- SkBitmapSource invalidBitmapSource(invalidBitmap); |
+ SkAutoTUnref<SkBitmapSource> validBitmapSource(SkBitmapSource::Create(validBitmap)); |
+ SkAutoTUnref<SkBitmapSource> invalidBitmapSource(SkBitmapSource::Create(invalidBitmap)); |
SkAutoTUnref<SkXfermode> mode(SkXfermode::Create(SkXfermode::kSrcOver_Mode)); |
- SkXfermodeImageFilter xfermodeImageFilter(mode, &invalidBitmapSource, &validBitmapSource); |
+ SkAutoTUnref<SkXfermodeImageFilter> xfermodeImageFilter( |
+ SkXfermodeImageFilter::Create(mode, invalidBitmapSource, validBitmapSource)); |
SkAutoTUnref<SkImageFilter> deserializedFilter( |
TestFlattenableSerialization<SkImageFilter>( |
- &xfermodeImageFilter, shouldSucceed, reporter)); |
+ xfermodeImageFilter, shouldSucceed, reporter)); |
// Try to render a small bitmap using the invalid deserialized filter |
// to make sure we don't crash while trying to render it |