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

Unified Diff: nacl/src/nacl_debugger.cpp

Issue 12449006: NaCl Debugger: Implement overview and filters, cleanup (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: 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 | « nacl/debugger/index.html ('k') | nacl/src/nacl_interface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nacl/src/nacl_debugger.cpp
===================================================================
--- nacl/src/nacl_debugger.cpp (revision 8014)
+++ nacl/src/nacl_debugger.cpp (working copy)
@@ -1,6 +1,11 @@
-#include <cstdio>
-#include <string>
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/graphics_2d.h"
#include "ppapi/cpp/image_data.h"
@@ -31,13 +36,11 @@
public:
explicit SkiaInstance(PP_Instance instance)
: pp::Instance(instance)
- , fBitmap()
, fCanvas(NULL)
- , fDebugger()
- , fImage()
+ , fPicture(NULL)
, fFlushLoopRunning(false)
, fFlushPending(false)
- , fPicture(NULL)
+
{
gPluginInstance = this;
SkGraphics::Init();
@@ -71,13 +74,24 @@
return;
}
fDebugger.loadPicture(fPicture);
+
+ // Set up the command list.
SkTArray<SkString>* commands = fDebugger.getDrawCommandsAsStrings();
PostMessage("ClearCommands");
for (int i = 0; i < commands->count(); ++i) {
- SkString message("AddCommand:");
- message.append((*commands)[i]);
- PostMessage(message.c_str());
+ SkString addCommand("AddCommand:");
+ addCommand.append((*commands)[i]);
+ PostMessage(addCommand.c_str());
}
+ PostMessage("UpdateCommands");
+
+ // Set the overview text.
+ SkString overviewText;
+ fDebugger.getOverviewText(NULL, 0.0, &overviewText);
+ overviewText.prepend("SetOverview:");
+ PostMessage(overviewText.c_str());
+
+ // Draw the SKP.
if (!fFlushLoopRunning) {
Paint();
}
« no previous file with comments | « nacl/debugger/index.html ('k') | nacl/src/nacl_interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698