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

Unified Diff: third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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
Index: third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp
diff --git a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp
index 7f7c5744c6ecfc23c242710a9b8c4a64d3b44452..2c236ac467ccce55bb4875da8e7aa26bfb65c7bf 100644
--- a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp
+++ b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp
@@ -35,7 +35,7 @@ void ImageBitmapRenderingContext::transferFromImageBitmap(ImageBitmap* imageBitm
if (!m_image)
return;
- RefPtr<SkImage> skImage = m_image->imageForCurrentFrame();
+ sk_sp<SkImage> skImage = m_image->imageForCurrentFrame();
if (skImage->isTextureBacked()) {
// TODO(junov): crbug.com/585607 Eliminate this readback and use an ExternalTextureLayer
sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(skImage->width(), skImage->height());
@@ -44,8 +44,8 @@ void ImageBitmapRenderingContext::transferFromImageBitmap(ImageBitmap* imageBitm
m_image.clear();
return;
}
- surface->getCanvas()->drawImage(skImage.get(), 0, 0);
- m_image = StaticBitmapImage::create(fromSkSp(surface->makeImageSnapshot()));
+ surface->getCanvas()->drawImage(skImage, 0, 0);
+ m_image = StaticBitmapImage::create(surface->makeImageSnapshot());
}
canvas()->didDraw(FloatRect(FloatPoint(), FloatSize(m_image->width(), m_image->height())));
}

Powered by Google App Engine
This is Rietveld 408576698