Summary: | [Win] Support High DPI drawing with CACFLayers | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||||||
Component: | Layout and Rendering | Assignee: | Brent Fulgham <bfulgham> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bfulgham, simon.fraser | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=146335 | ||||||||||
Bug Depends on: | 146335 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Brent Fulgham
2015-07-23 16:11:13 PDT
Note: Just like with Bug 146335, these scaling calculations are all done at 1x, unless the WebKit client opts into a high DPI state. Currently, testing is just to make sure no regressions to existing 1x drawing on Windows (and all drawing on other platforms) are not affected. Created attachment 265975 [details]
Patch
Comment on attachment 265975 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=265975&action=review > Source/WebCore/platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:128 > + CACFLayerSetContentsScale(layer->platformLayer(), scaleFactor); Does the base layer actually have contents? Why do we have to set contentsScale? Comment on attachment 265975 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=265975&action=review > Source/WebCore/ChangeLog:15 > + operations are don properly. don > Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:230 > +#if HAVE(CACFLAYER_SETCONTENTSSCALE) > + float scaleFactor = CACFLayerGetContentsScale(owner()->platformLayer()); > + CACFLayerSetContentsScale(layer.platformLayer(), scaleFactor); > +#endif This is confusing; I'm not sure how owner()->platformLayer() and layer.platformLayer() are different. Why isn't this handled via GraphicsLayerCA::deviceOrPageScaleFactorChanged() as it is for other platforms? Comment on attachment 265975 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=265975&action=review >> Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:230 >> +#endif > > This is confusing; I'm not sure how owner()->platformLayer() and layer.platformLayer() are different. > > Why isn't this handled via GraphicsLayerCA::deviceOrPageScaleFactorChanged() as it is for other platforms? Hmmmmm. I'll investigate before moving forward. (In reply to comment #3) > Comment on attachment 265975 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=265975&action=review > > > Source/WebCore/platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:128 > > + CACFLayerSetContentsScale(layer->platformLayer(), scaleFactor); > > Does the base layer actually have contents? Why do we have to set > contentsScale? According to the CA engineer who did the Windows work, this is needed for some arcane Windows-related reason. Created attachment 265987 [details]
Patch v2 (Ignore)
(In reply to comment #5) > Comment on attachment 265975 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=265975&action=review > > >> Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:230 > >> +#endif > > > > This is confusing; I'm not sure how owner()->platformLayer() and layer.platformLayer() are different. > > > > Why isn't this handled via GraphicsLayerCA::deviceOrPageScaleFactorChanged() as it is for other platforms? > > Hmmmmm. I'll investigate before moving forward. It looks like this isn't needed. In fact, I wasn't even being consistent, as the other places where CACFLayerInsertSublayer was being called did not have the scaling factor change included. Created attachment 265989 [details]
Patch
Committed r192700: <http://trac.webkit.org/changeset/192700> |