Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Fix the issue that PrerollContext.has_texture_layer is sticky.#35425

Merged
auto-submit[bot] merged 2 commits intoflutter:mainfrom
guoguo338:has_texture_layer
Aug 17, 2022
Merged

Fix the issue that PrerollContext.has_texture_layer is sticky.#35425
auto-submit[bot] merged 2 commits intoflutter:mainfrom
guoguo338:has_texture_layer

Conversation

@guoguo338
Copy link
Contributor

@guoguo338 guoguo338 commented Aug 16, 2022

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

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

@ColdPaleLight ColdPaleLight requested a review from flar August 16, 2022 09:52
Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

bool fake_reads_surface = false,
bool fake_opacity_compatible_ = false);
bool fake_opacity_compatible_ = false,
bool fake_has_texture_layer = false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ColdPaleLight - thoughts...? Is this becoming a maintenance trap?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, bit flags sound great. We will file a new PR to address it.

Copy link
Member

@ColdPaleLight ColdPaleLight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ColdPaleLight ColdPaleLight added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 17, 2022
@auto-submit auto-submit bot merged commit 4024ff1 into flutter:main Aug 17, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants