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

Unified Diff: tools/sk_tool_utils.h

Issue 1373683003: change pixel-serializer to support reencoding existing data Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: removed another use of DEPRECATED discardable pixelref Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« include/core/SkPixelSerializer.h ('K') | « tests/KtxTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sk_tool_utils.h
diff --git a/tools/sk_tool_utils.h b/tools/sk_tool_utils.h
index b20c60ba7632d9ed98f6f6cdd84f47e06ac4c99f..085489a6d96c8689080c60e93b03a04452cb6734 100644
--- a/tools/sk_tool_utils.h
+++ b/tools/sk_tool_utils.h
@@ -115,11 +115,8 @@ namespace sk_tool_utils {
// used.
class PngPixelSerializer : public SkPixelSerializer {
public:
- bool onUseEncodedData(const void*, size_t) override { return true; }
- SkData* onEncodePixels(const SkImageInfo& info, const void* pixels,
- size_t rowBytes) override {
- return SkImageEncoder::EncodeData(info, pixels, rowBytes,
- SkImageEncoder::kPNG_Type, 100);
+ SkData* onEncodePixels(const SkPixmap& pmap) override {
+ return SkImageEncoder::EncodeData(pmap, SkImageEncoder::kPNG_Type, 100);
}
};
« include/core/SkPixelSerializer.h ('K') | « tests/KtxTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698