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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 { check_8, apply_8, 0 }, | 659 { check_8, apply_8, 0 }, |
660 { check_9, apply_9, 0 }, | 660 { check_9, apply_9, 0 }, |
661 }; | 661 }; |
662 | 662 |
663 | 663 |
664 static int filter_picture(const SkString& inFile, const SkString& outFile) { | 664 static int filter_picture(const SkString& inFile, const SkString& outFile) { |
665 SkAutoTDelete<SkPicture> inPicture; | 665 SkAutoTDelete<SkPicture> inPicture; |
666 | 666 |
667 SkFILEStream inStream(inFile.c_str()); | 667 SkFILEStream inStream(inFile.c_str()); |
668 if (inStream.isValid()) { | 668 if (inStream.isValid()) { |
669 inPicture.reset(SkNEW_ARGS(SkPicture, (&inStream, NULL, &SkImageDecoder:
:DecodeMemory))); | 669 inPicture.reset(SkPicture::CreateFromStream(&inStream)); |
670 } | 670 } |
671 | 671 |
672 if (NULL == inPicture.get()) { | 672 if (NULL == inPicture.get()) { |
673 SkDebugf("Could not read file %s\n", inFile.c_str()); | 673 SkDebugf("Could not read file %s\n", inFile.c_str()); |
674 return -1; | 674 return -1; |
675 } | 675 } |
676 | 676 |
677 int localCount[SK_ARRAY_COUNT(gOptTable)]; | 677 int localCount[SK_ARRAY_COUNT(gOptTable)]; |
678 | 678 |
679 memset(localCount, 0, sizeof(localCount)); | 679 memset(localCount, 0, sizeof(localCount)); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 | 839 |
840 SkGraphics::Term(); | 840 SkGraphics::Term(); |
841 return 0; | 841 return 0; |
842 } | 842 } |
843 | 843 |
844 #if !defined SK_BUILD_FOR_IOS | 844 #if !defined SK_BUILD_FOR_IOS |
845 int main(int argc, char * const argv[]) { | 845 int main(int argc, char * const argv[]) { |
846 return tool_main(argc, (char**) argv); | 846 return tool_main(argc, (char**) argv); |
847 } | 847 } |
848 #endif | 848 #endif |
OLD | NEW |