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

Unified Diff: debugger/SkDebugCanvas.cpp

Issue 13393005: Add getDrawCommandAt and setDrawCommandAt to SkDebugCanvas (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix comments Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « debugger/SkDebugCanvas.h ('k') | tools/filtermain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/SkDebugCanvas.cpp
===================================================================
--- debugger/SkDebugCanvas.cpp (revision 8452)
+++ debugger/SkDebugCanvas.cpp (working copy)
@@ -207,11 +207,23 @@
fIndex = index;
}
+void SkDebugCanvas::deleteDrawCommandAt(int index) {
+ SkASSERT(index < fCommandVector.count());
+ delete fCommandVector[index];
+ fCommandVector.remove(index);
+}
+
SkDrawCommand* SkDebugCanvas::getDrawCommandAt(int index) {
SkASSERT(index < fCommandVector.count());
return fCommandVector[index];
}
+void SkDebugCanvas::setDrawCommandAt(int index, SkDrawCommand* command) {
+ SkASSERT(index < fCommandVector.count());
+ delete fCommandVector[index];
+ fCommandVector[index] = command;
+}
+
SkTDArray<SkString*>* SkDebugCanvas::getCommandInfo(int index) {
SkASSERT(index < fCommandVector.count());
return fCommandVector[index]->Info();
« no previous file with comments | « debugger/SkDebugCanvas.h ('k') | tools/filtermain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698