diff options
author | robertphillips <robertphillips@google.com> | 2015-10-26 09:28:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-26 09:28:12 -0700 |
commit | 87ed6be0e4ea8b0a88915045f697d0fd734ed6f5 (patch) | |
tree | 001752e85d1c71368f7e5faa42bff1abbcea8380 /debugger | |
parent | 953fe3139fa60ce56abcfa45a3647d924e637083 (diff) |
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
Diffstat (limited to 'debugger')
-rw-r--r-- | debugger/QT/SkDebuggerGUI.cpp | 79 | ||||
-rw-r--r-- | debugger/QT/SkDebuggerGUI.h | 15 |
2 files changed, 0 insertions, 94 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp index 155fb63901..b4eb0c7e36 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 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) : , fToolBar(this) , fActionOpen(this) , fActionBreakpoint(this) - , fActionProfile(this) , fActionCancel(this) , fActionClearBreakpoints(this) , fActionClearDeletes(this) @@ -81,7 +68,6 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) : 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 @@ void SkDebuggerGUI::showDeletes() { 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 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) { 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 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) { fToolBar.addSeparator(); fToolBar.addAction(&fActionInspector); fToolBar.addAction(&fActionSettings); - fToolBar.addSeparator(); - fToolBar.addAction(&fActionProfile); fToolBar.addSeparator(); fToolBar.addWidget(&fSpacer); @@ -744,8 +667,6 @@ void SkDebuggerGUI::loadPicture(const SkString& fileName) { 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 6ff4d4d90c..2ef4b0eb35 100644 --- a/debugger/QT/SkDebuggerGUI.h +++ b/debugger/QT/SkDebuggerGUI.h @@ -78,11 +78,6 @@ private slots: void actionBreakpoints(); /** - Profile the commands - */ - void actionProfile(); - - /** Cancels the command filter in the list widget. */ void actionCancel(); @@ -238,7 +233,6 @@ private: QAction fActionOpen; QAction fActionBreakpoint; - QAction fActionProfile; QAction fActionCancel; QAction fActionClearBreakpoints; QAction fActionClearDeletes; @@ -334,15 +328,6 @@ private: */ 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(); } |