| 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 "PictureRenderer.h" | 9 #include "PictureRenderer.h" |
| 10 #include "SkPictureData.h" | 10 #include "SkPictureData.h" |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 const QStringList files = dir.entryList(); | 718 const QStringList files = dir.entryList(); |
| 719 foreach (QString f, files) { | 719 foreach (QString f, files) { |
| 720 if (f.contains(r)) | 720 if (f.contains(r)) |
| 721 fDirectoryWidget.addItem(f); | 721 fDirectoryWidget.addItem(f); |
| 722 } | 722 } |
| 723 } | 723 } |
| 724 | 724 |
| 725 void SkDebuggerGUI::loadPicture(const SkString& fileName) { | 725 void SkDebuggerGUI::loadPicture(const SkString& fileName) { |
| 726 fFileName = fileName; | 726 fFileName = fileName; |
| 727 fLoading = true; | 727 fLoading = true; |
| 728 SkAutoTDelete<SkStream> stream(SkNEW_ARGS(SkFILEStream, (fileName.c_str())))
; | 728 SkAutoTDelete<SkStream> stream(new SkFILEStream(fileName.c_str())); |
| 729 | 729 |
| 730 SkPicture* picture = SkPicture::CreateFromStream(stream); | 730 SkPicture* picture = SkPicture::CreateFromStream(stream); |
| 731 | 731 |
| 732 if (NULL == picture) { | 732 if (NULL == picture) { |
| 733 QMessageBox::critical(this, "Error loading file", "Couldn't read file, s
orry."); | 733 QMessageBox::critical(this, "Error loading file", "Couldn't read file, s
orry."); |
| 734 return; | 734 return; |
| 735 } | 735 } |
| 736 | 736 |
| 737 fCanvasWidget.resetWidgetTransform(); | 737 fCanvasWidget.resetWidgetTransform(); |
| 738 fDebugger.loadPicture(picture); | 738 fDebugger.loadPicture(picture); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 fCanvasWidget.drawTo(fPausedRow); | 850 fCanvasWidget.drawTo(fPausedRow); |
| 851 } else { | 851 } else { |
| 852 fCanvasWidget.drawTo(fListWidget.currentRow()); | 852 fCanvasWidget.drawTo(fListWidget.currentRow()); |
| 853 } | 853 } |
| 854 } | 854 } |
| 855 | 855 |
| 856 void SkDebuggerGUI::updateHit(int newHit) { | 856 void SkDebuggerGUI::updateHit(int newHit) { |
| 857 fCommandHitBox.setText(QString::number(newHit)); | 857 fCommandHitBox.setText(QString::number(newHit)); |
| 858 } | 858 } |
| 859 | 859 |
| OLD | NEW |