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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 1523053003: add backdrop option to SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « include/private/SkRecords.h ('k') | samplecode/SampleLayers.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SampleApp.h" 8 #include "SampleApp.h"
9 9
10 #include "OverView.h" 10 #include "OverView.h"
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 SkAutoTUnref<const SkPicture> picture(fRecorder.endRecording()); 1389 SkAutoTUnref<const SkPicture> picture(fRecorder.endRecording());
1390 SkFILEWStream stream("sample_app.skp"); 1390 SkFILEWStream stream("sample_app.skp");
1391 picture->serialize(&stream); 1391 picture->serialize(&stream);
1392 fSaveToSKP = false; 1392 fSaveToSKP = false;
1393 this->inval(nullptr); 1393 this->inval(nullptr);
1394 return; 1394 return;
1395 } 1395 }
1396 1396
1397 if (fUseMPD) { 1397 if (fUseMPD) {
1398 SkAutoTUnref<const SkPicture> picture(fRecorder.endRecording()); 1398 SkAutoTUnref<const SkPicture> picture(fRecorder.endRecording());
1399
1400 if (false) {
1401 SkDynamicMemoryWStream wstream;
1402 picture->serialize(&wstream);
1403
1404 SkAutoTDelete<SkStream> rstream(wstream.detachAsStream());
1405 picture.reset(SkPicture::CreateFromStream(rstream));
1406 }
1407
1399 if (true) { 1408 if (true) {
1400 if (true) { 1409 if (true) {
1401 SkImageInfo info; 1410 SkImageInfo info;
1402 size_t rowBytes; 1411 size_t rowBytes;
1403 void* addr = orig->accessTopLayerPixels(&info, &rowBytes); 1412 void* addr = orig->accessTopLayerPixels(&info, &rowBytes);
1404 if (addr) { 1413 if (addr) {
1405 SkSurface* surfs[4]; 1414 SkSurface* surfs[4];
1406 SkMultiPictureDraw md; 1415 SkMultiPictureDraw md;
1407 1416
1408 SkImageInfo n = SkImageInfo::Make(info.width()/2, info.heigh t()/2, 1417 SkImageInfo n = SkImageInfo::Make(info.width()/2, info.heigh t()/2,
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
2465 #ifdef SK_BUILD_FOR_MAC 2474 #ifdef SK_BUILD_FOR_MAC
2466 setenv("ANDROID_ROOT", "/android/device/data", 0); 2475 setenv("ANDROID_ROOT", "/android/device/data", 0);
2467 #endif 2476 #endif
2468 SkGraphics::Init(); 2477 SkGraphics::Init();
2469 SkEvent::Init(); 2478 SkEvent::Init();
2470 } 2479 }
2471 2480
2472 void application_term() { 2481 void application_term() {
2473 SkEvent::Term(); 2482 SkEvent::Term();
2474 } 2483 }
OLDNEW
« 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