[GTK][WPE] Limit the damage region of the scrollbar to the region actually painted#66417
Conversation
|
EWS run on previous version of this PR (hash fefc36d) Details |
fefc36d to
d8a143b
Compare
|
EWS run on previous version of this PR (hash d8a143b) Details |
d8a143b to
9816afc
Compare
|
EWS run on previous version of this PR (hash 9816afc) Details |
| GraphicsContextSkia context(*canvas, RenderingMode::Accelerated, RenderingPurpose::DOM); | ||
| context.scale(contentsScale); | ||
| scrollerImp->paint(context, state.frameRect, state); | ||
| scrollerImp->paint(context, state.frameRect, state, damage); |
There was a problem hiding this comment.
Does this work? paint expects a pointer
There was a problem hiding this comment.
This calls ScrollerImpAdwaita::paint rather than AdwaitaScrollbarPainter::paint.
| }; | ||
|
|
||
| void paint(GraphicsContext&, const IntRect&, const State&); | ||
| void paint(GraphicsContext&, const IntRect&, const State&, Damage* damageOut = nullptr); |
There was a problem hiding this comment.
Would it be possible to use std::optional instead of a pointer?
There was a problem hiding this comment.
std::optional<Damage>& ? this is a raw reference. There is no big difference between raw reference and raw pointer. But, a raw pointer can be nullptr.
| void paint(GraphicsContext& graphicsContext, const IntRect& damageRect, const AdwaitaScrollbarPainter::State& state, Damage& damageOut) | ||
| { | ||
| AdwaitaScrollbarPainter::paint(graphicsContext, damageRect, state); | ||
| AdwaitaScrollbarPainter::paint(graphicsContext, damageRect, state, &damageOut); |
There was a problem hiding this comment.
Ah, I missed this, here is where we pass the pointer.
9816afc to
ad0aae2
Compare
|
EWS run on current version of this PR (hash ad0aae2) Details |
…ually painted https://bugs.webkit.org/show_bug.cgi?id=316268 Reviewed by Carlos Garcia Campos. The whole scrollbar layer was always damaged while the overlay scrollbar is hiding even though the most part of the overlay scrollbar is transparent. Only the visible part, scrollbar thumb area, should be damaged during the hiding animaiton. * Source/WebCore/page/scrolling/coordinated/ScrollerCoordinated.cpp: (WebCore::ScrollerCoordinated::updateValues): * Source/WebCore/platform/adwaita/AdwaitaScrollbarPainter.cpp: (WebCore::AdwaitaScrollbarPainter::paint): * Source/WebCore/platform/adwaita/AdwaitaScrollbarPainter.h: * Source/WebCore/platform/adwaita/ScrollerImpAdwaita.h: (WebCore::ScrollerImpAdwaita::paint): * Source/WebCore/platform/graphics/Damage.h: Canonical link: https://commits.webkit.org/314540@main
ad0aae2 to
0512cc5
Compare
|
Committed 314540@main (0512cc5): https://commits.webkit.org/314540@main Reviewed commits have been landed. Closing PR #66417 and removing active labels. |
0512cc5
ad0aae2
🧪 win-tests🧪 ios-wk2-wpt🧪 mac-intel-wk2