summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2010-11-04 12:00:17 -0700
committerJohn Reck <jreck@google.com>2010-11-09 11:35:04 -0800
commite14391e94c850b8bd03680c23b38978db68687a8 (patch)
tree3fed87e6620fecaf3edc7259ae58a11662bedcb2 /WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
parent1bd705833a68f07850cf7e204b26f8d328d16951 (diff)
downloadexternal_webkit-e14391e94c850b8bd03680c23b38978db68687a8.zip
external_webkit-e14391e94c850b8bd03680c23b38978db68687a8.tar.gz
external_webkit-e14391e94c850b8bd03680c23b38978db68687a8.tar.bz2
Merge Webkit at r70949: Initial merge by git.
Change-Id: I77b8645c083b5d0da8dba73ed01d4014aab9848e
Diffstat (limited to 'WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp')
-rw-r--r--WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp b/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
index a0c10fc..a11b8d8 100644
--- a/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
+++ b/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
@@ -283,7 +283,7 @@ public:
return 0;
}
- RefPtr<SharedBitmap> bmp = SharedBitmap::createInstance(alphaPaint == AlphaPaintNone, origRect.width(), origRect.height(), false);
+ RefPtr<SharedBitmap> bmp = SharedBitmap::create(origRect.size(), alphaPaint == AlphaPaintNone ? BitmapInfo::BitCount16 : BitmapInfo::BitCount32, false);
SetRect(&bmpRect, 0, 0, origRect.width(), origRect.height());
if (bmp) {
switch (alphaPaint) {
@@ -523,7 +523,7 @@ TransparentLayerDC::TransparentLayerDC(GraphicsContextPlatformPrivate* data, Int
origRect.inflateX(stableRound((width - origRect.width()) * 0.5));
origRect.inflateY(stableRound((height - origRect.height()) * 0.5));
- m_bitmap = SharedBitmap::createInstance(m_rotatedBitmap->is16bit(), m_origRect.width(), m_origRect.height(), true);
+ m_bitmap = SharedBitmap::create(m_origRect.size(), m_rotatedBitmap->is16bit() ? BitmapInfo::BitCount16 : BitmapInfo::BitCount32, true);
if (m_bitmap)
rotateBitmap(m_bitmap.get(), m_rotatedBitmap.get(), -m_rotation);
else
@@ -608,15 +608,13 @@ void GraphicsContext::setBitmap(PassRefPtr<SharedBitmap> bmp)
HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlphaBlend, bool mayCreateBitmap)
{
- notImplemented();
- ASSERT_NOT_REACHED();
- return 0;
+ // FIXME: Add support for AlphaBlend.
+ ASSERT(!supportAlphaBlend);
+ return m_data->m_dc;
}
void GraphicsContext::releaseWindowsContext(HDC hdc, const IntRect& dstRect, bool supportAlphaBlend, bool mayCreateBitmap)
{
- notImplemented();
- ASSERT_NOT_REACHED();
}
void GraphicsContext::savePlatformState()
@@ -1779,7 +1777,7 @@ void GraphicsContext::drawFrameControl(const IntRect& rect, unsigned type, unsig
RECT rectWin = trRect;
if ((rectWin.right - rectWin.left) < boxWidthBest) {
- RefPtr<SharedBitmap> bmp = SharedBitmap::createInstance(true, boxWidthBest, boxHeightBest, true);
+ RefPtr<SharedBitmap> bmp = SharedBitmap::create(IntSize(boxWidthBest, boxHeightBest), BitmapInfo::BitCount16, true);
SharedBitmap::DCHolder memDC(bmp.get());
if (memDC.get()) {
RECT tempRect = {0, 0, boxWidthBest, boxHeightBest};