-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[fuchsia][a11y] Set explicit hit regions per compositor layer on GFX. #33852
[fuchsia][a11y] Set explicit hit regions per compositor layer on GFX. #33852
Conversation
cc @akbiggs |
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.
Lets go over this via GVC, there is some complex stuff I need to explain to you in here
layer->second.recorder->finishRecordingAsPicture(); | ||
FML_CHECK(picture != nullptr); | ||
|
||
canvas->setMatrix(SkMatrix::I()); |
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.
The complex part I was talking about before....
Lines 302-306 need to happen after the Present() below
We pipeline the Skia rendering work with the scenic IPC, and the fences passed to Present() make sure Scenic delays internally until Skia is finished
Moving the Skia rendering work up here will likely cause a performance regression
You really only need to move "finishRecordingAsPicture" up here, in order to populate the RTree. Can you break this part into 2 pieces, before and after Present()? It would also help to add a comment below, on the Skia code after Present, explaining the pipelining (my bad for not doing that originally)
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.
Thanks for the explanation. I broke up the pre- and post-Present() operations as you suggested.
I had to cache the sk_sp returned by finishRecordingAsPicture
at the beginning of the method, so that I could draw it to the canvas after the Present() call at the end of the method. Is that safe to do?
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.
Yeah that should be safe to do.
finishRecordingAsPicture
doesn't actually do any GPU work, it just records the commands from the SkRecordingCanvas into an SkPicture (a type of command buffer).
The canvas->drawPicture after Present() is what actually does the GPU work
1257737
to
1531372
Compare
1531372
to
31466f4
Compare
@@ -677,4 +717,121 @@ TEST_F(GfxExternalViewEmbedderTest, SceneWithOneView) { | |||
loop().RunUntilIdle(); | |||
} | |||
|
|||
TEST_F(GfxExternalViewEmbedderTest, SimpleSceneDisjointHitRegions) { |
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.
Something I find useful for tests is to leave a comment at the top of the test explaining what behavior the test is validating since sometimes it can be hard to tell from the name alone.
shell/platform/fuchsia/flutter/tests/gfx_external_view_embedder_unittests.cc
Show resolved
Hide resolved
31466f4
to
8d386f3
Compare
… on GFX. (flutter#33852)" This reverts commit 0720dc1.
…or layer on GFX. (flutter#33852)" (flutter#34360)" This reverts commit 98b14f7.
This change modifies the GFX external view embedder class to set hit regions per compositor layer, which correspond to the bounds of the paint operations performed on the underlying skia canvas. The purpose of this change is to enable more accurate accessibility hit testing of flutter overlays. Today, scenic (fuchsia's graphics compositor) assumes all overlay content is full-screen, even if the overlay only paints content in a small region. With this change, scenic has enough information to determine accurately where overlay content is located.
fxbug.dev/100825
Pre-launch Checklist
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.