diff options
author | Ben Murdoch <benm@google.com> | 2011-06-02 12:07:03 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-10 10:47:21 +0100 |
commit | 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch) | |
tree | e4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp | |
parent | 87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff) | |
download | external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2 |
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp b/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp index f2850e4..28ce55a 100644 --- a/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp +++ b/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp @@ -26,9 +26,9 @@ #include "config.h" #include "GraphicsContext.h" -#if PLATFORM(CG) +#if USE(CG) #include "GraphicsContextPlatformPrivateCG.h" -#elif PLATFORM(CAIRO) +#elif USE(CAIRO) #include "GraphicsContextPlatformPrivateCairo.h" #endif @@ -65,21 +65,20 @@ bool GraphicsContext::shouldIncludeChildWindows() const GraphicsContext::WindowsBitmap::WindowsBitmap(HDC hdc, IntSize size) : m_hdc(0) - , m_size(size) { - BitmapInfo bitmapInfo = BitmapInfo::create(m_size); + BitmapInfo bitmapInfo = BitmapInfo::create(size); - m_bitmap = CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, reinterpret_cast<void**>(&m_bitmapBuffer), 0, 0); + void* storage = 0; + m_bitmap = CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &storage, 0, 0); if (!m_bitmap) return; m_hdc = CreateCompatibleDC(hdc); SelectObject(m_hdc, m_bitmap); - BITMAP bmpInfo; - GetObject(m_bitmap, sizeof(bmpInfo), &bmpInfo); - m_bytesPerRow = bmpInfo.bmWidthBytes; - m_bitmapBufferLength = bmpInfo.bmWidthBytes * bmpInfo.bmHeight; + m_pixelData.initialize(m_bitmap); + + ASSERT(storage == m_pixelData.buffer()); SetGraphicsMode(m_hdc, GM_ADVANCED); } |