Changeset 63944 in webkit
- Timestamp:
- Jul 22, 2010 7:55:21 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r63943 r63944 1 2010-07-22 Patrick Gansterer <paroga@paroga.com> 2 3 Reviewed by Adam Roben. 4 5 [WINCE] Add additonal methods to BitmapInfo. 6 https://bugs.webkit.org/show_bug.cgi?id=42071 7 8 Added a parameter to create 16bit BitmapInfo and 9 some additional accessors for the WinCE port. 10 11 Set bmiHeader.biSize only at constructor. 12 13 * platform/win/BitmapInfo.cpp: Added property svn:eol-style. 14 (WebCore::bitmapInfoForSize): 15 (WebCore::BitmapInfo::create): 16 (WebCore::BitmapInfo::createBottomUp): 17 * platform/win/BitmapInfo.h: Added property svn:eol-style. 18 (WebCore::BitmapInfo::is16bit): 19 (WebCore::BitmapInfo::is32bit): 20 (WebCore::BitmapInfo::width): 21 (WebCore::BitmapInfo::height): 22 (WebCore::BitmapInfo::size): 23 (WebCore::BitmapInfo::paddedWidth): 24 (WebCore::BitmapInfo::numPixels): 25 (WebCore::BitmapInfo::paddedBytesPerLine): 26 (WebCore::BitmapInfo::bytesPerLine): 27 1 28 2010-07-22 MORITA Hajime <morrita@google.com> 2 29 -
trunk/WebCore/platform/win/BitmapInfo.cpp
r44789 r63944 2 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. 3 3 * Copyright (C) 2009 Brent Fulgham 4 * Copyright (C) 2007-2009 Torch Mobile, Inc. All Rights Reserved. 5 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 4 6 * 5 7 * Redistribution and use in source and binary forms, with or without … … 28 30 #include "BitmapInfo.h" 29 31 32 #include <wtf/Assertions.h> 33 30 34 namespace WebCore { 31 35 32 BitmapInfo bitmapInfoForSize(int width, int height )36 BitmapInfo bitmapInfoForSize(int width, int height, WORD bitCount) 33 37 { 38 ASSERT_ARG(bitCount, bitCount == 16 || bitCount == 32); 39 34 40 BitmapInfo bitmapInfo; 35 bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); 36 bitmapInfo.bmiHeader.biWidth = width; 41 bitmapInfo.bmiHeader.biWidth = width; 37 42 bitmapInfo.bmiHeader.biHeight = height; 38 43 bitmapInfo.bmiHeader.biPlanes = 1; 39 bitmapInfo.bmiHeader.biBitCount = 32;44 bitmapInfo.bmiHeader.biBitCount = bitCount; 40 45 bitmapInfo.bmiHeader.biCompression = BI_RGB; 41 46 bitmapInfo.bmiHeader.biSizeImage = 0; … … 54 59 } 55 60 56 BitmapInfo BitmapInfo::create(const IntSize& size )61 BitmapInfo BitmapInfo::create(const IntSize& size, WORD bitCount) 57 62 { 58 return bitmapInfoForSize(size.width(), size.height());63 return bitmapInfoForSize(size.width(), size.height(), bitCount); 59 64 } 60 65 61 BitmapInfo BitmapInfo::createBottomUp(const IntSize& size )66 BitmapInfo BitmapInfo::createBottomUp(const IntSize& size, WORD bitCount) 62 67 { 63 return bitmapInfoForSize(size.width(), -size.height());68 return bitmapInfoForSize(size.width(), -size.height(), bitCount); 64 69 } 65 70
Note: See TracChangeset
for help on using the changeset viewer.