summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/win/BitmapInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/win/BitmapInfo.cpp')
-rw-r--r--WebCore/platform/win/BitmapInfo.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/WebCore/platform/win/BitmapInfo.cpp b/WebCore/platform/win/BitmapInfo.cpp
index 514f722..610a27e 100644
--- a/WebCore/platform/win/BitmapInfo.cpp
+++ b/WebCore/platform/win/BitmapInfo.cpp
@@ -33,21 +33,14 @@
namespace WebCore {
-BitmapInfo bitmapInfoForSize(int width, int height, WORD bitCount)
+BitmapInfo bitmapInfoForSize(int width, int height, BitmapInfo::BitCount bitCount)
{
- ASSERT_ARG(bitCount, bitCount == 16 || bitCount == 32);
-
BitmapInfo bitmapInfo;
bitmapInfo.bmiHeader.biWidth = width;
bitmapInfo.bmiHeader.biHeight = height;
bitmapInfo.bmiHeader.biPlanes = 1;
bitmapInfo.bmiHeader.biBitCount = bitCount;
bitmapInfo.bmiHeader.biCompression = BI_RGB;
- bitmapInfo.bmiHeader.biSizeImage = 0;
- bitmapInfo.bmiHeader.biXPelsPerMeter = 0;
- bitmapInfo.bmiHeader.biYPelsPerMeter = 0;
- bitmapInfo.bmiHeader.biClrUsed = 0;
- bitmapInfo.bmiHeader.biClrImportant = 0;
return bitmapInfo;
}
@@ -58,12 +51,12 @@ BitmapInfo::BitmapInfo()
bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
}
-BitmapInfo BitmapInfo::create(const IntSize& size, WORD bitCount)
+BitmapInfo BitmapInfo::create(const IntSize& size, BitCount bitCount)
{
return bitmapInfoForSize(size.width(), size.height(), bitCount);
}
-BitmapInfo BitmapInfo::createBottomUp(const IntSize& size, WORD bitCount)
+BitmapInfo BitmapInfo::createBottomUp(const IntSize& size, BitCount bitCount)
{
return bitmapInfoForSize(size.width(), -size.height(), bitCount);
}