summaryrefslogtreecommitdiffstats
path: root/base/gfx/png_encoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/gfx/png_encoder.h')
-rwxr-xr-x[-rw-r--r--]base/gfx/png_encoder.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/base/gfx/png_encoder.h b/base/gfx/png_encoder.h
index e346bd0..7d284be 100644..100755
--- a/base/gfx/png_encoder.h
+++ b/base/gfx/png_encoder.h
@@ -9,6 +9,8 @@
#include "base/basictypes.h"
+class SkBitmap;
+
// Interface for encoding PNG data. This is a wrapper around libpng,
// which has an inconvenient interface for callers. This is currently designed
// for use in tests only (where we control the files), so the handling isn't as
@@ -51,6 +53,14 @@ class PNGEncoder {
bool discard_transparency,
std::vector<unsigned char>* output);
+ // Call PNGEncoder::Encode on the supplied SkBitmap |input|, which is assumed
+ // to be BGRA, 32 bits per pixel. The params |discard_transparency| and
+ // |output| are passed directly to Encode; refer to Encode for more
+ // information. During the call, an SkAutoLockPixels lock is held on |input|.
+ static bool EncodeBGRASkBitmap(const SkBitmap& input,
+ bool discard_transparency,
+ std::vector<unsigned char>* output);
+
private:
DISALLOW_EVIL_CONSTRUCTORS(PNGEncoder);
};