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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.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/platform/graphics/gpu/WebGLImageConversion.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
index 15dca38be87fafb4af5eba171a85834b7f2a42f3..1c9f96e532da3d5f818e6f6ede469e191bfa5f24 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
@@ -2137,7 +2137,7 @@ void WebGLImageConversion::ImageExtractor::extractImage(bool premultiplyAlpha, b
if (!m_image)
return;
- RefPtr<SkImage> skiaImage = m_image->imageForCurrentFrame();
+ sk_sp<SkImage> skiaImage = m_image->imageForCurrentFrame();
SkImageInfo info = skiaImage
? SkImageInfo::MakeN32Premul(m_image->width(), m_image->height())
: SkImageInfo::MakeUnknown();
@@ -2163,7 +2163,7 @@ void WebGLImageConversion::ImageExtractor::extractImage(bool premultiplyAlpha, b
// only immutable/fully decoded frames make it through. We could potentially relax this
// and allow SkImage::NewFromBitmap to make a copy.
ASSERT(bitmap.isImmutable());
- skiaImage = fromSkSp(SkImage::MakeFromBitmap(bitmap));
+ skiaImage = SkImage::MakeFromBitmap(bitmap);
info = bitmap.info();
if (hasAlpha && premultiplyAlpha)
@@ -2191,7 +2191,7 @@ void WebGLImageConversion::ImageExtractor::extractImage(bool premultiplyAlpha, b
if (m_imageWidth != (unsigned)m_image->width() || m_imageHeight != (unsigned)m_image->height())
return;
- m_imagePixelLocker.emplace(skiaImage, info.alphaType(), kN32_SkColorType);
+ m_imagePixelLocker.emplace(std::move(skiaImage), info.alphaType(), kN32_SkColorType);
}
unsigned WebGLImageConversion::getChannelBitsByFormat(GLenum format)

Powered by Google App Engine
This is Rietveld 408576698