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 "SkPicture.h" | 9 #include "SkPicture.h" |
10 #include <QListWidgetItem> | 10 #include <QListWidgetItem> |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 SkString clipStack; | 272 SkString clipStack; |
273 fDebugger.getClipStackText(&clipStack); | 273 fDebugger.getClipStackText(&clipStack); |
274 fInspectorWidget.setText(clipStack.c_str(), SkInspectorWidget::kClipStack_Ta
bType); | 274 fInspectorWidget.setText(clipStack.c_str(), SkInspectorWidget::kClipStack_Ta
bType); |
275 | 275 |
276 fInspectorWidget.setMatrix(fDebugger.getCurrentMatrix()); | 276 fInspectorWidget.setMatrix(fDebugger.getCurrentMatrix()); |
277 fInspectorWidget.setClip(fDebugger.getCurrentClip()); | 277 fInspectorWidget.setClip(fDebugger.getCurrentClip()); |
278 } | 278 } |
279 | 279 |
280 void SkDebuggerGUI::saveToFile(const SkString& filename) { | 280 void SkDebuggerGUI::saveToFile(const SkString& filename) { |
281 SkFILEWStream file(filename.c_str()); | 281 SkFILEWStream file(filename.c_str()); |
282 SkAutoTUnref<SkPicture> copy(fDebugger.copyPicture()); | 282 sk_sp<SkPicture> copy(fDebugger.copyPicture()); |
283 | 283 |
284 SkAutoTUnref<SkPixelSerializer> serializer( | 284 SkAutoTUnref<SkPixelSerializer> serializer( |
285 SkImageEncoder::CreatePixelSerializer()); | 285 SkImageEncoder::CreatePixelSerializer()); |
286 copy->serialize(&file, serializer); | 286 copy->serialize(&file, serializer); |
287 } | 287 } |
288 | 288 |
289 void SkDebuggerGUI::loadFile(QListWidgetItem *item) { | 289 void SkDebuggerGUI::loadFile(QListWidgetItem *item) { |
290 if (item == nullptr) { | 290 if (item == nullptr) { |
291 return; | 291 return; |
292 } | 292 } |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 fCanvasWidget.drawTo(fPausedRow); | 795 fCanvasWidget.drawTo(fPausedRow); |
796 } else { | 796 } else { |
797 fCanvasWidget.drawTo(fListWidget.currentRow()); | 797 fCanvasWidget.drawTo(fListWidget.currentRow()); |
798 } | 798 } |
799 } | 799 } |
800 | 800 |
801 void SkDebuggerGUI::updateHit(int newHit) { | 801 void SkDebuggerGUI::updateHit(int newHit) { |
802 fCommandHitBox.setText(QString::number(newHit)); | 802 fCommandHitBox.setText(QString::number(newHit)); |
803 } | 803 } |
804 | 804 |
OLD | NEW |