Fix the issue that PrerollContext.has_texture_layer is sticky.#35425
Fix the issue that PrerollContext.has_texture_layer is sticky.#35425auto-submit[bot] merged 2 commits intoflutter:mainfrom
Conversation
Signed-off-by: xieguo <[email protected]>
flar
left a comment
There was a problem hiding this comment.
LGTM, there were a couple of oddities in the test code that I wanted you to look at again and render an opinion, but I see no blockers here.
|
|
||
| auto root = std::make_shared<ContainerLayer>(); | ||
| auto container_layer1 = std::make_shared<ContainerLayer>(); | ||
| auto container_layer2 = std::make_shared<ContainerLayer>(); |
There was a problem hiding this comment.
container_layer2 is added to root, but it is never given any children. Was mock_2 supposed to be placed in container_2? Either way, the test is valid, but the existence of container_2 looks odd.
| bool fake_reads_surface = false, | ||
| bool fake_opacity_compatible_ = false); | ||
| bool fake_opacity_compatible_ = false, | ||
| bool fake_has_texture_layer = false); |
There was a problem hiding this comment.
We have so many booleans as parameters now we should look for a solution that doesn't lead to a list of true/false values in the construction - bit flags perhaps? This is an idle thought that could be done in a future PR - what do you think?
There was a problem hiding this comment.
@ColdPaleLight - thoughts...? Is this becoming a maintenance trap?
There was a problem hiding this comment.
Yes, bit flags sound great. We will file a new PR to address it.
Signed-off-by: xieguo <[email protected]>
Fix the issue for PrerollContext.has_texture_layer is sticky and impacts layers unrelated to the TextureLayer, link as below:
flutter/flutter#103013
Pre-launch Checklist
writing and running engine tests.
///).