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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 238273012: Staged removal of SkPicture-derived classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: have SkPicture only friend SkPictureRecorder once Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SamplePictFile.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 #include "SampleApp.h" 7 #include "SampleApp.h"
8 8
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 SkCanvas* SampleWindow::beforeChildren(SkCanvas* canvas) { 1369 SkCanvas* SampleWindow::beforeChildren(SkCanvas* canvas) {
1370 if (fSaveToPdf) { 1370 if (fSaveToPdf) {
1371 const SkBitmap& bmp = canvas->getDevice()->accessBitmap(false); 1371 const SkBitmap& bmp = canvas->getDevice()->accessBitmap(false);
1372 SkISize size = SkISize::Make(bmp.width(), bmp.height()); 1372 SkISize size = SkISize::Make(bmp.width(), bmp.height());
1373 SkPDFDevice* pdfDevice = new SkPDFDevice(size, size, 1373 SkPDFDevice* pdfDevice = new SkPDFDevice(size, size,
1374 canvas->getTotalMatrix()); 1374 canvas->getTotalMatrix());
1375 fPdfCanvas = new SkCanvas(pdfDevice); 1375 fPdfCanvas = new SkCanvas(pdfDevice);
1376 pdfDevice->unref(); 1376 pdfDevice->unref();
1377 canvas = fPdfCanvas; 1377 canvas = fPdfCanvas;
1378 } else if (kPicture_DeviceType == fDeviceType) { 1378 } else if (kPicture_DeviceType == fDeviceType) {
1379 canvas = fRecorder.beginRecording(9999, 9999); 1379 canvas = fRecorder.beginRecording(9999, 9999, NULL, 0);
1380 } else { 1380 } else {
1381 #if SK_SUPPORT_GPU 1381 #if SK_SUPPORT_GPU
1382 if (kNullGPU_DeviceType != fDeviceType) 1382 if (kNullGPU_DeviceType != fDeviceType)
1383 #endif 1383 #endif
1384 { 1384 {
1385 canvas = this->INHERITED::beforeChildren(canvas); 1385 canvas = this->INHERITED::beforeChildren(canvas);
1386 } 1386 }
1387 } 1387 }
1388 1388
1389 if (fUseClip) { 1389 if (fUseClip) {
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 SkGraphics::Init(); 2556 SkGraphics::Init();
2557 SkEvent::Init(); 2557 SkEvent::Init();
2558 } 2558 }
2559 2559
2560 // FIXME: this should be in a header 2560 // FIXME: this should be in a header
2561 void application_term(); 2561 void application_term();
2562 void application_term() { 2562 void application_term() {
2563 SkEvent::Term(); 2563 SkEvent::Term();
2564 SkGraphics::Term(); 2564 SkGraphics::Term();
2565 } 2565 }
OLDNEW
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SamplePictFile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698