| 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 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 name.printf("sample_grab_%d.png", gSampleGrabCounter++); | 1333 name.printf("sample_grab_%d.png", gSampleGrabCounter++); |
| 1334 SkImageEncoder::EncodeFile(name.c_str(), bmp, | 1334 SkImageEncoder::EncodeFile(name.c_str(), bmp, |
| 1335 SkImageEncoder::kPNG_Type, 100); | 1335 SkImageEncoder::kPNG_Type, 100); |
| 1336 } | 1336 } |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 if (kPicture_DeviceType == fDeviceType) { | 1339 if (kPicture_DeviceType == fDeviceType) { |
| 1340 SkAutoTUnref<const SkPicture> picture(fRecorder.endRecording()); | 1340 SkAutoTUnref<const SkPicture> picture(fRecorder.endRecording()); |
| 1341 | 1341 |
| 1342 if (true) { | 1342 if (true) { |
| 1343 picture->preroll(NULL, NULL, NULL, NULL); |
| 1344 } |
| 1345 |
| 1346 if (true) { |
| 1343 this->installDrawFilter(orig); | 1347 this->installDrawFilter(orig); |
| 1344 | 1348 |
| 1345 if (true) { | 1349 if (true) { |
| 1346 SkImageInfo info; | 1350 SkImageInfo info; |
| 1347 size_t rowBytes; | 1351 size_t rowBytes; |
| 1348 void* addr = orig->accessTopLayerPixels(&info, &rowBytes); | 1352 void* addr = orig->accessTopLayerPixels(&info, &rowBytes); |
| 1349 if (addr) { | 1353 if (addr) { |
| 1350 SkSurface* surfs[4]; | 1354 SkSurface* surfs[4]; |
| 1351 SkMultiPictureDraw md; | 1355 SkMultiPictureDraw md; |
| 1352 | 1356 |
| (...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2428 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2432 setenv("ANDROID_ROOT", "/android/device/data", 0); |
| 2429 #endif | 2433 #endif |
| 2430 SkGraphics::Init(); | 2434 SkGraphics::Init(); |
| 2431 SkEvent::Init(); | 2435 SkEvent::Init(); |
| 2432 } | 2436 } |
| 2433 | 2437 |
| 2434 void application_term() { | 2438 void application_term() { |
| 2435 SkEvent::Term(); | 2439 SkEvent::Term(); |
| 2436 SkGraphics::Term(); | 2440 SkGraphics::Term(); |
| 2437 } | 2441 } |
| OLD | NEW |