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

Unified Diff: samplecode/SampleApp.cpp

Issue 1523053003: add backdrop option to SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ignore the hack in sampleapp.cpp, just for testing Created 4 years, 12 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 | « include/private/SkRecords.h ('k') | samplecode/SampleLayers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index f9865dcfc0afb23fef3d8c3be27d046c3ffd6e3f..aa3498446cb3f16addd21a99a7335239b027085c 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1385,6 +1385,14 @@ void SampleWindow::afterChildren(SkCanvas* orig) {
if (kPicture_DeviceType == fDeviceType) {
SkAutoTUnref<const SkPicture> picture(fRecorder.endRecording());
robertphillips 2016/01/05 22:24:34 Delete this ?
reed1 2016/01/07 15:27:11 Done.
+ if (true) {
+ SkDynamicMemoryWStream wstream;
+ picture->serialize(&wstream);
+
+ SkAutoTDelete<SkStream> rstream(wstream.detachAsStream());
+ picture.reset(SkPicture::CreateFromStream(rstream));
+ }
+
if (fSaveToSKP) {
SkFILEWStream stream("sample_app.skp");
picture->serialize(&stream);
« no previous file with comments | « include/private/SkRecords.h ('k') | samplecode/SampleLayers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698