| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkDebuggerGUI.h" | 8 #include "SkDebuggerGUI.h" |
| 9 #include "SkForceLinking.h" | 9 #include "SkForceLinking.h" |
| 10 #include "SkGraphics.h" | 10 #include "SkGraphics.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 connect(&fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QStrin
g))); | 87 connect(&fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QStrin
g))); |
| 88 connect(&fActionProfile, SIGNAL(triggered()), this, SLOT(actionProfile())); | 88 connect(&fActionProfile, SIGNAL(triggered()), this, SLOT(actionProfile())); |
| 89 connect(&fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel())); | 89 connect(&fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel())); |
| 90 connect(&fActionClearBreakpoints, SIGNAL(triggered()), this, SLOT(actionClea
rBreakpoints())); | 90 connect(&fActionClearBreakpoints, SIGNAL(triggered()), this, SLOT(actionClea
rBreakpoints())); |
| 91 connect(&fActionClearDeletes, SIGNAL(triggered()), this, SLOT(actionClearDel
etes())); | 91 connect(&fActionClearDeletes, SIGNAL(triggered()), this, SLOT(actionClearDel
etes())); |
| 92 connect(&fActionClose, SIGNAL(triggered()), this, SLOT(actionClose())); | 92 connect(&fActionClose, SIGNAL(triggered()), this, SLOT(actionClose())); |
| 93 connect(fSettingsWidget.getVisibilityButton(), SIGNAL(toggled(bool)), this,
SLOT(actionCommandFilter())); | 93 connect(fSettingsWidget.getVisibilityButton(), SIGNAL(toggled(bool)), this,
SLOT(actionCommandFilter())); |
| 94 #if SK_SUPPORT_GPU | 94 #if SK_SUPPORT_GPU |
| 95 connect(&fSettingsWidget, SIGNAL(glSettingsChanged()), this, SLOT(actionGLWi
dget())); | 95 connect(&fSettingsWidget, SIGNAL(glSettingsChanged()), this, SLOT(actionGLWi
dget())); |
| 96 #endif | 96 #endif |
| 97 connect(&fSettingsWidget, SIGNAL(texFilterSettingsChanged()), this, SLOT(act
ionTextureFilter())); |
| 97 connect(fSettingsWidget.getRasterCheckBox(), SIGNAL(toggled(bool)), this, SL
OT(actionRasterWidget(bool))); | 98 connect(fSettingsWidget.getRasterCheckBox(), SIGNAL(toggled(bool)), this, SL
OT(actionRasterWidget(bool))); |
| 98 connect(fSettingsWidget.getOverdrawVizCheckBox(), SIGNAL(toggled(bool)), thi
s, SLOT(actionOverdrawVizWidget(bool))); | 99 connect(fSettingsWidget.getOverdrawVizCheckBox(), SIGNAL(toggled(bool)), thi
s, SLOT(actionOverdrawVizWidget(bool))); |
| 99 connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool))
); | 100 connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool))
); |
| 100 connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBrea
kpoint())); | 101 connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBrea
kpoint())); |
| 101 connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes()))
; | 102 connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes()))
; |
| 102 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(selectCommand(in
t))); | 103 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(selectCommand(in
t))); |
| 103 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), &fSettingsWidget, SLOT(upda
teHit(int))); | 104 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), &fSettingsWidget, SLOT(upda
teHit(int))); |
| 104 connect(&fCanvasWidget, SIGNAL(scaleFactorChanged(float)), this, SLOT(action
Scale(float))); | 105 connect(&fCanvasWidget, SIGNAL(scaleFactorChanged(float)), this, SLOT(action
Scale(float))); |
| 105 connect(&fCanvasWidget, SIGNAL(commandChanged(int)), &fSettingsWidget, SLOT(
updateCommand(int))); | 106 connect(&fCanvasWidget, SIGNAL(commandChanged(int)), &fSettingsWidget, SLOT(
updateCommand(int))); |
| 106 connect(&fActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); | 107 connect(&fActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 515 |
| 515 void SkDebuggerGUI::actionRasterWidget(bool isToggled) { | 516 void SkDebuggerGUI::actionRasterWidget(bool isToggled) { |
| 516 fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kRaster_8888_WidgetType, !
isToggled); | 517 fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kRaster_8888_WidgetType, !
isToggled); |
| 517 } | 518 } |
| 518 | 519 |
| 519 void SkDebuggerGUI::actionOverdrawVizWidget(bool isToggled) { | 520 void SkDebuggerGUI::actionOverdrawVizWidget(bool isToggled) { |
| 520 fDebugger.setOverdrawViz(isToggled); | 521 fDebugger.setOverdrawViz(isToggled); |
| 521 fCanvasWidget.update(); | 522 fCanvasWidget.update(); |
| 522 } | 523 } |
| 523 | 524 |
| 525 void SkDebuggerGUI::actionTextureFilter() { |
| 526 SkPaint::FilterLevel level; |
| 527 bool enabled = fSettingsWidget.getFilterOverride(&level); |
| 528 fDebugger.setTexFilterOverride(enabled, level); |
| 529 fCanvasWidget.update(); |
| 530 } |
| 531 |
| 524 void SkDebuggerGUI::actionRewind() { | 532 void SkDebuggerGUI::actionRewind() { |
| 525 fListWidget.setCurrentRow(0); | 533 fListWidget.setCurrentRow(0); |
| 526 } | 534 } |
| 527 | 535 |
| 528 void SkDebuggerGUI::actionSave() { | 536 void SkDebuggerGUI::actionSave() { |
| 529 fFileName = fPath.toAscii().data(); | 537 fFileName = fPath.toAscii().data(); |
| 530 fFileName.append("/"); | 538 fFileName.append("/"); |
| 531 fFileName.append(fDirectoryWidget.currentItem()->text().toAscii().data()); | 539 fFileName.append(fDirectoryWidget.currentItem()->text().toAscii().data()); |
| 532 saveToFile(fFileName); | 540 saveToFile(fFileName); |
| 533 } | 541 } |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 } | 1036 } |
| 1029 | 1037 |
| 1030 // NOTE(chudy): Makes first item unselectable. | 1038 // NOTE(chudy): Makes first item unselectable. |
| 1031 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( | 1039 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( |
| 1032 fFilter.model()); | 1040 fFilter.model()); |
| 1033 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), | 1041 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), |
| 1034 fFilter.rootModelIndex()); | 1042 fFilter.rootModelIndex()); |
| 1035 QStandardItem* firstItem = model->itemFromIndex(firstIndex); | 1043 QStandardItem* firstItem = model->itemFromIndex(firstIndex); |
| 1036 firstItem->setSelectable(false); | 1044 firstItem->setSelectable(false); |
| 1037 } | 1045 } |
| OLD | NEW |