| OLD | NEW |
| 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 Loading... |
| 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 | |
| 1408 if (true) { | 1399 if (true) { |
| 1409 if (true) { | 1400 if (true) { |
| 1410 SkImageInfo info; | 1401 SkImageInfo info; |
| 1411 size_t rowBytes; | 1402 size_t rowBytes; |
| 1412 void* addr = orig->accessTopLayerPixels(&info, &rowBytes); | 1403 void* addr = orig->accessTopLayerPixels(&info, &rowBytes); |
| 1413 if (addr) { | 1404 if (addr) { |
| 1414 SkSurface* surfs[4]; | 1405 SkSurface* surfs[4]; |
| 1415 SkMultiPictureDraw md; | 1406 SkMultiPictureDraw md; |
| 1416 | 1407 |
| 1417 SkImageInfo n = SkImageInfo::Make(info.width()/2, info.heigh
t()/2, | 1408 SkImageInfo n = SkImageInfo::Make(info.width()/2, info.heigh
t()/2, |
| (...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2474 #ifdef SK_BUILD_FOR_MAC | 2465 #ifdef SK_BUILD_FOR_MAC |
| 2475 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2466 setenv("ANDROID_ROOT", "/android/device/data", 0); |
| 2476 #endif | 2467 #endif |
| 2477 SkGraphics::Init(); | 2468 SkGraphics::Init(); |
| 2478 SkEvent::Init(); | 2469 SkEvent::Init(); |
| 2479 } | 2470 } |
| 2480 | 2471 |
| 2481 void application_term() { | 2472 void application_term() { |
| 2482 SkEvent::Term(); | 2473 SkEvent::Term(); |
| 2483 } | 2474 } |
| OLD | NEW |