-
Notifications
You must be signed in to change notification settings - Fork 6k
[fuchsia][scenic] Add input shield flag support in Flatland. #36880
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc
Outdated
Show resolved
Hide resolved
shell/platform/fuchsia/flutter/flatland_external_view_embedder.h
Outdated
Show resolved
Hide resolved
cbb9a5a
to
b1b51e9
Compare
shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc
Outdated
Show resolved
Hide resolved
shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc
Outdated
Show resolved
Hide resolved
shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc
Outdated
Show resolved
Hide resolved
shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc
Outdated
Show resolved
Hide resolved
b1b51e9
to
124f672
Compare
shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc
Outdated
Show resolved
Hide resolved
flatland_->flatland()->AddChild(root_transform_id_, | ||
*input_interceptor_node_); | ||
|
||
// Attach full-screen hit testing shield. Note that since the hit-region |
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.
You can set this once in ctor and forget.
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.
Oh, i think i see - create the transform and attach the hit region to it, once. Then add-child this transform to child_transforms_ on each frame submit. Right?
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.
Yes that is correct. I initially thought that a transform had to be added as a child before setting its hit region. Turns out I was wrong. Fixed !
124f672
to
d14ad4f
Compare
@@ -36,6 +36,20 @@ FlatlandExternalViewEmbedder::FlatlandExternalViewEmbedder( | |||
root_transform_id_ = flatland_->NextTransformId(); | |||
flatland_->flatland()->CreateTransform(root_transform_id_); | |||
flatland_->flatland()->SetRootTransform(root_transform_id_); | |||
|
|||
if (intercept_all_input) { | |||
input_interceptor_node_ = flatland_->NextTransformId(); |
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.
Can we call it input_interceptor_transform_ instead? Node is a gfx specific resource.
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.
Done
{{{0, 0, kMaxHitRegionSize, kMaxHitRegionSize}, | ||
fuchsia::ui::composition::HitTestInteraction:: | ||
SEMANTICALLY_INVISIBLE}}); | ||
} |
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.
Gfx is adding the child here, so lets just follow that? We should also add it to child_transforms_.
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.
Done
This CL adds support for "intercept_all_input" flag in flutter_runner_config for flatland. Test: flutter-embedder-test
d14ad4f
to
2207476
Compare
This CL adds support for "intercept_all_input" flag in flutter_runner_config for flatland.
Test: This code path will be tested once the flatland config is enabled for flutter embedder tests. This patch is a prereq for the test to roll.
Pre-launch Checklist
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.