3 minor fixes for debugger
https://codereview.appspot.com/6842062/ git-svn-id: http://skia.googlecode.com/svn/trunk@6480 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
808b70f869
commit
e099bc403c
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user