WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
148085
[WinCairo] Accelerated compositing does not respect device scale factor.
https://bugs.webkit.org/show_bug.cgi?id=148085
Summary
[WinCairo] Accelerated compositing does not respect device scale factor.
peavo
Reported
2015-08-17 12:20:35 PDT
Painting in accelerated compositing mode on WinCairo needs to take the device scale factor into account.
Attachments
Patch
(5.06 KB, patch)
2015-08-17 12:30 PDT
,
peavo
bfulgham
: review+
bfulgham
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
peavo
Comment 1
2015-08-17 12:30:27 PDT
Created
attachment 259171
[details]
Patch
Alex Christensen
Comment 2
2015-08-17 12:40:27 PDT
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?
Brent Fulgham
Comment 3
2015-08-17 12:41:46 PDT
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'.
peavo
Comment 4
2015-08-17 12:46:18 PDT
(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 :)
peavo
Comment 5
2015-08-17 12:48:20 PDT
(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.
peavo
Comment 6
2015-08-17 13:25:46 PDT
Committed
r188537
: <
http://trac.webkit.org/changeset/188537
>.
Alex Christensen
Comment 7
2015-08-17 13:33:46 PDT
Looks great! Thanks!
peavo
Comment 8
2015-08-17 13:40:17 PDT
(In reply to
comment #7
)
> Looks great! Thanks!
Glad to hear it :)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug