diff options
author | halcanary <halcanary@google.com> | 2015-12-08 19:02:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-08 19:02:36 -0800 |
commit | 808ce2886d732b1055f89c8fb0f1b11b47fcb0ce (patch) | |
tree | fbb1a9fcb101de69988a9550583bfdf521116ca2 /debugger/QT | |
parent | e77f2daec9aefa1cb406e4572f435de68be7d43e (diff) |
default SkPixelSerializer
Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.
Add SkImageEncoder::CreatePixelSerializer() to return a
PixelSerializer that calls into SkImageEncoder::EncodeData.
SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.
Committed: https://skia.googlesource.com/skia/+/b0bd1516bff3f5afcbfd615e805867531657811b
Review URL: https://codereview.chromium.org/1507123002
Diffstat (limited to 'debugger/QT')
-rw-r--r-- | debugger/QT/SkDebuggerGUI.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp index 4422334496..0d009b3ffa 100644 --- a/debugger/QT/SkDebuggerGUI.cpp +++ b/debugger/QT/SkDebuggerGUI.cpp @@ -281,8 +281,9 @@ void SkDebuggerGUI::saveToFile(const SkString& filename) { SkFILEWStream file(filename.c_str()); SkAutoTUnref<SkPicture> copy(fDebugger.copyPicture()); - sk_tool_utils::PngPixelSerializer serializer; - copy->serialize(&file, &serializer); + SkAutoTUnref<SkPixelSerializer> serializer( + SkImageEncoder::CreatePixelSerializer()); + copy->serialize(&file, serializer); } void SkDebuggerGUI::loadFile(QListWidgetItem *item) { |