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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.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/DrawingBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index b2c395f6d3d97a31fead115ea742925035837f99..296bf56de55d410e15cdfd99629e34b80dfe989d 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -428,7 +428,7 @@ PassRefPtr<StaticBitmapImage> DrawingBuffer::transferToStaticBitmapImage()
// If we can't get a mailbox, return an transparent black ImageBitmap.
// The only situation this could happen is when two or more calls to transferToImageBitmap are made back-to-back, or when the context gets lost.
sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(m_size.width(), m_size.height());
- return StaticBitmapImage::create(fromSkSp(surface->makeImageSnapshot()));
+ return StaticBitmapImage::create(surface->makeImageSnapshot());
}
DCHECK_EQ(m_size.width(), textureMailbox.size_in_pixels().width());
@@ -471,7 +471,7 @@ PassRefPtr<StaticBitmapImage> DrawingBuffer::transferToStaticBitmapImage()
// TODO(xidachen): Create a small pool of recycled textures from ImageBitmapRenderingContext's
// transferFromImageBitmap, and try to use them in DrawingBuffer.
- return AcceleratedStaticBitmapImage::create(fromSkSp(skImage), grContextRef, skImageMailbox, skImageSyncToken);
+ return AcceleratedStaticBitmapImage::create(std::move(skImage), grContextRef, skImageMailbox, skImageSyncToken);
}
DrawingBuffer::TextureParameters DrawingBuffer::chromiumImageTextureParameters()

Powered by Google App Engine
This is Rietveld 408576698