| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkDebugCanvas.h" | 8 #include "SkDebugCanvas.h" |
| 9 #include "SkDevice.h" | 9 #include "SkDevice.h" |
| 10 #include "SkForceLinking.h" | 10 #include "SkForceLinking.h" |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 changed = true; | 711 changed = true; |
| 712 } | 712 } |
| 713 } | 713 } |
| 714 } | 714 } |
| 715 } | 715 } |
| 716 | 716 |
| 717 int numAfter = debugCanvas.getSize(); | 717 int numAfter = debugCanvas.getSize(); |
| 718 | 718 |
| 719 if (!outFile.isEmpty()) { | 719 if (!outFile.isEmpty()) { |
| 720 SkPictureRecorder recorder; | 720 SkPictureRecorder recorder; |
| 721 SkCanvas* canvas = recorder.beginRecording(inPicture->width(), inPicture
->height()); | 721 SkCanvas* canvas = recorder.beginRecording(inPicture->width(), inPicture
->height(), NULL, 0); |
| 722 debugCanvas.draw(canvas); | 722 debugCanvas.draw(canvas); |
| 723 SkAutoTUnref<SkPicture> outPicture(recorder.endRecording()); | 723 SkAutoTUnref<SkPicture> outPicture(recorder.endRecording()); |
| 724 | 724 |
| 725 SkFILEWStream outStream(outFile.c_str()); | 725 SkFILEWStream outStream(outFile.c_str()); |
| 726 | 726 |
| 727 outPicture->serialize(&outStream); | 727 outPicture->serialize(&outStream); |
| 728 } | 728 } |
| 729 | 729 |
| 730 bool someOptFired = false; | 730 bool someOptFired = false; |
| 731 for (size_t opt = 0; opt < SK_ARRAY_COUNT(gOptTable); ++opt) { | 731 for (size_t opt = 0; opt < SK_ARRAY_COUNT(gOptTable); ++opt) { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 | 838 |
| 839 SkGraphics::Term(); | 839 SkGraphics::Term(); |
| 840 return 0; | 840 return 0; |
| 841 } | 841 } |
| 842 | 842 |
| 843 #if !defined SK_BUILD_FOR_IOS | 843 #if !defined SK_BUILD_FOR_IOS |
| 844 int main(int argc, char * const argv[]) { | 844 int main(int argc, char * const argv[]) { |
| 845 return tool_main(argc, (char**) argv); | 845 return tool_main(argc, (char**) argv); |
| 846 } | 846 } |
| 847 #endif | 847 #endif |
| OLD | NEW |