Get debugger compiling again
Recent house cleaning has broken the debugger - mainly around the defunct profiling feature. This makes CL it even more defunct.
Review URL: https://codereview.chromium.org/1416723006
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 155fb63..b4eb0c7 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -6,7 +6,6 @@
*/
#include "SkDebuggerGUI.h"
-#include "PictureRenderer.h"
#include "SkPictureData.h"
#include "SkPicturePlayback.h"
#include "SkPictureRecord.h"
@@ -14,17 +13,6 @@
#include <QtGui>
#include "sk_tool_utils.h"
-#if defined(SK_BUILD_FOR_WIN32)
- #include "SysTimer_windows.h"
-#elif defined(SK_BUILD_FOR_MAC)
- #include "SysTimer_mach.h"
-#elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID)
- #include "SysTimer_posix.h"
-#else
- #include "SysTimer_c.h"
-#endif
-
-
SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
QMainWindow(parent)
, fCentralSplitter(this)
@@ -32,7 +20,6 @@
, fToolBar(this)
, fActionOpen(this)
, fActionBreakpoint(this)
- , fActionProfile(this)
, fActionCancel(this)
, fActionClearBreakpoints(this)
, fActionClearDeletes(this)
@@ -81,7 +68,6 @@
connect(&fActionInspector, SIGNAL(triggered()), this, SLOT(actionInspector()));
connect(&fActionSettings, SIGNAL(triggered()), this, SLOT(actionSettings()));
connect(&fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QString)));
- connect(&fActionProfile, SIGNAL(triggered()), this, SLOT(actionProfile()));
connect(&fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel()));
connect(&fActionClearBreakpoints, SIGNAL(triggered()), this, SLOT(actionClearBreakpoints()));
connect(&fActionClearDeletes, SIGNAL(triggered()), this, SLOT(actionClearDeletes()));
@@ -131,60 +117,6 @@
item->setHidden(fDebugger.isCommandVisible(row) && deletesActivated);
}
}
-// This is a simplification of PictureBenchmark's run with the addition of
-// clearing of the times after the first pass (in resetTimes)
-void SkDebuggerGUI::run(const SkPicture* pict,
- sk_tools::PictureRenderer* renderer,
- int repeats) {
- SkASSERT(pict);
- if (nullptr == pict) {
- return;
- }
-
- SkASSERT(renderer != nullptr);
- if (nullptr == renderer) {
- return;
- }
-
- renderer->init(pict, nullptr, nullptr, nullptr, false, false);
-
- renderer->setup();
- renderer->render();
- renderer->resetState(true); // flush, swapBuffers and Finish
-
- for (int i = 0; i < repeats; ++i) {
- renderer->setup();
- renderer->render();
- renderer->resetState(false); // flush & swapBuffers, but don't Finish
- }
- renderer->resetState(true); // flush, swapBuffers and Finish
-
- renderer->end();
-}
-
-void SkDebuggerGUI::actionProfile() {
- // In order to profile we pass the command offsets (that were read-in
- // in loadPicture by the SkOffsetPicture) to an SkTimedPlaybackPicture.
- // The SkTimedPlaybackPicture in turn passes the offsets to an
- // SkTimedPicturePlayback object which uses them to track the performance
- // of individual commands.
- if (fFileName.isEmpty()) {
- return;
- }
-
- SkFILEStream inputStream;
-
- inputStream.setPath(fFileName.c_str());
- if (!inputStream.isValid()) {
- return;
- }
-
- SkAutoTUnref<SkPicture> picture(SkPicture::CreateFromStream(&inputStream,
- &SkImageDecoder::DecodeMemory)); // , fSkipCommands));
- if (nullptr == picture.get()) {
- return;
- }
-}
void SkDebuggerGUI::actionCancel() {
for (int row = 0; row < fListWidget.count(); row++) {
@@ -497,13 +429,6 @@
fActionDirectory.setShortcut(QKeySequence(tr("Ctrl+D")));
fActionDirectory.setText("Directory");
- QIcon profile;
- profile.addFile(QString::fromUtf8(":/profile.png"), QSize(),
- QIcon::Normal, QIcon::Off);
- fActionProfile.setIcon(profile);
- fActionProfile.setText("Profile");
- fActionProfile.setDisabled(true);
-
QIcon inspector;
inspector.addFile(QString::fromUtf8(":/inspector.png"),
QSize(), QIcon::Normal, QIcon::Off);
@@ -651,8 +576,6 @@
fToolBar.addSeparator();
fToolBar.addAction(&fActionInspector);
fToolBar.addAction(&fActionSettings);
- fToolBar.addSeparator();
- fToolBar.addAction(&fActionProfile);
fToolBar.addSeparator();
fToolBar.addWidget(&fSpacer);
@@ -744,8 +667,6 @@
SkSafeUnref(picture);
- fActionProfile.setDisabled(false);
-
/* fDebugCanvas is reinitialized every load picture. Need it to retain value
* of the visibility filter.
* TODO(chudy): This should be deprecated since fDebugger is not
diff --git a/debugger/QT/SkDebuggerGUI.h b/debugger/QT/SkDebuggerGUI.h
index 6ff4d4d..2ef4b0e 100644
--- a/debugger/QT/SkDebuggerGUI.h
+++ b/debugger/QT/SkDebuggerGUI.h
@@ -78,11 +78,6 @@
void actionBreakpoints();
/**
- Profile the commands
- */
- void actionProfile();
-
- /**
Cancels the command filter in the list widget.
*/
void actionCancel();
@@ -238,7 +233,6 @@
QAction fActionOpen;
QAction fActionBreakpoint;
- QAction fActionProfile;
QAction fActionCancel;
QAction fActionClearBreakpoints;
QAction fActionClearDeletes;
@@ -334,15 +328,6 @@
*/
void setupOverviewText(const SkTDArray<double>* typeTimes, double totTime, int numRuns);
-
- /**
- Render the supplied picture several times tracking the time consumed
- by each command.
- */
- void run(const SkPicture* pict,
- sk_tools::PictureRenderer* renderer,
- int repeats);
-
bool isPaused() const {
return fActionPause.isChecked();
}
diff --git a/gyp/debugger.gyp b/gyp/debugger.gyp
index 83bbbf0..6cc2a40 100644
--- a/gyp/debugger.gyp
+++ b/gyp/debugger.gyp
@@ -134,8 +134,6 @@
'dependencies': [
'debugger_qt_mocs',
'skia_lib.gyp:skia_lib',
- 'tools.gyp:picture_renderer',
- 'tools.gyp:timer',
],
'cflags': [
# Clang gets confused by QWeakPointer, see http://llvm.org/bugs/show_bug.cgi?id=13127