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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « src/pdf/SkPDFDevice.h ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 66048ff751f0210418d411043d4a3f3b09326037..9ab3b0d7e05c2450785c2e6889645e938fbbcee3 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1412,8 +1412,8 @@ void SkPDFDevice::onDetachFromCanvas() {
fClipStack = nullptr;
}
-SkSurface* SkPDFDevice::newSurface(const SkImageInfo& info, const SkSurfaceProps& props) {
- return SkSurface::NewRaster(info, &props);
+sk_sp<SkSurface> SkPDFDevice::makeSurface(const SkImageInfo& info, const SkSurfaceProps& props) {
+ return SkSurface::MakeRaster(info, &props);
}
ContentEntry* SkPDFDevice::getLastContentEntry() {
@@ -2115,8 +2115,7 @@ static SkSize rect_to_size(const SkRect& r) {
}
static const SkImage* color_filter(const SkImage* image, SkColorFilter* colorFilter) {
- sk_sp<SkSurface> surface(SkSurface::NewRaster(
- SkImageInfo::MakeN32Premul(image->dimensions())));
+ auto surface(SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(image->dimensions())));
if (!surface) {
return image;
}
@@ -2194,8 +2193,7 @@ void SkPDFDevice::internalDrawImage(const SkMatrix& origMatrix,
SkISize wh = rect_to_size(physicalPerspectiveBounds).toCeil();
- sk_sp<SkSurface> surface(
- SkSurface::NewRaster(SkImageInfo::MakeN32Premul(wh)));
+ auto surface(SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(wh)));
if (!surface) {
return;
}
« no previous file with comments | « src/pdf/SkPDFDevice.h ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698