RESOLVED FIXED 70852
Setting up a HiDPI base-level GraphicsContext should be more straightforward for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=70852
Summary Setting up a HiDPI base-level GraphicsContext should be more straightforward ...
Beth Dakin
Reported 2011-10-25 14:26:10 PDT
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.
Attachments
Patch (9.32 KB, patch)
2011-10-25 14:36 PDT, Beth Dakin
webkit-ews: commit-queue-
Another patch (9.50 KB, patch)
2011-10-25 14:59 PDT, Beth Dakin
mitz: review+
Beth Dakin
Comment 1 2011-10-25 14:36:51 PDT
Early Warning System Bot
Comment 2 2011-10-25 14:55:11 PDT
WebKit Review Bot
Comment 3 2011-10-25 14:55:50 PDT
Comment on attachment 112405 [details] Patch Attachment 112405 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10209391
Beth Dakin
Comment 4 2011-10-25 14:59:44 PDT
Created attachment 112412 [details] Another patch
mitz
Comment 5 2011-10-25 15:03:38 PDT
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.
Beth Dakin
Comment 6 2011-10-25 15:27:37 PDT
(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!
Beth Dakin
Comment 7 2011-10-25 16:09:30 PDT
Committed change with revision 98406.
Note You need to log in before you can comment on or make changes to this bug.