Right now there are three places in WebKit2 where we have to set up a GraphicsContext to act as a base-level HiDPI GraphicsContext. Once in DrawingAreaImpl::display() which sets up the context for the main web page. Then twice in WebPage.cpp for snapshotting functions. I wanted to improve those three places so that they set up a HiDPI context in a way that is more straightforward.
Created attachment 112405 [details] Patch
Comment on attachment 112405 [details] Patch Attachment 112405 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/10208488
Comment on attachment 112405 [details] Patch Attachment 112405 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10209391
Created attachment 112412 [details] Another patch
Comment on attachment 112412 [details] Another patch View in context: https://bugs.webkit.org/attachment.cgi?id=112412&action=review > Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:1597 > + scale(FloatSize(deviceScaleFactor, deviceScaleFactor)); A slightly neater way to do this would be to keep this common part in the cross-platform applyDeviceScaleFactor() and have that one call a private platformApplyDeviceScaleFactor() that would have a no-op definition in GraphicsContext.cpp and a CG-specific definition in GraphicsContextCG.cpp, but I think this is okay for now.
(In reply to comment #5) > (From update of attachment 112412 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=112412&action=review > > > Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:1597 > > + scale(FloatSize(deviceScaleFactor, deviceScaleFactor)); > > A slightly neater way to do this would be to keep this common part in the cross-platform applyDeviceScaleFactor() and have that one call a private platformApplyDeviceScaleFactor() that would have a no-op definition in GraphicsContext.cpp and a CG-specific definition in GraphicsContextCG.cpp, but I think this is okay for now. Oh, I like that! I'll do that! Thanks for the review, Dan!
Committed change with revision 98406.