Add SkJpegEncoder and SkWebpEncoder to public API

Bug: 713862
Change-Id: I05d8b3a506f817d63b0bc3ab3f9233e24bbe3be0
Reviewed-on: https://skia-review.googlesource.com/16233
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This commit is contained in:
Matt Sarett 2017-05-11 09:32:59 -04:00 committed by Skia Commit-Bot
parent bc09d29a73
commit 6a4dc66990
5 changed files with 10 additions and 10 deletions

View File

@ -13,7 +13,7 @@
class SkJpegEncoderMgr;
class SkWStream;
class SkJpegEncoder : public SkEncoder {
class SK_API SkJpegEncoder : public SkEncoder {
public:
enum class AlphaOption {
@ -80,8 +80,8 @@ public:
*
* This returns nullptr on an invalid or unsupported |src|.
*/
static std::unique_ptr<SkJpegEncoder> Make(SkWStream* dst, const SkPixmap& src,
const Options& options);
static std::unique_ptr<SkEncoder> Make(SkWStream* dst, const SkPixmap& src,
const Options& options);
~SkJpegEncoder() override;

View File

@ -76,8 +76,8 @@ public:
*
* This returns nullptr on an invalid or unsupported |src|.
*/
static std::unique_ptr<SkPngEncoder> Make(SkWStream* dst, const SkPixmap& src,
const Options& options);
static std::unique_ptr<SkEncoder> Make(SkWStream* dst, const SkPixmap& src,
const Options& options);
~SkPngEncoder() override;

View File

@ -12,7 +12,7 @@
class SkWStream;
namespace SkWebpEncoder {
namespace SK_API SkWebpEncoder {
struct Options {
/**

View File

@ -188,8 +188,8 @@ bool SkJpegEncoderMgr::setParams(const SkImageInfo& srcInfo, const SkJpegEncoder
return true;
}
std::unique_ptr<SkJpegEncoder> SkJpegEncoder::Make(SkWStream* dst, const SkPixmap& src,
const Options& options) {
std::unique_ptr<SkEncoder> SkJpegEncoder::Make(SkWStream* dst, const SkPixmap& src,
const Options& options) {
if (!SkPixmapIsValid(src, options.fBlendBehavior)) {
return nullptr;
}

View File

@ -382,8 +382,8 @@ void SkPngEncoderMgr::chooseProc(const SkImageInfo& srcInfo,
fProc = choose_proc(srcInfo, unpremulBehavior);
}
std::unique_ptr<SkPngEncoder> SkPngEncoder::Make(SkWStream* dst, const SkPixmap& src,
const Options& options) {
std::unique_ptr<SkEncoder> SkPngEncoder::Make(SkWStream* dst, const SkPixmap& src,
const Options& options) {
if (!SkPixmapIsValid(src, options.fUnpremulBehavior)) {
return nullptr;
}