aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger/QT
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-19 13:53:10 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-19 13:53:10 +0000
commit2a67e123a3e559774a16a58cbe5106bc0fb86740 (patch)
treeb55bd6606e329ded2b58310f925a78e615bbe1d1 /debugger/QT
parent2ee3c2ce6499cb7ce15b59420dd4514ad01d0318 (diff)
This adds a checkbox to the debugger to allow seeing the effect pathops has on the clip. A new tab shows the C code that the pathops generate.
Once in place, this CL found a bug in the pathops code where it was not handling empty clip stack elements correctly. The Cl also has the change to SkCanvas to fix this bug. R=robertphillips@google.com, reed@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/282283002 git-svn-id: http://skia.googlecode.com/svn/trunk@14774 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'debugger/QT')
-rw-r--r--debugger/QT/SkDebuggerGUI.cpp14
-rw-r--r--debugger/QT/SkDebuggerGUI.h10
-rw-r--r--debugger/QT/SkInspectorWidget.cpp1
-rw-r--r--debugger/QT/SkInspectorWidget.h1
-rw-r--r--debugger/QT/SkSettingsWidget.cpp6
-rw-r--r--debugger/QT/SkSettingsWidget.h6
6 files changed, 38 insertions, 0 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 01d165a3d3..0f816eec7c 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -101,6 +101,7 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
connect(fSettingsWidget.getRasterCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionRasterWidget(bool)));
connect(fSettingsWidget.getOverdrawVizCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionOverdrawVizWidget(bool)));
connect(fSettingsWidget.getMegaVizCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionMegaVizWidget(bool)));
+ connect(fSettingsWidget.getPathOpsCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionPathOpsWidget(bool)));
connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool)));
connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBreakpoint()));
connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes()));
@@ -415,6 +416,7 @@ void SkDebuggerGUI::actionProfile() {
}
setupOverviewText(picture->typeTimes(), picture->totTime(), kNumRepeats);
+ setupClipStackText();
}
void SkDebuggerGUI::actionCancel() {
@@ -535,6 +537,11 @@ void SkDebuggerGUI::actionMegaVizWidget(bool isToggled) {
fCanvasWidget.update();
}
+void SkDebuggerGUI::actionPathOpsWidget(bool isToggled) {
+ fDebugger.setPathOps(isToggled);
+ fCanvasWidget.update();
+}
+
void SkDebuggerGUI::actionTextureFilter() {
SkPaint::FilterLevel level;
bool enabled = fSettingsWidget.getFilterOverride(&level);
@@ -662,6 +669,7 @@ void SkDebuggerGUI::registerListClick(QListWidgetItem *item) {
fInspectorWidget.setText(info, SkInspectorWidget::kDetail_TabType);
fInspectorWidget.setDisabled(false);
}
+ setupClipStackText();
}
}
@@ -1043,6 +1051,12 @@ void SkDebuggerGUI::setupOverviewText(const SkTDArray<double>* typeTimes,
fInspectorWidget.setText(overview.c_str(), SkInspectorWidget::kOverview_TabType);
}
+void SkDebuggerGUI::setupClipStackText() {
+ SkString clipStack;
+ fDebugger.getClipStackText(&clipStack);
+ fInspectorWidget.setText(clipStack.c_str(), SkInspectorWidget::kClipStack_TabType);
+}
+
void SkDebuggerGUI::setupComboBox(SkTArray<SkString>* command) {
fFilter.clear();
fFilter.addItem("--Filter By Available Commands--");
diff --git a/debugger/QT/SkDebuggerGUI.h b/debugger/QT/SkDebuggerGUI.h
index 41c5e242e2..a137ee7cfb 100644
--- a/debugger/QT/SkDebuggerGUI.h
+++ b/debugger/QT/SkDebuggerGUI.h
@@ -152,6 +152,11 @@ private slots:
void actionMegaVizWidget(bool isToggled);
/**
+ Toggles using path ops to simplify the clip stack
+ */
+ void actionPathOpsWidget(bool );
+
+ /**
Applies the new texture filter override
*/
void actionTextureFilter();
@@ -344,6 +349,11 @@ private:
void setupOverviewText(const SkTDArray<double>* typeTimes, double totTime, int numRuns);
/**
+ Fills in the clip stack pane with text
+ */
+ void setupClipStackText();
+
+ /**
Render the supplied picture several times tracking the time consumed
by each command.
*/
diff --git a/debugger/QT/SkInspectorWidget.cpp b/debugger/QT/SkInspectorWidget.cpp
index 6cf121241a..6bcac1db35 100644
--- a/debugger/QT/SkInspectorWidget.cpp
+++ b/debugger/QT/SkInspectorWidget.cpp
@@ -23,6 +23,7 @@ SkInspectorWidget::SkInspectorWidget() : QWidget()
QString tabNames[kTotalTabCount];
tabNames[kOverview_TabType] = "Overview";
tabNames[kDetail_TabType] = "Details";
+ tabNames[kClipStack_TabType] = "Clip Stack";
for (int i = 0; i < kTotalTabCount; i++) {
fTabTexts[i].setReadOnly(true);
diff --git a/debugger/QT/SkInspectorWidget.h b/debugger/QT/SkInspectorWidget.h
index 1b962356f7..96a6da38e1 100644
--- a/debugger/QT/SkInspectorWidget.h
+++ b/debugger/QT/SkInspectorWidget.h
@@ -31,6 +31,7 @@ public:
enum TabType {
kOverview_TabType,
kDetail_TabType,
+ kClipStack_TabType,
kTotalTabCount,
};
diff --git a/debugger/QT/SkSettingsWidget.cpp b/debugger/QT/SkSettingsWidget.cpp
index 29026cf07c..dc9dc6e45c 100644
--- a/debugger/QT/SkSettingsWidget.cpp
+++ b/debugger/QT/SkSettingsWidget.cpp
@@ -56,6 +56,10 @@ SkSettingsWidget::SkSettingsWidget() : QWidget()
fRasterLabel.setMinimumWidth(178);
fRasterLabel.setMaximumWidth(178);
+ fPathOpsLabel.setText("PathOps: ");
+ fPathOpsLabel.setMinimumWidth(178);
+ fPathOpsLabel.setMaximumWidth(178);
+
fRasterCheckBox.setChecked(true);
fOverdrawVizLabel.setText(" Overdraw Viz: ");
@@ -112,6 +116,8 @@ SkSettingsWidget::SkSettingsWidget() : QWidget()
fRasterLayout.addWidget(&fRasterLabel);
fRasterLayout.addWidget(&fRasterCheckBox);
+ fRasterLayout.addWidget(&fPathOpsLabel);
+ fRasterLayout.addWidget(&fPathOpsCheckBox);
fVizLayout.addWidget(&fOverdrawVizLabel);
fVizLayout.addWidget(&fOverdrawVizCheckBox);
diff --git a/debugger/QT/SkSettingsWidget.h b/debugger/QT/SkSettingsWidget.h
index 660da77cfd..f35df94010 100644
--- a/debugger/QT/SkSettingsWidget.h
+++ b/debugger/QT/SkSettingsWidget.h
@@ -74,6 +74,10 @@ public:
return &fMegaVizCheckBox;
}
+ QCheckBox* getPathOpsCheckBox() {
+ return &fPathOpsCheckBox;
+ }
+
private slots:
void updateCommand(int newCommand);
void updateHit(int newHit);
@@ -122,6 +126,8 @@ private:
QCheckBox fOverdrawVizCheckBox;
QLabel fMegaVizLabel;
QCheckBox fMegaVizCheckBox;
+ QLabel fPathOpsLabel;
+ QCheckBox fPathOpsCheckBox;
#if SK_SUPPORT_GPU
QHBoxLayout fGLLayout;