[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
bfulgham at webkit.org
bfulgham at webkit.org
Thu Oct 29 20:41:15 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 0be6f95ea0c46beb24cc888b2a14032879dafb89
Author: bfulgham at webkit.org <bfulgham at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 7 20:51:50 2009 +0000
Unreviewed build fix for Windows (Cairo).
Provide implementation of new BitmapImage::create that was
added in @r49060.
* platform/graphics/win/ImageCairoWin.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0391fb6..6d591e8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,12 @@
+2009-10-07 Brent Fulgham <bfulgham at webkit.org>
+
+ Unreviewed build fix for Windows (Cairo).
+
+ Provide implementation of new BitmapImage::create that was
+ added in @r49060.
+
+ * platform/graphics/win/ImageCairoWin.cpp:
+
2009-10-07 Andrew Scherkus <scherkus at chromium.org>
Reviewed by Eric Carlson.
diff --git a/WebCore/platform/graphics/win/ImageCairoWin.cpp b/WebCore/platform/graphics/win/ImageCairoWin.cpp
index 591375f..0b27438 100644
--- a/WebCore/platform/graphics/win/ImageCairoWin.cpp
+++ b/WebCore/platform/graphics/win/ImageCairoWin.cpp
@@ -28,12 +28,33 @@
#include "BitmapImage.h"
#include "GraphicsContext.h"
#include <cairo.h>
+#include <cairo-win32.h>
#include <windows.h>
#include "PlatformString.h"
namespace WebCore {
+PassRefPtr<BitmapImage> BitmapImage::create(HBITMAP hBitmap)
+{
+ DIBSECTION dibSection;
+ if (!GetObject(hBitmap, sizeof(DIBSECTION), &dibSection))
+ return 0;
+
+ ASSERT(dibSection.dsBm.bmBitsPixel == 32);
+ if (dibSection.dsBm.bmBitsPixel != 32)
+ return 0;
+
+ ASSERT(dibSection.dsBm.bmBits);
+ if (!dibSection.dsBm.bmBits)
+ return 0;
+
+ cairo_surface_t* image = cairo_win32_surface_create_with_dib (CAIRO_FORMAT_ARGB32, dibSection.dsBm.bmWidth, dibSection.dsBm.bmHeight);
+
+ // The BitmapImage object takes over ownership of the cairo_surface_t*, so no need to destroy here.
+ return adoptRef(new BitmapImage(image));
+}
+
bool BitmapImage::getHBITMAPOfSize(HBITMAP bmp, LPSIZE size)
{
ASSERT(bmp);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list