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

Side by Side Diff: debugger/SkDebugger.cpp

Issue 238273012: Staged removal of SkPicture-derived classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: have SkPicture only friend SkPictureRecorder once Created 6 years, 8 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 | « bench/benchmain.cpp ('k') | dm/DMReplayTask.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkDebugger.h" 9 #include "SkDebugger.h"
10 #include "SkString.h" 10 #include "SkString.h"
(...skipping 24 matching lines...) Expand all
35 picture->draw(fDebugCanvas); 35 picture->draw(fDebugCanvas);
36 fDebugCanvas->setPicture(NULL); 36 fDebugCanvas->setPicture(NULL);
37 fIndex = fDebugCanvas->getSize() - 1; 37 fIndex = fDebugCanvas->getSize() - 1;
38 SkRefCnt_SafeAssign(fPicture, picture); 38 SkRefCnt_SafeAssign(fPicture, picture);
39 } 39 }
40 40
41 SkPicture* SkDebugger::copyPicture() { 41 SkPicture* SkDebugger::copyPicture() {
42 // We can't just call clone here since we want to removed the "deleted" 42 // We can't just call clone here since we want to removed the "deleted"
43 // commands. Playing back will strip those out. 43 // commands. Playing back will strip those out.
44 SkPictureRecorder recorder; 44 SkPictureRecorder recorder;
45 SkCanvas* canvas = recorder.beginRecording(fPictureWidth, fPictureHeight); 45 SkCanvas* canvas = recorder.beginRecording(fPictureWidth, fPictureHeight, NU LL, 0);
46 46
47 bool vizMode = fDebugCanvas->getMegaVizMode(); 47 bool vizMode = fDebugCanvas->getMegaVizMode();
48 fDebugCanvas->setMegaVizMode(false); 48 fDebugCanvas->setMegaVizMode(false);
49 bool overDraw = fDebugCanvas->getOverdrawViz(); 49 bool overDraw = fDebugCanvas->getOverdrawViz();
50 fDebugCanvas->setOverdrawViz(false); 50 fDebugCanvas->setOverdrawViz(false);
51 int saveCount = fDebugCanvas->getOutstandingSaveCount(); 51 int saveCount = fDebugCanvas->getOutstandingSaveCount();
52 fDebugCanvas->setOutstandingSaveCount(0); 52 fDebugCanvas->setOutstandingSaveCount(0);
53 53
54 fDebugCanvas->draw(canvas); 54 fDebugCanvas->draw(canvas);
55 55
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 overview->insert(0, totalStr); 140 overview->insert(0, totalStr);
141 141
142 overview->append("<br/>"); 142 overview->append("<br/>");
143 overview->append("SkPicture Width: "); 143 overview->append("SkPicture Width: ");
144 overview->appendS32(pictureWidth()); 144 overview->appendS32(pictureWidth());
145 overview->append("px<br/>"); 145 overview->append("px<br/>");
146 overview->append("SkPicture Height: "); 146 overview->append("SkPicture Height: ");
147 overview->appendS32(pictureHeight()); 147 overview->appendS32(pictureHeight());
148 overview->append("px"); 148 overview->append("px");
149 } 149 }
OLDNEW
« no previous file with comments | « bench/benchmain.cpp ('k') | dm/DMReplayTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698