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

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

Issue 1020103005: Preserve texture compression when saving a revised skp from debugger (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up Created 5 years, 9 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 | « no previous file | gm/colorwheel.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 "PictureRenderer.h" 9 #include "PictureRenderer.h"
10 #include "SkPictureData.h" 10 #include "SkPictureData.h"
11 #include "SkPicturePlayback.h" 11 #include "SkPicturePlayback.h"
12 #include "SkPictureRecord.h" 12 #include "SkPictureRecord.h"
13 #include <QListWidgetItem> 13 #include <QListWidgetItem>
14 #include <QtGui> 14 #include <QtGui>
15 #include "sk_tool_utils.h"
15 16
16 #if defined(SK_BUILD_FOR_WIN32) 17 #if defined(SK_BUILD_FOR_WIN32)
17 #include "SysTimer_windows.h" 18 #include "SysTimer_windows.h"
18 #elif defined(SK_BUILD_FOR_MAC) 19 #elif defined(SK_BUILD_FOR_MAC)
19 #include "SysTimer_mach.h" 20 #include "SysTimer_mach.h"
20 #elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID) 21 #elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID)
21 #include "SysTimer_posix.h" 22 #include "SysTimer_posix.h"
22 #else 23 #else
23 #include "SysTimer_c.h" 24 #include "SysTimer_c.h"
24 #endif 25 #endif
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 fInspectorWidget.setText(clipStack.c_str(), SkInspectorWidget::kClipStack_Ta bType); 353 fInspectorWidget.setText(clipStack.c_str(), SkInspectorWidget::kClipStack_Ta bType);
353 354
354 fInspectorWidget.setMatrix(fDebugger.getCurrentMatrix()); 355 fInspectorWidget.setMatrix(fDebugger.getCurrentMatrix());
355 fInspectorWidget.setClip(fDebugger.getCurrentClip()); 356 fInspectorWidget.setClip(fDebugger.getCurrentClip());
356 } 357 }
357 358
358 void SkDebuggerGUI::saveToFile(const SkString& filename) { 359 void SkDebuggerGUI::saveToFile(const SkString& filename) {
359 SkFILEWStream file(filename.c_str()); 360 SkFILEWStream file(filename.c_str());
360 SkAutoTUnref<SkPicture> copy(fDebugger.copyPicture()); 361 SkAutoTUnref<SkPicture> copy(fDebugger.copyPicture());
361 362
362 copy->serialize(&file); 363 sk_tool_utils::PngPixelSerializer serializer;
364 copy->serialize(&file, &serializer);
363 } 365 }
364 366
365 void SkDebuggerGUI::loadFile(QListWidgetItem *item) { 367 void SkDebuggerGUI::loadFile(QListWidgetItem *item) {
366 if (fDirectoryWidgetActive) { 368 if (fDirectoryWidgetActive) {
367 fFileName = fPath.toAscii().data(); 369 fFileName = fPath.toAscii().data();
368 // don't add a '/' to files in the local directory 370 // don't add a '/' to files in the local directory
369 if (fFileName.size() > 0) { 371 if (fFileName.size() > 0) {
370 fFileName.append("/"); 372 fFileName.append("/");
371 } 373 }
372 fFileName.append(item->text().toAscii().data()); 374 fFileName.append(item->text().toAscii().data());
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 fCanvasWidget.drawTo(fPausedRow); 854 fCanvasWidget.drawTo(fPausedRow);
853 } else { 855 } else {
854 fCanvasWidget.drawTo(fListWidget.currentRow()); 856 fCanvasWidget.drawTo(fListWidget.currentRow());
855 } 857 }
856 } 858 }
857 859
858 void SkDebuggerGUI::updateHit(int newHit) { 860 void SkDebuggerGUI::updateHit(int newHit) {
859 fCommandHitBox.setText(QString::number(newHit)); 861 fCommandHitBox.setText(QString::number(newHit));
860 } 862 }
861 863
OLDNEW
« no previous file with comments | « no previous file | gm/colorwheel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698