diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-03 16:32:17 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-03 16:32:17 +0000 |
commit | 768ac85655017d4106444bf3ad044680a575ccaa (patch) | |
tree | 9d73e2c830f86d579b5ed82b8c1ae099800318e1 /debugger | |
parent | a39874b636f9954c6da335733fed646ba33dd614 (diff) |
The new "mega" viz mode both adds visualization and forces all drawing to the visible canvas (by replacing the active saveLayers with saves).
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/185293007
git-svn-id: http://skia.googlecode.com/svn/trunk@13640 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'debugger')
-rw-r--r-- | debugger/QT/SkDebuggerGUI.cpp | 6 | ||||
-rw-r--r-- | debugger/QT/SkDebuggerGUI.h | 5 | ||||
-rw-r--r-- | debugger/QT/SkSettingsWidget.cpp | 12 | ||||
-rw-r--r-- | debugger/QT/SkSettingsWidget.h | 8 | ||||
-rw-r--r-- | debugger/SkDebugger.h | 6 |
5 files changed, 33 insertions, 4 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp index 0311948ea5..a30cde23c4 100644 --- a/debugger/QT/SkDebuggerGUI.cpp +++ b/debugger/QT/SkDebuggerGUI.cpp @@ -97,6 +97,7 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) : connect(&fSettingsWidget, SIGNAL(texFilterSettingsChanged()), this, SLOT(actionTextureFilter())); 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(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool))); connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBreakpoint())); connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes())); @@ -521,6 +522,11 @@ void SkDebuggerGUI::actionOverdrawVizWidget(bool isToggled) { fCanvasWidget.update(); } +void SkDebuggerGUI::actionMegaVizWidget(bool isToggled) { + fDebugger.setMegaViz(isToggled); + fCanvasWidget.update(); +} + void SkDebuggerGUI::actionTextureFilter() { SkPaint::FilterLevel level; bool enabled = fSettingsWidget.getFilterOverride(&level); diff --git a/debugger/QT/SkDebuggerGUI.h b/debugger/QT/SkDebuggerGUI.h index cdda861acb..50ebfc2259 100644 --- a/debugger/QT/SkDebuggerGUI.h +++ b/debugger/QT/SkDebuggerGUI.h @@ -142,6 +142,11 @@ private slots: void actionOverdrawVizWidget(bool isToggled); /** + Toggles the the mega visualization on and off + */ + void actionMegaVizWidget(bool isToggled); + + /** Applies the new texture filter override */ void actionTextureFilter(); diff --git a/debugger/QT/SkSettingsWidget.cpp b/debugger/QT/SkSettingsWidget.cpp index dc40b40a9e..29026cf07c 100644 --- a/debugger/QT/SkSettingsWidget.cpp +++ b/debugger/QT/SkSettingsWidget.cpp @@ -62,6 +62,10 @@ SkSettingsWidget::SkSettingsWidget() : QWidget() fOverdrawVizLabel.setMinimumWidth(178); fOverdrawVizLabel.setMaximumWidth(178); + fMegaVizLabel.setText(" Mega Viz: "); + fMegaVizLabel.setMinimumWidth(178); + fMegaVizLabel.setMaximumWidth(178); + #if SK_SUPPORT_GPU fGLLabel.setText("OpenGL: "); fGLLabel.setMinimumWidth(178); @@ -109,8 +113,10 @@ SkSettingsWidget::SkSettingsWidget() : QWidget() fRasterLayout.addWidget(&fRasterLabel); fRasterLayout.addWidget(&fRasterCheckBox); - fOverdrawVizLayout.addWidget(&fOverdrawVizLabel); - fOverdrawVizLayout.addWidget(&fOverdrawVizCheckBox); + fVizLayout.addWidget(&fOverdrawVizLabel); + fVizLayout.addWidget(&fOverdrawVizCheckBox); + fVizLayout.addWidget(&fMegaVizLabel); + fVizLayout.addWidget(&fMegaVizCheckBox); #if SK_SUPPORT_GPU fGLLayout.addWidget(&fGLLabel); @@ -120,7 +126,7 @@ SkSettingsWidget::SkSettingsWidget() : QWidget() fCanvasLayout.setSpacing(6); fCanvasLayout.setContentsMargins(11,11,11,11); fCanvasLayout.addLayout(&fRasterLayout); - fCanvasLayout.addLayout(&fOverdrawVizLayout); + fCanvasLayout.addLayout(&fVizLayout); #if SK_SUPPORT_GPU fCanvasLayout.addLayout(&fGLLayout); fCanvasLayout.addWidget(&fGLMSAAButtonGroup); diff --git a/debugger/QT/SkSettingsWidget.h b/debugger/QT/SkSettingsWidget.h index 23100118b1..660da77cfd 100644 --- a/debugger/QT/SkSettingsWidget.h +++ b/debugger/QT/SkSettingsWidget.h @@ -70,6 +70,10 @@ public: return &fOverdrawVizCheckBox; } + QCheckBox* getMegaVizCheckBox() { + return &fMegaVizCheckBox; + } + private slots: void updateCommand(int newCommand); void updateHit(int newHit); @@ -113,9 +117,11 @@ private: QLabel fRasterLabel; QCheckBox fRasterCheckBox; - QHBoxLayout fOverdrawVizLayout; + QHBoxLayout fVizLayout; QLabel fOverdrawVizLabel; QCheckBox fOverdrawVizCheckBox; + QLabel fMegaVizLabel; + QCheckBox fMegaVizCheckBox; #if SK_SUPPORT_GPU QHBoxLayout fGLLayout; diff --git a/debugger/SkDebugger.h b/debugger/SkDebugger.h index 182f226683..20c4a7871d 100644 --- a/debugger/SkDebugger.h +++ b/debugger/SkDebugger.h @@ -107,6 +107,12 @@ public: } } + void setMegaViz(bool megaViz) { + if (NULL != fDebugCanvas) { + fDebugCanvas->setMegaVizMode(megaViz); + } + } + void setTexFilterOverride(bool texFilterOverride, SkPaint::FilterLevel level) { if (NULL != fDebugCanvas) { fDebugCanvas->overrideTexFiltering(texFilterOverride, level); |