[webkit-reviews] review denied: [Bug 16979] Patch to conditionalize some CG/Cairo support in win32 : [Attachment 18811] Correct typo to Sixth patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 31 06:33:20 PST 2008


Adam Roben <aroben at apple.com> has denied Brent Fulgham <bfulgham at gmail.com>'s
request for review:
Bug 16979: Patch to conditionalize some CG/Cairo support in win32
http://bugs.webkit.org/show_bug.cgi?id=16979

Attachment 18811: Correct typo to Sixth patch
http://bugs.webkit.org/attachment.cgi?id=18811&action=edit

------- Additional Comments from Adam Roben <aroben at apple.com>
+    if (dc) {
+	 cairo_surface_t* surface = cairo_win32_surface_create(dc);
+	 m_data->cr = cairo_create(surface);
+	m_data->m_hdc = dc;
+    } else {
+	 setPaintingDisabled(true);
+	 m_data->cr = 0;
+	m_data->m_hdc = 0;
+    }

There are some tabs here that will have to be removed before landing.

 void BitmapImage::drawFrameMatchingSourceSize(GraphicsContext* ctxt, const
FloatRect& dstRect, const IntSize& srcSize, CompositeOperator compositeOp)
 {
     int frames = frameCount();
+    size_t imageHeight = 0;
+    size_t imageWidth = 0;
     for (int i = 0; i < frames; ++i) {
-	 CGImageRef image = frameAtIndex(i);
-	 if (CGImageGetHeight(image) == (size_t)srcSize.height() &&
CGImageGetWidth(image) == (size_t)srcSize.width()) {
+	 NativeImagePtr image = frameAtIndex(i);
+	 imageHeight = CGImageGetHeight(image);
+	 imageWidth = CGImageGetWidth(image);
+	 if (imageHeight == static_cast<size_t>(srcSize.height()) && imageWidth
== static_cast<size_t>(srcSize.width())) {

I still don't think imageHeight and imageWidth should be moved out of the loop
like this, and we should be using CGImageRef instead of NativeImagePtr. Similar
comments apply to ImageCairoWin.cpp.

It's great that this builds now! These last couple of issues are the only
problems I see.


More information about the webkit-reviews mailing list