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

Unified Diff: include/core/SkPixelSerializer.h

Issue 1512333002: SkPixelSerializer: remove deprecated virtual (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/ImageTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPixelSerializer.h
diff --git a/include/core/SkPixelSerializer.h b/include/core/SkPixelSerializer.h
index cd0187e552a4b7b634006833d45ac008e5d109cf..b168f79dd11d538fd82750f8984579eb29c1c4b9 100644
--- a/include/core/SkPixelSerializer.h
+++ b/include/core/SkPixelSerializer.h
@@ -32,16 +32,12 @@ public:
* Call to get the client's version of encoding these pixels. If it
* returns NULL, serialize the raw pixels.
*/
- SkData* encode(const SkPixmap& pixmap) {
- SkData* data = this->onEncode(pixmap);
- return data ? data : this->onEncodePixels(
- pixmap.info(), pixmap.addr(), pixmap.rowBytes());
- }
+ SkData* encode(const SkPixmap& pixmap) { return this->onEncode(pixmap); }
protected:
/**
* Return true if you want to serialize the encoded data, false if you want
- * another version serialized (e.g. the result of encodePixels).
+ * another version serialized (e.g. the result of this->encode()).
*/
virtual bool onUseEncodedData(const void* data, size_t len) = 0;
@@ -49,15 +45,6 @@ protected:
* If you want to encode these pixels, return the encoded data as an SkData
* Return null if you want to serialize the raw pixels.
*/
- // NOTE: onEncodePixels() is deprecated and removed in a later CL.
- // Subclasses should implement onEncode() instead. Subclasses
- // should implement at least one of onEncodePixels() or
- // onUseEncodedData().
- virtual SkData* onEncodePixels(const SkImageInfo&,
- const void* /*pixels*/,
- size_t /*rowBytes*/) {
- return nullptr;
- }
- virtual SkData* onEncode(const SkPixmap&) { return nullptr; }
+ virtual SkData* onEncode(const SkPixmap&) = 0;
};
#endif // SkPixelSerializer_DEFINED
« no previous file with comments | « no previous file | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698