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

Unified Diff: platform_tools/nacl/src/nacl_debugger.cpp

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: Created 6 years 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
Index: platform_tools/nacl/src/nacl_debugger.cpp
diff --git a/platform_tools/nacl/src/nacl_debugger.cpp b/platform_tools/nacl/src/nacl_debugger.cpp
index b80dde093845a612b79d9105417bb4ec0635fd80..7ea55bdf0dca13c3817019d6f107a0aaf86a4e64 100644
--- a/platform_tools/nacl/src/nacl_debugger.cpp
+++ b/platform_tools/nacl/src/nacl_debugger.cpp
@@ -76,11 +76,12 @@ public:
picture->unref();
// Set up the command list.
- SkTArray<SkString>* commands = fDebugger.getDrawCommandsAsStrings();
+ SkTArray<SkString> commands;
+ fDebugger.getDrawCommandsAsStrings(&commands);
PostMessage("ClearCommands");
- for (int i = 0; i < commands->count(); ++i) {
+ for (int i = 0; i < commands.count(); ++i) {
SkString addCommand("AddCommand:");
- addCommand.append((*commands)[i]);
+ addCommand.append(commands[i]);
PostMessage(addCommand.c_str());
}
PostMessage("UpdateCommands");

Powered by Google App Engine
This is Rietveld 408576698