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

Unified Diff: include/core/SkPixelSerializer.h

Issue 783393004: Revert of Replace EncodeBitmap with an interface. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « include/core/SkPicture.h ('k') | include/core/SkWriteBuffer.h » ('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
deleted file mode 100644
index 8fc445c753adcc8538ad8717b23329f5195f3a4c..0000000000000000000000000000000000000000
--- a/include/core/SkPixelSerializer.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkPixelSerializer_DEFINED
-#define SkPixelSerializer_DEFINED
-
-#include "SkRefCnt.h"
-
-class SkData;
-struct SkImageInfo;
-
-/**
- * Interface for serializing pixels, e.g. SkBitmaps in an SkPicture.
- */
-class SkPixelSerializer : public SkRefCnt {
-public:
- virtual ~SkPixelSerializer() {}
-
- /**
- * Call to determine if the client wants to serialize the encoded data. If
- * false, serialize another version (e.g. the result of encodePixels).
- */
- bool useEncodedData(const void* data, size_t len) {
- return this->onUseEncodedData(data, len);
- }
-
- /**
- * Call to get the client's version of encoding these pixels. If it
- * returns NULL, serialize the raw pixels.
- */
- SkData* encodePixels(const SkImageInfo& info, void* pixels, size_t rowBytes) {
- return this->onEncodePixels(info, pixels, rowBytes);
- }
-
-protected:
- /**
- * Return true if you want to serialize the encoded data, false if you want
- * another version serialized (e.g. the result of encodePixels).
- */
- virtual bool onUseEncodedData(const void* data, size_t len) = 0;
-
- /**
- * If you want to encode these pixels, return the encoded data as an SkData
- * Return null if you want to serialize the raw pixels.
- */
- virtual SkData* onEncodePixels(const SkImageInfo&, void* pixels, size_t rowBytes) = 0;
-};
-#endif // SkPixelSerializer_DEFINED
« no previous file with comments | « include/core/SkPicture.h ('k') | include/core/SkWriteBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698