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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 1855273002: Update new Surface callsites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: software_output_device was indirectly including skia::refptr, switch to sk_sp<> 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
Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index e9e1a28f2b7a0f01ffa819be4c9ccd386984d78b..03aed594ebe1ccbb56e744bf9fdb46ce227b05d7 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -126,7 +126,7 @@ bool canCreateImageBuffer(const IntSize& size)
PassRefPtr<Image> createTransparentImage(const IntSize& size)
{
ASSERT(canCreateImageBuffer(size));
- RefPtr<SkSurface> surface = adoptRef(SkSurface::NewRasterN32Premul(size.width(), size.height()));
+ sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(size.width(), size.height());
surface->getCanvas()->clear(SK_ColorTRANSPARENT);
return StaticBitmapImage::create(adoptRef(surface->newImageSnapshot()));
}

Powered by Google App Engine
This is Rietveld 408576698