diff options
Diffstat (limited to 'gm')
-rw-r--r-- | gm/annotated_text.cpp | 4 | ||||
-rw-r--r-- | gm/factory.cpp | 8 | ||||
-rw-r--r-- | gm/internal_links.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/gm/annotated_text.cpp b/gm/annotated_text.cpp index 30f67b0201..70ee9f3de1 100644 --- a/gm/annotated_text.cpp +++ b/gm/annotated_text.cpp @@ -16,8 +16,8 @@ static void draw_url_annotated_text_with_box( SkRect bounds; (void)paint.measureText(text, byteLength, &bounds); bounds.offset(x, y); - SkAutoTUnref<SkData> urlData(SkData::NewWithCString(url)); - SkAnnotateRectWithURL(canvas, bounds, urlData); + sk_sp<SkData> urlData(SkData::MakeWithCString(url)); + SkAnnotateRectWithURL(canvas, bounds, urlData.get()); SkPaint shade; shade.setColor(0x80346180); canvas->drawRect(bounds, shade); diff --git a/gm/factory.cpp b/gm/factory.cpp index 831cff0b9f..dfecd167f9 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)); } } diff --git a/gm/internal_links.cpp b/gm/internal_links.cpp index 995cd69d42..6d70c1ef98 100644 --- a/gm/internal_links.cpp +++ b/gm/internal_links.cpp @@ -32,7 +32,7 @@ protected: } virtual void onDraw(SkCanvas* canvas) { - SkAutoTUnref<SkData> name(SkData::NewWithCString("target-a")); + sk_sp<SkData> name(SkData::MakeWithCString("target-a")); canvas->save(); canvas->translate(SkIntToScalar(100), SkIntToScalar(100)); |