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

Unified Diff: cmake/example.cpp

Issue 1897453002: exernalize imagefactory guard (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « no previous file | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmake/example.cpp
diff --git a/cmake/example.cpp b/cmake/example.cpp
index 96bf4d3ff81761446dd8f24bc37f8531bcf7eee5..20259b558928bdf05dde2b53d53c75402193c976 100644
--- a/cmake/example.cpp
+++ b/cmake/example.cpp
@@ -80,7 +80,7 @@ int main(int, char**) {
canvas->drawText(msg, strlen(msg), 90,120, paint);
// Grab a snapshot of the surface as an immutable SkImage.
- std::shared_ptr<SkImage> image = adopt(surface->newImageSnapshot());
+ sk_sp<SkImage> image = surface->makeImageSnapshot();
// Encode that image as a .png into a blob in memory.
std::shared_ptr<SkData> png = adopt(image->encode(SkImageEncoder::kPNG_Type, 100));
« no previous file with comments | « no previous file | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698