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
diff --git a/include/images/SkBitmapRegionDecoder.h b/include/images/SkBitmapRegionDecoder.h
index 0e20a5a..5633234 100644
--- a/include/images/SkBitmapRegionDecoder.h
+++ b/include/images/SkBitmapRegionDecoder.h
@@ -13,7 +13,7 @@
#include "SkImageDecoder.h"
#include "SkStream.h"
-class SkIRect;
+struct SkIRect;
/**
* SkBitmapRegionDecoder can be used to decode a specified rect from an image.
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp
index d4e40c0..dc3bc7d 100644
--- a/src/images/SkImageDecoder_libwebp.cpp
+++ b/src/images/SkImageDecoder_libwebp.cpp
@@ -270,7 +270,7 @@
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 @@
}
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 @@
pic.width, colors);
}
- bool ok = WebPPictureImportRGB(&pic, rgb, rgbStride);
+ bool ok = (bool) WebPPictureImportRGB(&pic, rgb, rgbStride);
delete[] rgb;
ok = ok && WebPEncode(&webp_config, &pic);