aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger/QT
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-19 16:26:40 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-19 16:26:40 +0000
commite099bc403ca85be61cf23e67661e6a795fbcc40a (patch)
tree2c9015cf6c6867c5affec87889c0a94a336e01cf /debugger/QT
parent808b70f869572b2f2d6660960578ba39eb0d5d73 (diff)
3 minor fixes for debugger
Diffstat (limited to 'debugger/QT')
-rw-r--r--debugger/QT/SkDebuggerGUI.cpp11
-rw-r--r--debugger/QT/SkListWidget.cpp4
2 files changed, 11 insertions, 4 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 17f7ce225c..20fb5ec10d 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -175,8 +175,14 @@ protected:
SkASSERT(offset == fCurOffset);
+#if defined(SK_BUILD_FOR_WIN32)
+ // CPU timer doesn't work well on Windows
fTimes[fCurCommand] += fTimer.fWall;
fTot += fTimer.fWall;
+#else
+ fTimes[fCurCommand] += fTimer.fCpu;
+ fTot += fTimer.fCpu;
+#endif
}
private:
@@ -566,6 +572,7 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) {
QIcon::Normal, QIcon::Off);
fActionProfile.setIcon(profile);
fActionProfile.setText("Profile");
+ fActionProfile.setDisabled(true);
QIcon inspector;
inspector.addFile(QString::fromUtf8(":/images/Ico/inspector.png"),
@@ -843,8 +850,8 @@ void SkDebuggerGUI::loadPicture(const SkString& fileName) {
// If SkPicturePlayback is compiled w/o SK_PICTURE_PROFILING_STUBS
// the offset count will always be zero
SkASSERT(0 == fOffsets.count() || commands->count() == fOffsets.count());
- if (0 == fOffsets.count()) {
- fActionProfile.setDisabled(true);
+ if (commands->count() == fOffsets.count()) {
+ fActionProfile.setDisabled(false);
}
/* fDebugCanvas is reinitialized every load picture. Need it to retain value
diff --git a/debugger/QT/SkListWidget.cpp b/debugger/QT/SkListWidget.cpp
index c03ac56304..b797cc0bf7 100644
--- a/debugger/QT/SkListWidget.cpp
+++ b/debugger/QT/SkListWidget.cpp
@@ -67,7 +67,7 @@ void SkListWidget::paint (QPainter *painter,
QString drawCommandNumber = index.data(Qt::UserRole + 1).toString();
float time = index.data(Qt::UserRole + 4).toFloat();
QString drawTime;
- drawTime.setNum(time, 'g', 3);
+ drawTime.setNum(time, 'f', 2);
/* option.rect is a struct that Qt uses as a target to draw into. Following
* the format (x1,y1,x2,y2) x1 and y1 represent where the painter can start
@@ -79,7 +79,7 @@ void SkListWidget::paint (QPainter *painter,
* x1,y1 act as a margin for the top and left. The target area will not
* affect size of text but will scale icons. */
static const int kImageSpace = 35;
- static const int kCommandNumberSpace = 30;
+ static const int kCommandNumberSpace = 33;
static const int kTimeSpace = 30;
// Breakpoint Icon