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 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 name.printf("sample_grab_%d.png", gSampleGrabCounter++); | 1284 name.printf("sample_grab_%d.png", gSampleGrabCounter++); |
1285 SkImageEncoder::EncodeFile(name.c_str(), bmp, | 1285 SkImageEncoder::EncodeFile(name.c_str(), bmp, |
1286 SkImageEncoder::kPNG_Type, 100); | 1286 SkImageEncoder::kPNG_Type, 100); |
1287 } | 1287 } |
1288 } | 1288 } |
1289 | 1289 |
1290 if (kPicture_DeviceType == fDeviceType) { | 1290 if (kPicture_DeviceType == fDeviceType) { |
1291 SkAutoTUnref<const SkPicture> picture(fRecorder.endRecording()); | 1291 SkAutoTUnref<const SkPicture> picture(fRecorder.endRecording()); |
1292 | 1292 |
1293 if (true) { | 1293 if (true) { |
1294 picture->preroll(NULL, NULL, NULL, NULL); | |
1295 } | |
1296 | |
1297 if (true) { | |
1298 this->installDrawFilter(orig); | 1294 this->installDrawFilter(orig); |
1299 | 1295 |
1300 if (true) { | 1296 if (true) { |
1301 SkImageInfo info; | 1297 SkImageInfo info; |
1302 size_t rowBytes; | 1298 size_t rowBytes; |
1303 void* addr = orig->accessTopLayerPixels(&info, &rowBytes); | 1299 void* addr = orig->accessTopLayerPixels(&info, &rowBytes); |
1304 if (addr) { | 1300 if (addr) { |
1305 SkSurface* surfs[4]; | 1301 SkSurface* surfs[4]; |
1306 SkMultiPictureDraw md; | 1302 SkMultiPictureDraw md; |
1307 | 1303 |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2372 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2368 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2373 #endif | 2369 #endif |
2374 SkGraphics::Init(); | 2370 SkGraphics::Init(); |
2375 SkEvent::Init(); | 2371 SkEvent::Init(); |
2376 } | 2372 } |
2377 | 2373 |
2378 void application_term() { | 2374 void application_term() { |
2379 SkEvent::Term(); | 2375 SkEvent::Term(); |
2380 SkGraphics::Term(); | 2376 SkGraphics::Term(); |
2381 } | 2377 } |
OLD | NEW |