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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 855473002: initial preroll api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/core/SkShader.h ('k') | src/core/SkBitmapProcShader.h » ('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 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « include/core/SkShader.h ('k') | src/core/SkBitmapProcShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698