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

Side by Side Diff: tools/filtermain.cpp

Issue 540963002: Change SkPicture::draw to playback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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
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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 SkDebugf("Could not read file %s\n", inFile.c_str()); 672 SkDebugf("Could not read file %s\n", inFile.c_str());
673 return -1; 673 return -1;
674 } 674 }
675 675
676 int localCount[SK_ARRAY_COUNT(gOptTable)]; 676 int localCount[SK_ARRAY_COUNT(gOptTable)];
677 677
678 memset(localCount, 0, sizeof(localCount)); 678 memset(localCount, 0, sizeof(localCount));
679 679
680 SkDebugCanvas debugCanvas(SkScalarCeilToInt(inPicture->cullRect().width()), 680 SkDebugCanvas debugCanvas(SkScalarCeilToInt(inPicture->cullRect().width()),
681 SkScalarCeilToInt(inPicture->cullRect().height())) ; 681 SkScalarCeilToInt(inPicture->cullRect().height())) ;
682 inPicture->draw(&debugCanvas); 682 inPicture->playback(&debugCanvas);
683 683
684 // delete the initial save and restore since replaying the commands will 684 // delete the initial save and restore since replaying the commands will
685 // re-add them 685 // re-add them
686 if (debugCanvas.getSize() > 1) { 686 if (debugCanvas.getSize() > 1) {
687 debugCanvas.deleteDrawCommandAt(0); 687 debugCanvas.deleteDrawCommandAt(0);
688 debugCanvas.deleteDrawCommandAt(debugCanvas.getSize()-1); 688 debugCanvas.deleteDrawCommandAt(debugCanvas.getSize()-1);
689 } 689 }
690 690
691 bool changed = true; 691 bool changed = true;
692 int numBefore = debugCanvas.getSize(); 692 int numBefore = debugCanvas.getSize();
(...skipping 146 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
« include/core/SkPicture.h ('K') | « tools/dump_record.cpp ('k') | tools/gpuveto.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698