Index: gm/factory.cpp |
diff --git a/gm/factory.cpp b/gm/factory.cpp |
index 831cff0b9f90f693b6686288bc51ec77611575bb..dfecd167f9433937b99d5ff95ccc7c14518d417f 100644 |
--- a/gm/factory.cpp |
+++ b/gm/factory.cpp |
@@ -29,15 +29,15 @@ protected: |
void onOnceBeforeDraw() override { |
// Copyright-free file from http://openclipart.org/detail/29213/paper-plane-by-ddoo |
SkString pngFilename = GetResourcePath("plane.png"); |
- SkAutoDataUnref data(SkData::NewFromFileName(pngFilename.c_str())); |
- if (data.get()) { |
+ sk_sp<SkData> data(SkData::MakeFromFileName(pngFilename.c_str())); |
+ if (data) { |
// Create a cache which will boot the pixels out anytime the |
// bitmap is unlocked. |
SkAutoTUnref<SkDiscardableMemoryPool> pool( |
SkDiscardableMemoryPool::Create(1)); |
SkAssertResult(SkDEPRECATED_InstallDiscardablePixelRef( |
- SkImageGenerator::NewFromEncoded(data), |
- nullptr, &fBitmap, pool)); |
+ SkImageGenerator::NewFromEncoded(data.get()), |
+ nullptr, &fBitmap, pool)); |
} |
} |