Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: debugger/QT/SkDebuggerGUI.cpp

Issue 822583003: debugger: Move Skia initialization out of the GUI widget class (Closed) Base URL: https://skia.googlesource.com/skia.git@scratch-key-uint-warning-fix
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « debugger/QT/SkDebuggerGUI.h ('k') | debugger/debuggermain.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "SkImageDecoder.h"
12 #include <QListWidgetItem> 10 #include <QListWidgetItem>
13 #include "PictureRenderer.h" 11 #include "PictureRenderer.h"
14 #include "SkPicturePlayback.h" 12 #include "SkPicturePlayback.h"
15 #include "SkPictureRecord.h" 13 #include "SkPictureRecord.h"
16 #include "SkPictureData.h" 14 #include "SkPictureData.h"
17 15
18 __SK_FORCE_IMAGE_DECODER_LINKING;
19
20 #if defined(SK_BUILD_FOR_WIN32) 16 #if defined(SK_BUILD_FOR_WIN32)
21 #include "SysTimer_windows.h" 17 #include "SysTimer_windows.h"
22 #elif defined(SK_BUILD_FOR_MAC) 18 #elif defined(SK_BUILD_FOR_MAC)
23 #include "SysTimer_mach.h" 19 #include "SysTimer_mach.h"
24 #elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID) 20 #elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID)
25 #include "SysTimer_posix.h" 21 #include "SysTimer_posix.h"
26 #else 22 #else
27 #include "SysTimer_c.h" 23 #include "SysTimer_c.h"
28 #endif 24 #endif
29 25
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 113
118 connect(&fActionZoomIn, SIGNAL(triggered()), &fMapper, SLOT(map())); 114 connect(&fActionZoomIn, SIGNAL(triggered()), &fMapper, SLOT(map()));
119 connect(&fActionZoomOut, SIGNAL(triggered()), &fMapper, SLOT(map())); 115 connect(&fActionZoomOut, SIGNAL(triggered()), &fMapper, SLOT(map()));
120 connect(&fMapper, SIGNAL(mapped(int)), &fCanvasWidget, SLOT(zoom(int))); 116 connect(&fMapper, SIGNAL(mapped(int)), &fCanvasWidget, SLOT(zoom(int)));
121 117
122 fViewStateFrame.setDisabled(true); 118 fViewStateFrame.setDisabled(true);
123 fInspectorWidget.setDisabled(true); 119 fInspectorWidget.setDisabled(true);
124 fMenuEdit.setDisabled(true); 120 fMenuEdit.setDisabled(true);
125 fMenuNavigate.setDisabled(true); 121 fMenuNavigate.setDisabled(true);
126 fMenuView.setDisabled(true); 122 fMenuView.setDisabled(true);
127
128 SkGraphics::Init();
129 }
130
131 SkDebuggerGUI::~SkDebuggerGUI() {
132 SkGraphics::Term();
133 } 123 }
134 124
135 void SkDebuggerGUI::actionBreakpoints() { 125 void SkDebuggerGUI::actionBreakpoints() {
136 fBreakpointsActivated = !fBreakpointsActivated; 126 fBreakpointsActivated = !fBreakpointsActivated;
137 for (int row = 0; row < fListWidget.count(); row++) { 127 for (int row = 0; row < fListWidget.count(); row++) {
138 QListWidgetItem *item = fListWidget.item(row); 128 QListWidgetItem *item = fListWidget.item(row);
139 item->setHidden(item->checkState() == Qt::Unchecked && fBreakpointsActiv ated); 129 item->setHidden(item->checkState() == Qt::Unchecked && fBreakpointsActiv ated);
140 } 130 }
141 } 131 }
142 132
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 } 861 }
872 862
873 void SkDebuggerGUI::updateCommand(int newCommand) { 863 void SkDebuggerGUI::updateCommand(int newCommand) {
874 fCurrentCommandBox.setText(QString::number(newCommand)); 864 fCurrentCommandBox.setText(QString::number(newCommand));
875 } 865 }
876 866
877 void SkDebuggerGUI::updateHit(int newHit) { 867 void SkDebuggerGUI::updateHit(int newHit) {
878 fCommandHitBox.setText(QString::number(newHit)); 868 fCommandHitBox.setText(QString::number(newHit));
879 } 869 }
880 870
OLDNEW
« no previous file with comments | « debugger/QT/SkDebuggerGUI.h ('k') | debugger/debuggermain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698