[webkit-reviews] review granted: [Bug 7444] move QPainter to platform directory and name it GraphicsContext : [Attachment 6742] patch, improved a bit

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Tue Feb 28 11:53:43 PST 2006


Eric Seidel <macdome at opendarwin.org> has granted Eric Seidel
<macdome at opendarwin.org>'s request for review:
Bug 7444: move QPainter to platform directory and name it GraphicsContext
http://bugzilla.opendarwin.org/show_bug.cgi?id=7444

Attachment 6742: patch, improved a bit
http://bugzilla.opendarwin.org/attachment.cgi?id=6742&action=edit

------- Additional Comments from Eric Seidel <macdome at opendarwin.org>
I think this is backwards:

-    return new KRenderingDeviceContextQuartz(currentContext());
+    return new KRenderingDeviceContextQuartz((CGContextRef)[[NSGraphicsContext
currentContext] graphicsPort]);


I'm not quite sure why this ended up in GraphicsContextCG:

+void GraphicsContext::drawImageAtPoint(Image* image, const IntPoint& p,
Image::CompositeOperator compositeOperator)

Maybe I'm reading the patch backwords, but it looks like very little (at least
very little cg specific stuff) ended up in GraphicsContextCG

render_canvasimage.cpp:
+	     oldOperation =
GraphicsContext::getCompositeOperation(GraphicsContext::currentCGContext());

This seems to beg for further simplicification, but I guess that's the next
patch.

If you'd like you could also remove the DOM part of DOMString in RenderText.h. 
I assume you just did a s/DOM:://

This patch has your markup.cpp changes in it as well.  Those are long since
landed, iirc.

I'm not sure this assertion is still necessary:

-    ASSERT(currentCGContext() == QPainter().currentContext());
+    ASSERT(currentCGContext() == [[NSGraphicsContext currentContext]
graphicsPort]);

I reviewed the whole thing.  Looks great.  It may need a plt check, but it
doesn't look like any of this should affect performance.  r=me.



More information about the webkit-reviews mailing list