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

Unified Diff: include/core/SkImageEncoder.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageEncoder.h
diff --git a/include/core/SkImageEncoder.h b/include/core/SkImageEncoder.h
index fc999dcc189d4177de70c6b0a4810bb1e0165de1..bb3341f836ec330b6b04fa0baf51c6021a83afdc 100644
--- a/include/core/SkImageEncoder.h
+++ b/include/core/SkImageEncoder.h
@@ -12,6 +12,8 @@
#include "SkTRegistry.h"
class SkBitmap;
+class SkPixelSerializer;
+class SkPixmap;
class SkData;
class SkWStream;
@@ -64,11 +66,17 @@ public:
Type, int quality);
static SkData* EncodeData(const SkBitmap&, Type, int quality);
+ static SkData* EncodeData(const SkPixmap&, Type, int quality);
+
static bool EncodeFile(const char file[], const SkBitmap&, Type,
int quality);
static bool EncodeStream(SkWStream*, const SkBitmap&, Type,
int quality);
+ /** Uses SkImageEncoder to serialize images that are not already
+ encoded as SkImageEncoder::kPNG_Type images. */
+ static SkPixelSerializer* CreatePixelSerializer();
+
protected:
/**
* Encode bitmap 'bm' in the desired format, writing results to
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698