Index: cc/resources/ui_resource_bitmap.cc |
diff --git a/cc/resources/ui_resource_bitmap.cc b/cc/resources/ui_resource_bitmap.cc |
index b7b931256f151e6593d79dd2522c13e4237f73b6..c7d5d716fef3c044554daff2cc3dc39a59783f7c 100644 |
--- a/cc/resources/ui_resource_bitmap.cc |
+++ b/cc/resources/ui_resource_bitmap.cc |
@@ -35,7 +35,7 @@ UIResourceBitmap::UIResourceFormat SkColorTypeToUIResourceFormat( |
} // namespace |
-void UIResourceBitmap::Create(const skia::RefPtr<SkPixelRef>& pixel_ref, |
+void UIResourceBitmap::Create(const sk_sp<SkPixelRef>& pixel_ref, |
const gfx::Size& size, |
UIResourceFormat format) { |
DCHECK(size.width()); |
@@ -54,7 +54,7 @@ UIResourceBitmap::UIResourceBitmap(const SkBitmap& skbitmap) { |
DCHECK_EQ(skbitmap.width(), skbitmap.rowBytesAsPixels()); |
DCHECK(skbitmap.isImmutable()); |
- skia::RefPtr<SkPixelRef> pixel_ref = skia::SharePtr(skbitmap.pixelRef()); |
+ sk_sp<SkPixelRef> pixel_ref = sk_ref_sp(skbitmap.pixelRef()); |
const SkImageInfo& info = pixel_ref->info(); |
Create(pixel_ref, gfx::Size(info.width(), info.height()), |
SkColorTypeToUIResourceFormat(skbitmap.colorType())); |
@@ -66,14 +66,14 @@ UIResourceBitmap::UIResourceBitmap(const gfx::Size& size, bool is_opaque) { |
SkAlphaType alphaType = is_opaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType; |
SkImageInfo info = |
SkImageInfo::MakeN32(size.width(), size.height(), alphaType); |
- skia::RefPtr<SkPixelRef> pixel_ref = skia::AdoptRef( |
+ sk_sp<SkPixelRef> pixel_ref( |
SkMallocPixelRef::NewAllocate(info, info.minRowBytes(), NULL)); |
pixel_ref->setImmutable(); |
Create(pixel_ref, size, UIResourceBitmap::RGBA8); |
SetOpaque(is_opaque); |
} |
-UIResourceBitmap::UIResourceBitmap(const skia::RefPtr<SkPixelRef>& pixel_ref, |
+UIResourceBitmap::UIResourceBitmap(const sk_sp<SkPixelRef>& pixel_ref, |
const gfx::Size& size) { |
Create(pixel_ref, size, UIResourceBitmap::ETC1); |
danakj
2016/04/14 19:37:32
move
tomhudson
2016/04/25 20:48:13
Done.
|
} |