fix window's build errors
Author: djsollen@google.com Reviewed By: bsalomon@google.com,borenet@google.com,reed@google.com Review URL: https://chromiumcodereview.appspot.com/12668007 git-svn-id: http://skia.googlecode.com/svn/trunk@8158 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
2d927e9532
commit
bff83f61fa
@ -13,7 +13,7 @@
|
|||||||
#include "SkImageDecoder.h"
|
#include "SkImageDecoder.h"
|
||||||
#include "SkStream.h"
|
#include "SkStream.h"
|
||||||
|
|
||||||
class SkIRect;
|
struct SkIRect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SkBitmapRegionDecoder can be used to decode a specified rect from an image.
|
* SkBitmapRegionDecoder can be used to decode a specified rect from an image.
|
||||||
|
@ -270,7 +270,7 @@ static bool webp_get_config_resize_crop(WebPDecoderConfig* config,
|
|||||||
|
|
||||||
bool SkWEBPImageDecoder::setDecodeConfig(SkBitmap* decodedBitmap,
|
bool SkWEBPImageDecoder::setDecodeConfig(SkBitmap* decodedBitmap,
|
||||||
int width, int height) {
|
int width, int height) {
|
||||||
SkBitmap::Config config = this->getPrefConfig(k32Bit_SrcDepth, fHasAlpha);
|
SkBitmap::Config config = this->getPrefConfig(k32Bit_SrcDepth, SkToBool(fHasAlpha));
|
||||||
|
|
||||||
// YUV converter supports output in RGB565, RGBA4444 and RGBA8888 formats.
|
// YUV converter supports output in RGB565, RGBA4444 and RGBA8888 formats.
|
||||||
if (fHasAlpha) {
|
if (fHasAlpha) {
|
||||||
@ -537,7 +537,7 @@ bool SkWEBPImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
WebPConfig webp_config;
|
WebPConfig webp_config;
|
||||||
if (!WebPConfigPreset(&webp_config, WEBP_PRESET_DEFAULT, quality)) {
|
if (!WebPConfigPreset(&webp_config, WEBP_PRESET_DEFAULT, (float) quality)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -560,7 +560,7 @@ bool SkWEBPImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bm,
|
|||||||
pic.width, colors);
|
pic.width, colors);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ok = WebPPictureImportRGB(&pic, rgb, rgbStride);
|
bool ok = (bool) WebPPictureImportRGB(&pic, rgb, rgbStride);
|
||||||
delete[] rgb;
|
delete[] rgb;
|
||||||
|
|
||||||
ok = ok && WebPEncode(&webp_config, &pic);
|
ok = ok && WebPEncode(&webp_config, &pic);
|
||||||
|
Loading…
Reference in New Issue
Block a user