aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger/QT
diff options
context:
space:
mode:
Diffstat (limited to 'debugger/QT')
-rw-r--r--debugger/QT/SkDebuggerGUI.cpp6
-rw-r--r--debugger/QT/SkDebuggerGUI.h5
-rw-r--r--debugger/QT/SkRasterWidget.cpp1
-rw-r--r--debugger/QT/SkSettingsWidget.cpp8
-rw-r--r--debugger/QT/SkSettingsWidget.h8
5 files changed, 28 insertions, 0 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 6005944b96..890c607bb8 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -89,6 +89,7 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
connect(fSettingsWidget.getVisibilityButton(), SIGNAL(toggled(bool)), this, SLOT(actionCommandFilter()));
connect(fSettingsWidget.getGLCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionGLWidget(bool)));
connect(fSettingsWidget.getRasterCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionRasterWidget(bool)));
+ connect(fSettingsWidget.getOverdrawVizCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionOverdrawVizWidget(bool)));
connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool)));
connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBreakpoint()));
connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes()));
@@ -516,6 +517,11 @@ void SkDebuggerGUI::actionRasterWidget(bool isToggled) {
fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kRaster_8888_WidgetType, !isToggled);
}
+void SkDebuggerGUI::actionOverdrawVizWidget(bool isToggled) {
+ fDebugger.setOverdrawViz(isToggled);
+ fCanvasWidget.update();
+}
+
void SkDebuggerGUI::actionRewind() {
fListWidget.setCurrentRow(0);
}
diff --git a/debugger/QT/SkDebuggerGUI.h b/debugger/QT/SkDebuggerGUI.h
index 6d57a8a07c..4130e962d1 100644
--- a/debugger/QT/SkDebuggerGUI.h
+++ b/debugger/QT/SkDebuggerGUI.h
@@ -134,6 +134,11 @@ private slots:
void actionRasterWidget(bool isToggled);
/**
+ Toggles the the overdraw visualization on and off
+ */
+ void actionOverdrawVizWidget(bool isToggled);
+
+ /**
Rewinds from the current step back to the start of the commands.
*/
void actionRewind();
diff --git a/debugger/QT/SkRasterWidget.cpp b/debugger/QT/SkRasterWidget.cpp
index a8a36a845c..db3d00f074 100644
--- a/debugger/QT/SkRasterWidget.cpp
+++ b/debugger/QT/SkRasterWidget.cpp
@@ -27,6 +27,7 @@ SkRasterWidget::~SkRasterWidget() {
void SkRasterWidget::resizeEvent(QResizeEvent* event) {
fBitmap.setConfig(SkBitmap::kARGB_8888_Config, event->size().width(), event->size().height());
fBitmap.allocPixels();
+ fBitmap.eraseColor(SK_ColorTRANSPARENT);
SkSafeUnref(fCanvas);
SkSafeUnref(fDevice);
fDevice = new SkDevice(fBitmap);
diff --git a/debugger/QT/SkSettingsWidget.cpp b/debugger/QT/SkSettingsWidget.cpp
index c74be404a2..09196fbc5e 100644
--- a/debugger/QT/SkSettingsWidget.cpp
+++ b/debugger/QT/SkSettingsWidget.cpp
@@ -59,6 +59,10 @@ SkSettingsWidget::SkSettingsWidget() : QWidget()
fRasterCheckBox.setChecked(true);
+ fOverdrawVizLabel.setText(" Overdraw Viz: ");
+ fOverdrawVizLabel.setMinimumWidth(178);
+ fOverdrawVizLabel.setMaximumWidth(178);
+
fGLLabel.setText("OpenGL: ");
fGLLabel.setMinimumWidth(178);
fGLLabel.setMaximumWidth(178);
@@ -66,12 +70,16 @@ SkSettingsWidget::SkSettingsWidget() : QWidget()
fRasterLayout.addWidget(&fRasterLabel);
fRasterLayout.addWidget(&fRasterCheckBox);
+ fOverdrawVizLayout.addWidget(&fOverdrawVizLabel);
+ fOverdrawVizLayout.addWidget(&fOverdrawVizCheckBox);
+
fGLLayout.addWidget(&fGLLabel);
fGLLayout.addWidget(&fGLCheckBox);
fCanvasLayout.setSpacing(6);
fCanvasLayout.setContentsMargins(11,11,11,11);
fCanvasLayout.addLayout(&fRasterLayout);
+ fCanvasLayout.addLayout(&fOverdrawVizLayout);
fCanvasLayout.addLayout(&fGLLayout);
// Command Toggle
diff --git a/debugger/QT/SkSettingsWidget.h b/debugger/QT/SkSettingsWidget.h
index 1f7552721d..73cd6e1bc9 100644
--- a/debugger/QT/SkSettingsWidget.h
+++ b/debugger/QT/SkSettingsWidget.h
@@ -47,6 +47,10 @@ public:
return &fRasterCheckBox;
}
+ QCheckBox* getOverdrawVizCheckBox() {
+ return &fOverdrawVizCheckBox;
+ }
+
private slots:
void updateCommand(int newCommand);
void updateHit(int newHit);
@@ -87,6 +91,10 @@ private:
QLabel fRasterLabel;
QCheckBox fRasterCheckBox;
+ QHBoxLayout fOverdrawVizLayout;
+ QLabel fOverdrawVizLabel;
+ QCheckBox fOverdrawVizCheckBox;
+
QHBoxLayout fGLLayout;
QLabel fGLLabel;
QCheckBox fGLCheckBox;