Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1471)

Unified Diff: content/renderer/pepper/ppb_image_data_impl.cc

Issue 1862693002: Replace skia::RefPtr with sk_sp<> in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unget Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/ppb_image_data_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/ppb_image_data_impl.cc
diff --git a/content/renderer/pepper/ppb_image_data_impl.cc b/content/renderer/pepper/ppb_image_data_impl.cc
index e1f169f62052c958859be39281dd11b05e5ec6e1..4756cfd4b93f656d86cb5c3d33eafbd62212f50a 100644
--- a/content/renderer/pepper/ppb_image_data_impl.cc
+++ b/content/renderer/pepper/ppb_image_data_impl.cc
@@ -172,7 +172,7 @@ void* ImageDataPlatformBackend::Map() {
if (!mapped_canvas_) {
const bool is_opaque = false;
mapped_canvas_ =
- skia::AdoptRef(dib_->GetPlatformCanvas(width_, height_, is_opaque));
+ sk_sp<SkCanvas>(dib_->GetPlatformCanvas(width_, height_, is_opaque));
if (!mapped_canvas_)
return NULL;
}
@@ -242,7 +242,7 @@ void* ImageDataSimpleBackend::Map() {
skia_bitmap_.setPixels(shared_memory_->memory());
// Our platform bitmaps are set to opaque by default, which we don't want.
skia_bitmap_.setAlphaType(kPremul_SkAlphaType);
- skia_canvas_ = skia::AdoptRef(new SkCanvas(skia_bitmap_));
+ skia_canvas_ = sk_make_sp<SkCanvas>(skia_bitmap_);
return skia_bitmap_.getAddr32(0, 0);
}
return shared_memory_->memory();
« no previous file with comments | « content/renderer/pepper/ppb_image_data_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698