chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2012 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
| 9 | #ifndef SKDEBUGGERUI_H |
| 10 | #define SKDEBUGGERUI_H |
| 11 | |
| 12 | |
| 13 | #include "SkCanvas.h" |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 14 | #include "SkCanvasWidget.h" |
chudy@google.com | 607357f | 2012-08-07 16:12:23 +0000 | [diff] [blame] | 15 | #include "SkDebugger.h" |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 16 | #include "SkGLWidget.h" |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 17 | #include "SkListWidget.h" |
| 18 | #include "SkInspectorWidget.h" |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 19 | #include "SkRasterWidget.h" |
kkinnunen | 63a4702 | 2014-12-30 23:03:56 -0800 | [diff] [blame] | 20 | #include "SkDrawCommandGeometryWidget.h" |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 21 | #include "SkSettingsWidget.h" |
kkinnunen | cfdc0e3 | 2015-01-13 22:49:02 -0800 | [diff] [blame] | 22 | #include <QtCore/QSignalMapper> |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 23 | #include <QtCore/QVariant> |
| 24 | #include <QtGui/QAction> |
| 25 | #include <QtGui/QApplication> |
| 26 | #include <QtGui/QButtonGroup> |
| 27 | #include <QtGui/QHBoxLayout> |
| 28 | #include <QtGui/QHeaderView> |
| 29 | #include <QtGui/QListView> |
| 30 | #include <QtGui/QListWidget> |
| 31 | #include <QtGui/QMainWindow> |
commit-bot@chromium.org | bcd431e | 2013-11-21 13:41:37 +0000 | [diff] [blame] | 32 | #include <QtGui/QSplitter> |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 33 | #include <QtGui/QStatusBar> |
| 34 | #include <QtGui/QToolBar> |
| 35 | #include <QtGui/QVBoxLayout> |
| 36 | #include <QtGui/QWidget> |
| 37 | #include <QtGui/QMenu> |
| 38 | #include <QtGui/QMenuBar> |
| 39 | #include <vector> |
| 40 | |
robertphillips@google.com | 8a1cdae | 2012-11-19 20:44:29 +0000 | [diff] [blame] | 41 | class SkTimedPicture; |
| 42 | namespace sk_tools { |
| 43 | class PictureRenderer; |
| 44 | } |
| 45 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 46 | /** \class SkDebuggerGUI |
| 47 | |
| 48 | Container for the UI and it's functions. |
| 49 | */ |
| 50 | class SkDebuggerGUI : public QMainWindow { |
| 51 | Q_OBJECT |
| 52 | |
| 53 | public: |
| 54 | /** |
| 55 | Constructs the view of the application. |
| 56 | @param parent The parent container of this widget. |
| 57 | */ |
| 58 | SkDebuggerGUI(QWidget *parent = 0); |
| 59 | |
robertphillips@google.com | ff6e6ba | 2013-01-28 17:43:26 +0000 | [diff] [blame] | 60 | /** |
| 61 | Updates the directory widget with the latest directory path stored in |
| 62 | the global class variable fPath. |
| 63 | */ |
| 64 | void setupDirectoryWidget(const QString& path); |
| 65 | |
| 66 | /** |
| 67 | Loads the specified file. |
| 68 | */ |
| 69 | void openFile(const QString& filename); |
| 70 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 71 | signals: |
| 72 | void commandChanged(int command); |
| 73 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 74 | private slots: |
| 75 | /** |
| 76 | Toggles breakpoint view in the list widget. |
| 77 | */ |
| 78 | void actionBreakpoints(); |
| 79 | |
| 80 | /** |
robertphillips@google.com | d26c706 | 2012-11-12 20:42:12 +0000 | [diff] [blame] | 81 | Profile the commands |
| 82 | */ |
| 83 | void actionProfile(); |
| 84 | |
| 85 | /** |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 86 | Cancels the command filter in the list widget. |
| 87 | */ |
| 88 | void actionCancel(); |
| 89 | |
| 90 | /** |
chudy@google.com | 7e4cfbf | 2012-07-17 15:40:51 +0000 | [diff] [blame] | 91 | Clears the breakpoint state off of all commands marked as breakpoints. |
| 92 | */ |
| 93 | void actionClearBreakpoints(); |
| 94 | |
| 95 | /** |
| 96 | Clears the deleted state off of all commands marked as deleted. |
| 97 | */ |
| 98 | void actionClearDeletes(); |
| 99 | |
| 100 | /** |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 101 | Closes the application. |
| 102 | */ |
| 103 | void actionClose(); |
| 104 | |
| 105 | /** |
| 106 | Deletes the command in question. |
| 107 | */ |
| 108 | void actionDelete(); |
| 109 | |
robertphillips@google.com | e8fe4bc | 2013-02-13 13:26:13 +0000 | [diff] [blame] | 110 | #if SK_SUPPORT_GPU |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 111 | /** |
commit-bot@chromium.org | fde1e7c | 2013-08-02 13:59:50 +0000 | [diff] [blame] | 112 | Updates the visibility of the GL canvas widget and sample count of the GL surface. |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 113 | */ |
kkinnunen | 41c79cc | 2014-12-30 22:49:58 -0800 | [diff] [blame] | 114 | void actionGLSettingsChanged(); |
robertphillips@google.com | e8fe4bc | 2013-02-13 13:26:13 +0000 | [diff] [blame] | 115 | #endif |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 116 | |
| 117 | /** |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 118 | Toggles the visibility of the inspector widget. |
| 119 | */ |
| 120 | void actionInspector(); |
| 121 | |
| 122 | /** |
| 123 | Plays from the current step to the next breakpoint if it exists, otherwise |
| 124 | executes all remaining draw commands. |
| 125 | */ |
| 126 | void actionPlay(); |
| 127 | |
| 128 | /** |
kkinnunen | 41c79cc | 2014-12-30 22:49:58 -0800 | [diff] [blame] | 129 | Sets the visibility of the raster canvas widget according to the settings widget. |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 130 | */ |
kkinnunen | 41c79cc | 2014-12-30 22:49:58 -0800 | [diff] [blame] | 131 | void actionRasterSettingsChanged(); |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 132 | |
| 133 | /** |
kkinnunen | 41c79cc | 2014-12-30 22:49:58 -0800 | [diff] [blame] | 134 | Sets the visualization settings according to the settings widget. |
robertphillips@google.com | f4741c1 | 2013-02-06 20:13:54 +0000 | [diff] [blame] | 135 | */ |
kkinnunen | 41c79cc | 2014-12-30 22:49:58 -0800 | [diff] [blame] | 136 | void actionVisualizationsChanged(); |
commit-bot@chromium.org | 2a67e12 | 2014-05-19 13:53:10 +0000 | [diff] [blame] | 137 | |
| 138 | /** |
robertphillips@google.com | 32bbcf8 | 2013-10-17 17:56:10 +0000 | [diff] [blame] | 139 | Applies the new texture filter override |
| 140 | */ |
| 141 | void actionTextureFilter(); |
| 142 | |
| 143 | /** |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 144 | Rewinds from the current step back to the start of the commands. |
| 145 | */ |
| 146 | void actionRewind(); |
| 147 | |
| 148 | /** |
chudy@google.com | 0ab0339 | 2012-07-28 20:16:11 +0000 | [diff] [blame] | 149 | Saves the current SKP with all modifications. |
| 150 | */ |
| 151 | void actionSave(); |
| 152 | |
| 153 | /** |
| 154 | Saves the current SKP under a different name and/or location. |
| 155 | */ |
| 156 | void actionSaveAs(); |
| 157 | |
| 158 | /** |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 159 | Sends the scale factor information to the settings widget. |
| 160 | */ |
| 161 | void actionScale(float scaleFactor); |
| 162 | |
| 163 | /** |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 164 | Toggles the settings widget visibility. |
| 165 | */ |
| 166 | void actionSettings(); |
| 167 | |
| 168 | /** |
| 169 | Steps forward to the next draw command. |
| 170 | */ |
| 171 | void actionStepBack(); |
| 172 | |
| 173 | /** |
| 174 | Steps backwards to the next draw command. |
| 175 | */ |
| 176 | void actionStepForward(); |
| 177 | |
| 178 | /** |
chudy@google.com | a9e937c | 2012-08-03 17:32:05 +0000 | [diff] [blame] | 179 | Called when the canvas is done being drawn to by SkCanvasWidget. |
| 180 | */ |
| 181 | void drawComplete(); |
| 182 | |
| 183 | /** |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 184 | Loads an skpicture selected from the directory. |
| 185 | */ |
| 186 | void loadFile(QListWidgetItem *item); |
| 187 | |
| 188 | /** |
| 189 | Toggles a dialog with a file browser for navigating to a skpicture. Loads |
robertphillips@google.com | ff6e6ba | 2013-01-28 17:43:26 +0000 | [diff] [blame] | 190 | the selected file. |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 191 | */ |
| 192 | void openFile(); |
| 193 | |
| 194 | /** |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 195 | Toggles whether drawing to a new command requires a double click |
| 196 | or simple focus. |
| 197 | */ |
chudy@google.com | e504de0 | 2012-07-16 18:35:23 +0000 | [diff] [blame] | 198 | void pauseDrawing(bool isPaused = true); |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 199 | |
| 200 | /** |
kkinnunen | 0cfeaf3 | 2015-01-07 07:33:46 -0800 | [diff] [blame] | 201 | Updates the UI based on the selected command. |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 202 | */ |
kkinnunen | 0cfeaf3 | 2015-01-07 07:33:46 -0800 | [diff] [blame] | 203 | void updateDrawCommandInfo(); |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 204 | |
| 205 | /** |
chudy@google.com | 9ca9bfe | 2012-07-12 21:58:14 +0000 | [diff] [blame] | 206 | Sets the command to active in the list widget. |
| 207 | */ |
| 208 | void selectCommand(int command); |
| 209 | |
| 210 | /** |
chudy@google.com | 7e4cfbf | 2012-07-17 15:40:51 +0000 | [diff] [blame] | 211 | Toggles the exclusive listing of commands set as deleted. |
| 212 | */ |
| 213 | void showDeletes(); |
| 214 | |
| 215 | /** |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 216 | Toggles a breakpoint on the current step in the list widget. |
| 217 | */ |
| 218 | void toggleBreakpoint(); |
| 219 | |
| 220 | /** |
| 221 | Toggles the visibility of the directory widget. |
| 222 | */ |
| 223 | void toggleDirectory(); |
| 224 | |
| 225 | /** |
| 226 | Filters the list widgets command visibility based on the currently |
| 227 | active selection. |
| 228 | */ |
| 229 | void toggleFilter(QString string); |
| 230 | |
kkinnunen | 41c79cc | 2014-12-30 22:49:58 -0800 | [diff] [blame] | 231 | void updateHit(int newHit); |
kkinnunen | cfdc0e3 | 2015-01-13 22:49:02 -0800 | [diff] [blame] | 232 | |
| 233 | void updateImage(); |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 234 | private: |
commit-bot@chromium.org | bcd431e | 2013-11-21 13:41:37 +0000 | [diff] [blame] | 235 | QSplitter fCentralSplitter; |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 236 | QStatusBar fStatusBar; |
| 237 | QToolBar fToolBar; |
| 238 | |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 239 | QAction fActionOpen; |
| 240 | QAction fActionBreakpoint; |
robertphillips@google.com | d26c706 | 2012-11-12 20:42:12 +0000 | [diff] [blame] | 241 | QAction fActionProfile; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 242 | QAction fActionCancel; |
chudy@google.com | 7e4cfbf | 2012-07-17 15:40:51 +0000 | [diff] [blame] | 243 | QAction fActionClearBreakpoints; |
chudy@google.com | e504de0 | 2012-07-16 18:35:23 +0000 | [diff] [blame] | 244 | QAction fActionClearDeletes; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 245 | QAction fActionClose; |
chudy@google.com | e504de0 | 2012-07-16 18:35:23 +0000 | [diff] [blame] | 246 | QAction fActionCreateBreakpoint; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 247 | QAction fActionDelete; |
| 248 | QAction fActionDirectory; |
| 249 | QAction fActionGoToLine; |
| 250 | QAction fActionInspector; |
bungeman@google.com | 2ff6d1d | 2013-07-01 14:24:12 +0000 | [diff] [blame] | 251 | QAction fActionSettings; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 252 | QAction fActionPlay; |
chudy@google.com | e504de0 | 2012-07-16 18:35:23 +0000 | [diff] [blame] | 253 | QAction fActionPause; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 254 | QAction fActionRewind; |
chudy@google.com | 0ab0339 | 2012-07-28 20:16:11 +0000 | [diff] [blame] | 255 | QAction fActionSave; |
| 256 | QAction fActionSaveAs; |
chudy@google.com | 7e4cfbf | 2012-07-17 15:40:51 +0000 | [diff] [blame] | 257 | QAction fActionShowDeletes; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 258 | QAction fActionStepBack; |
| 259 | QAction fActionStepForward; |
chudy@google.com | a122631 | 2012-07-26 20:26:44 +0000 | [diff] [blame] | 260 | QAction fActionZoomIn; |
| 261 | QAction fActionZoomOut; |
| 262 | QSignalMapper fMapper; |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 263 | |
chudy@google.com | 0ab0339 | 2012-07-28 20:16:11 +0000 | [diff] [blame] | 264 | QWidget fSpacer; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 265 | QComboBox fFilter; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 266 | |
commit-bot@chromium.org | bcd431e | 2013-11-21 13:41:37 +0000 | [diff] [blame] | 267 | QSplitter fLeftColumnSplitter; |
| 268 | QWidget fMainAndRightColumnWidget; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 269 | QVBoxLayout fMainAndRightColumnLayout; |
robertphillips@google.com | 6dec8fc | 2012-11-21 17:11:02 +0000 | [diff] [blame] | 270 | QHBoxLayout fCanvasSettingsAndImageLayout; |
| 271 | QVBoxLayout fSettingsAndImageLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 272 | |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 273 | QListWidget fListWidget; |
| 274 | QListWidget fDirectoryWidget; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 275 | |
chudy@google.com | 607357f | 2012-08-07 16:12:23 +0000 | [diff] [blame] | 276 | SkDebugger fDebugger; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 277 | SkCanvasWidget fCanvasWidget; |
kkinnunen | 63a4702 | 2014-12-30 23:03:56 -0800 | [diff] [blame] | 278 | |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 279 | SkInspectorWidget fInspectorWidget; |
| 280 | SkSettingsWidget fSettingsWidget; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 281 | |
kkinnunen | 41c79cc | 2014-12-30 22:49:58 -0800 | [diff] [blame] | 282 | QFrame fViewStateFrame; |
| 283 | QVBoxLayout fViewStateFrameLayout; |
| 284 | QGroupBox fViewStateGroup; |
| 285 | QFormLayout fViewStateLayout; |
| 286 | QLineEdit fCurrentCommandBox; |
| 287 | QLineEdit fCommandHitBox; |
| 288 | QLineEdit fZoomBox; |
kkinnunen | 63a4702 | 2014-12-30 23:03:56 -0800 | [diff] [blame] | 289 | SkDrawCommandGeometryWidget fDrawCommandGeometryWidget; |
kkinnunen | 41c79cc | 2014-12-30 22:49:58 -0800 | [diff] [blame] | 290 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 291 | QString fPath; |
robertphillips@google.com | d26c706 | 2012-11-12 20:42:12 +0000 | [diff] [blame] | 292 | SkString fFileName; |
robertphillips@google.com | 5f97114 | 2012-12-07 20:48:56 +0000 | [diff] [blame] | 293 | SkTDArray<bool> fSkipCommands; // has a specific command been deleted? |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 294 | bool fDirectoryWidgetActive; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 295 | |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 296 | QMenuBar fMenuBar; |
| 297 | QMenu fMenuFile; |
chudy@google.com | e504de0 | 2012-07-16 18:35:23 +0000 | [diff] [blame] | 298 | QMenu fMenuEdit; |
chudy@google.com | c432f00 | 2012-07-10 13:19:25 +0000 | [diff] [blame] | 299 | QMenu fMenuNavigate; |
| 300 | QMenu fMenuView; |
chudy@google.com | e504de0 | 2012-07-16 18:35:23 +0000 | [diff] [blame] | 301 | QMenu fMenuWindows; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 302 | |
chudy@google.com | d3058f5 | 2012-07-19 13:41:27 +0000 | [diff] [blame] | 303 | bool fLoading; |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 304 | int fPausedRow; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 305 | |
| 306 | /** |
| 307 | Creates the entire UI. |
| 308 | */ |
| 309 | void setupUi(QMainWindow *SkDebuggerGUI); |
| 310 | |
| 311 | /** |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 312 | Pipes a QString in with the location of the filename, proceeds to updating |
| 313 | the listwidget, combowidget and inspectorwidget. |
| 314 | */ |
robertphillips@google.com | d26c706 | 2012-11-12 20:42:12 +0000 | [diff] [blame] | 315 | void loadPicture(const SkString& fileName); |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 316 | |
| 317 | /** |
chudy@google.com | 0ab0339 | 2012-07-28 20:16:11 +0000 | [diff] [blame] | 318 | Creates a picture of the current canvas. |
| 319 | */ |
robertphillips@google.com | d26c706 | 2012-11-12 20:42:12 +0000 | [diff] [blame] | 320 | void saveToFile(const SkString& filename); |
chudy@google.com | 0ab0339 | 2012-07-28 20:16:11 +0000 | [diff] [blame] | 321 | |
| 322 | /** |
kkinnunen | 5037e9d | 2014-12-30 07:22:58 -0800 | [diff] [blame] | 323 | Populates the list widget with the debugger draw command info. |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 324 | */ |
kkinnunen | 5037e9d | 2014-12-30 07:22:58 -0800 | [diff] [blame] | 325 | void setupListWidget(); |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 326 | |
| 327 | /** |
kkinnunen | 5037e9d | 2014-12-30 07:22:58 -0800 | [diff] [blame] | 328 | Populates the combo box widget with with the debugger draw command info. |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 329 | */ |
kkinnunen | 5037e9d | 2014-12-30 07:22:58 -0800 | [diff] [blame] | 330 | void setupComboBox(); |
robertphillips@google.com | 8a1cdae | 2012-11-19 20:44:29 +0000 | [diff] [blame] | 331 | |
| 332 | /** |
| 333 | Fills in the overview pane with text |
| 334 | */ |
robertphillips@google.com | 20beb48 | 2013-03-07 19:32:45 +0000 | [diff] [blame] | 335 | void setupOverviewText(const SkTDArray<double>* typeTimes, double totTime, int numRuns); |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 336 | |
commit-bot@chromium.org | 2a67e12 | 2014-05-19 13:53:10 +0000 | [diff] [blame] | 337 | |
| 338 | /** |
robertphillips@google.com | 8a1cdae | 2012-11-19 20:44:29 +0000 | [diff] [blame] | 339 | Render the supplied picture several times tracking the time consumed |
| 340 | by each command. |
| 341 | */ |
robertphillips | ce4dd3d | 2014-07-07 13:46:35 -0700 | [diff] [blame] | 342 | void run(const SkPicture* pict, |
skia.committer@gmail.com | 3458716 | 2012-11-20 02:01:23 +0000 | [diff] [blame] | 343 | sk_tools::PictureRenderer* renderer, |
robertphillips@google.com | 8a1cdae | 2012-11-19 20:44:29 +0000 | [diff] [blame] | 344 | int repeats); |
kkinnunen | f3a9e99 | 2015-01-05 01:14:11 -0800 | [diff] [blame] | 345 | |
| 346 | bool isPaused() const { |
| 347 | return fActionPause.isChecked(); |
| 348 | } |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 349 | }; |
| 350 | |
| 351 | #endif // SKDEBUGGERUI_H |