-
Notifications
You must be signed in to change notification settings - Fork 2k
[GTK][WPE] Limit the damage region of the scrollbar to the region actually painted #66417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ | |
|
|
||
| namespace WebCore { | ||
|
|
||
| class Damage; | ||
| class GraphicsContext; | ||
|
|
||
| namespace AdwaitaScrollbarPainter { | ||
|
|
@@ -76,7 +77,7 @@ struct State { | |
| std::optional<ScrollbarColor> scrollbarColor; | ||
| }; | ||
|
|
||
| void paint(GraphicsContext&, const IntRect&, const State&); | ||
| void paint(GraphicsContext&, const IntRect&, const State&, Damage* damageOut = nullptr); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be possible to use std::optional instead of a pointer?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| } // namespace AdwaitaScrollbarPainter | ||
| } // namespace WebCore | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,9 +33,9 @@ namespace WebCore { | |
|
|
||
| class ScrollerImpAdwaita : public ThreadSafeRefCounted<ScrollerImpAdwaita> { | ||
| public: | ||
| void paint(GraphicsContext& graphicsContext, const IntRect& damageRect, const AdwaitaScrollbarPainter::State& state) | ||
| void paint(GraphicsContext& graphicsContext, const IntRect& damageRect, const AdwaitaScrollbarPainter::State& state, Damage& damageOut) | ||
| { | ||
| AdwaitaScrollbarPainter::paint(graphicsContext, damageRect, state); | ||
| AdwaitaScrollbarPainter::paint(graphicsContext, damageRect, state, &damageOut); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I missed this, here is where we pass the pointer. |
||
| } | ||
| }; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? paint expects a pointer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This calls ScrollerImpAdwaita::paint rather than AdwaitaScrollbarPainter::paint.