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

Unified Diff: src/images/SkImageDecoder_libwebp.cpp

Issue 12668007: fix window's build errors (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address mike's comment Created 7 years, 9 months 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/images/SkBitmapRegionDecoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libwebp.cpp
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp
index d4e40c0cd7834a49023e32b43892c895b0e251a7..dc3bc7d256f86a1f0d561f8ebe665a9a12ad0143 100644
--- a/src/images/SkImageDecoder_libwebp.cpp
+++ b/src/images/SkImageDecoder_libwebp.cpp
@@ -270,7 +270,7 @@ static bool webp_get_config_resize_crop(WebPDecoderConfig* config,
bool SkWEBPImageDecoder::setDecodeConfig(SkBitmap* decodedBitmap,
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.
if (fHasAlpha) {
@@ -537,7 +537,7 @@ bool SkWEBPImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bm,
}
WebPConfig webp_config;
- if (!WebPConfigPreset(&webp_config, WEBP_PRESET_DEFAULT, quality)) {
+ if (!WebPConfigPreset(&webp_config, WEBP_PRESET_DEFAULT, (float) quality)) {
return false;
}
@@ -560,7 +560,7 @@ bool SkWEBPImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bm,
pic.width, colors);
}
- bool ok = WebPPictureImportRGB(&pic, rgb, rgbStride);
+ bool ok = (bool) WebPPictureImportRGB(&pic, rgb, rgbStride);
delete[] rgb;
ok = ok && WebPEncode(&webp_config, &pic);
« no previous file with comments | « include/images/SkBitmapRegionDecoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698