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

Side by Side Diff: debugger/SkDebugger.h

Issue 821663003: Change DebugCanvas API to not encourage memory leaks (Closed) Base URL: https://skia.googlesource.com/skia.git@debugger-raster-black-bg
Patch Set: ..nacl Created 5 years, 12 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
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | platform_tools/nacl/src/nacl_debugger.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 9
10 #ifndef SKDEBUGGER_H_ 10 #ifndef SKDEBUGGER_H_
(...skipping 26 matching lines...) Expand all
37 void rewind(); 37 void rewind();
38 38
39 bool isCommandVisible(int index) { 39 bool isCommandVisible(int index) {
40 return fDebugCanvas->getDrawCommandVisibilityAt(index); 40 return fDebugCanvas->getDrawCommandVisibilityAt(index);
41 } 41 }
42 42
43 void setCommandVisible(int index, bool isVisible) { 43 void setCommandVisible(int index, bool isVisible) {
44 fDebugCanvas->toggleCommand(index, isVisible); 44 fDebugCanvas->toggleCommand(index, isVisible);
45 } 45 }
46 46
47 SkTArray<SkString>* getDrawCommandsAsStrings() { 47 SkDrawCommand* getDrawCommandAt(int index) {
48 return fDebugCanvas->getDrawCommandsAsStrings(); 48 return fDebugCanvas->getDrawCommandAt(index);
49 }
50
51 SkTDArray<size_t>* getDrawCommandOffsets() {
52 return fDebugCanvas->getDrawCommandOffsets();
53 } 49 }
54 50
55 const SkTDArray<SkDrawCommand*>& getDrawCommands() const { 51 const SkTDArray<SkDrawCommand*>& getDrawCommands() const {
56 return fDebugCanvas->getDrawCommands(); 52 return fDebugCanvas->getDrawCommands();
57 } 53 }
58 54
59 void highlightCurrentCommand(bool on) { 55 void highlightCurrentCommand(bool on) {
60 fDebugCanvas->toggleFilter(on); 56 fDebugCanvas->toggleFilter(on);
61 } 57 }
62 58
63 void setWindowSize(int width, int height) { fDebugCanvas->setWindowSize(widt h, height); } 59 void setWindowSize(int width, int height) { fDebugCanvas->setWindowSize(widt h, height); }
64 60
65 void loadPicture(SkPicture* picture); 61 void loadPicture(SkPicture* picture);
66 62
67 SkPicture* copyPicture(); 63 SkPicture* copyPicture();
68 64
69 int getSize() { 65 int getSize() const {
70 return fDebugCanvas->getSize(); 66 return fDebugCanvas->getSize();
71 } 67 }
72 68
73 void setUserMatrix(SkMatrix userMatrix) { 69 void setUserMatrix(SkMatrix userMatrix) {
74 // Should this live in debugger instead? 70 // Should this live in debugger instead?
75 fDebugCanvas->setUserMatrix(userMatrix); 71 fDebugCanvas->setUserMatrix(userMatrix);
76 } 72 }
77 73
78 int getCommandAtPoint(int x, int y, int index) { 74 int getCommandAtPoint(int x, int y, int index) {
79 return fDebugCanvas->getCommandAtPoint(x, y, index); 75 return fDebugCanvas->getCommandAtPoint(x, y, index);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 126
131 private: 127 private:
132 SkDebugCanvas* fDebugCanvas; 128 SkDebugCanvas* fDebugCanvas;
133 SkPicture* fPicture; 129 SkPicture* fPicture;
134 130
135 int fIndex; 131 int fIndex;
136 }; 132 };
137 133
138 134
139 #endif /* SKDEBUGGER_H_ */ 135 #endif /* SKDEBUGGER_H_ */
OLDNEW
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | platform_tools/nacl/src/nacl_debugger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698