Index: debugger/QT/SkDebuggerGUI.cpp |
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp |
index 155fb63901ee91a3118bc7c8d837ace4bbac67ef..b4eb0c7e36c2e755cff2bf699562a19b8c5f4bc1 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 |