| 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 /* | 8 /* |
| 9 * Code for the "gm" (Golden Master) rendering comparison tool. | 9 * Code for the "gm" (Golden Master) rendering comparison tool. |
| 10 * | 10 * |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 bmpCanvas.drawBitmap(tileBM, | 635 bmpCanvas.drawBitmap(tileBM, |
| 636 SkIntToScalar(xTile * tileSize.width())
, | 636 SkIntToScalar(xTile * tileSize.width())
, |
| 637 SkIntToScalar(yTile * tileSize.height()
), | 637 SkIntToScalar(yTile * tileSize.height()
), |
| 638 &bmpPaint); | 638 &bmpPaint); |
| 639 } | 639 } |
| 640 } | 640 } |
| 641 } else { | 641 } else { |
| 642 SkCanvas canvas(*bitmap); | 642 SkCanvas canvas(*bitmap); |
| 643 installFilter(&canvas); | 643 installFilter(&canvas); |
| 644 canvas.scale(scale, scale); | 644 canvas.scale(scale, scale); |
| 645 canvas.drawPicture(*pict); | 645 canvas.drawPicture(pict); |
| 646 complete_bitmap(bitmap); | 646 complete_bitmap(bitmap); |
| 647 } | 647 } |
| 648 } | 648 } |
| 649 | 649 |
| 650 static bool generate_pdf(GM* gm, SkDynamicMemoryWStream& pdf) { | 650 static bool generate_pdf(GM* gm, SkDynamicMemoryWStream& pdf) { |
| 651 #ifdef SK_SUPPORT_PDF | 651 #ifdef SK_SUPPORT_PDF |
| 652 SkMatrix initialTransform = gm->getInitialTransform(); | 652 SkMatrix initialTransform = gm->getInitialTransform(); |
| 653 if (FLAGS_useDocumentInsteadOfDevice) { | 653 if (FLAGS_useDocumentInsteadOfDevice) { |
| 654 SkISize pageISize = gm->getISize(); | 654 SkISize pageISize = gm->getISize(); |
| 655 SkAutoTUnref<SkDocument> pdfDoc( | 655 SkAutoTUnref<SkDocument> pdfDoc( |
| (...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2466 if (FLAGS_forceBWtext) { | 2466 if (FLAGS_forceBWtext) { |
| 2467 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 2467 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
| 2468 } | 2468 } |
| 2469 } | 2469 } |
| 2470 | 2470 |
| 2471 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 2471 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 2472 int main(int argc, char * const argv[]) { | 2472 int main(int argc, char * const argv[]) { |
| 2473 return tool_main(argc, (char**) argv); | 2473 return tool_main(argc, (char**) argv); |
| 2474 } | 2474 } |
| 2475 #endif | 2475 #endif |
| OLD | NEW |