| Summary: | [WinCairo] Accelerated compositing does not respect device scale factor. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | peavo | ||||
| Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | achristensen, bfulgham | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
peavo
2015-08-17 12:20:35 PDT
Created attachment 259171 [details]
Patch
Comment on attachment 259171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259171&action=review does this fix pages like acko.net ? > Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp:166 > + TransformationMatrix m; > + m.scale(deviceScaleFactor()); > + double tx = (size.width() - size.width() / deviceScaleFactor()) / 2.0; > + double ty = (size.height() - size.height() / deviceScaleFactor()) / 2.0; > + m.translate(tx, ty); Why scale then translate? Where does the 2.0 come from? Comment on attachment 259171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259171&action=review r=me, with a few minor corrections. > Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp:165 > + double ty = (size.height() - size.height() / deviceScaleFactor()) / 2.0; Is this to center the view? > Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.h:55 > + virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& rectToPaint) override; Please remove 'virtual' for any methods that are 'override'. (In reply to comment #3) > Comment on attachment 259171 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=259171&action=review > > r=me, with a few minor corrections. > Thanks! > > Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp:165 > > + double ty = (size.height() - size.height() / deviceScaleFactor()) / 2.0; > > Is this to center the view? > Yes, I will add a comment before landing. > > Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.h:55 > > + virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& rectToPaint) override; > > Please remove 'virtual' for any methods that are 'override'. Ok, I will remove 'virtual' before landing :) (In reply to comment #2) > Comment on attachment 259171 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=259171&action=review > Thanks for reviewing :) > does this fix pages like acko.net ? > Yes, I believe so. > > Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp:166 > > + TransformationMatrix m; > > + m.scale(deviceScaleFactor()); > > + double tx = (size.width() - size.width() / deviceScaleFactor()) / 2.0; > > + double ty = (size.height() - size.height() / deviceScaleFactor()) / 2.0; > > + m.translate(tx, ty); > > Why scale then translate? Where does the 2.0 come from? The translate will center the view. Committed r188537: <http://trac.webkit.org/changeset/188537>. Looks great! Thanks! (In reply to comment #7) > Looks great! Thanks! Glad to hear it :) |