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

Side by Side Diff: tools/filtermain.cpp

Issue 17113004: Replace SkPicture(SkStream) constructors with a factory. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove a change in behavior Created 7 years, 6 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 | « tools/bench_pictures_main.cpp ('k') | tools/lua/lua_pictures.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 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
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
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
OLDNEW
« no previous file with comments | « tools/bench_pictures_main.cpp ('k') | tools/lua/lua_pictures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698