| 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 #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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |