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

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

Issue 1507123002: default SkPixelSerializer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-10 (Thursday) 13:15:57 EST Created 5 years 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 | include/core/SkImageEncoder.h » ('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 "SkPicture.h" 9 #include "SkPicture.h"
10 #include <QListWidgetItem> 10 #include <QListWidgetItem>
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SkAutoTUnref<SkPicture> copy(fDebugger.copyPicture());
283 283
284 sk_tool_utils::PngPixelSerializer serializer; 284 SkAutoTUnref<SkPixelSerializer> serializer(
285 copy->serialize(&file, &serializer); 285 SkImageEncoder::CreatePixelSerializer());
286 copy->serialize(&file, serializer);
286 } 287 }
287 288
288 void SkDebuggerGUI::loadFile(QListWidgetItem *item) { 289 void SkDebuggerGUI::loadFile(QListWidgetItem *item) {
289 if (item == nullptr) { 290 if (item == nullptr) {
290 return; 291 return;
291 } 292 }
292 293
293 SkString fileName(fPath.toAscii().data()); 294 SkString fileName(fPath.toAscii().data());
294 // don't add a '/' to files in the local directory 295 // don't add a '/' to files in the local directory
295 if (fileName.size() > 0) { 296 if (fileName.size() > 0) {
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 fCanvasWidget.drawTo(fPausedRow); 795 fCanvasWidget.drawTo(fPausedRow);
795 } else { 796 } else {
796 fCanvasWidget.drawTo(fListWidget.currentRow()); 797 fCanvasWidget.drawTo(fListWidget.currentRow());
797 } 798 }
798 } 799 }
799 800
800 void SkDebuggerGUI::updateHit(int newHit) { 801 void SkDebuggerGUI::updateHit(int newHit) {
801 fCommandHitBox.setText(QString::number(newHit)); 802 fCommandHitBox.setText(QString::number(newHit));
802 } 803 }
803 804
OLDNEW
« no previous file with comments | « no previous file | include/core/SkImageEncoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698