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

Conversation

@ColdPaleLight
Copy link
Member

@ColdPaleLight ColdPaleLight commented Jul 1, 2022

fix flutter/flutter#106946

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.

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

@flutter-dashboard
Copy link

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.

@ColdPaleLight ColdPaleLight force-pushed the checkerboard_raster_cache_images branch from 2d9fcc3 to 7b1dd66 Compare July 4, 2022 07:14
@ColdPaleLight
Copy link
Member Author

@flar I tweaked the patch to simplify the logic and added a unit test. Would you mind taking a look again? Thanks.

@ColdPaleLight ColdPaleLight requested a review from flar July 4, 2022 07:18
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.

Minor nit on indentation.

Also, do we have a test that confirms the behavior with raster cache checkerboarding off, but offscreen checkerboarding on? That would be nice, especially since we just got the 2 confused.

.matrix = matrix_,
.logical_rect = *paint_bounds,
.flow_type = flow_type,
.checkerboard = context.checkerboard_offscreen_layers,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we indent these lines the proper amount (4 spaces here).

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@ColdPaleLight
Copy link
Member Author

Also, do we have a test that confirms the behavior with raster cache checkerboarding off, but offscreen checkerboarding on? That would be nice, especially since we just got the 2 confused.

Yes, those tests are here
https://github.com/flutter/engine/blob/main/flow/layers/checkerboard_layertree_unittests.cc

@ColdPaleLight ColdPaleLight requested a review from flar July 7, 2022 08:08
@flar
Copy link
Contributor

flar commented Jul 14, 2022

Also, do we have a test that confirms the behavior with raster cache checkerboarding off, but offscreen checkerboarding on? That would be nice, especially since we just got the 2 confused.

Yes, those tests are here https://github.com/flutter/engine/blob/main/flow/layers/checkerboard_layertree_unittests.cc

I don't see them. All of those tests are outside of caching as far as I can tell...?

With offscreen vs rastercache checkerboarding being 2 flags we should be checking that all 4 combinations of

  • rastercache checkerboarding of content that has checkerboarded offscreen layers
  • layer-checkerboarding without any caching
  • rastercache checkerboarding without any offscreen layers inside them
  • neither

I think we already test the last 3, but we have no test of layer caching a layer that has a child that also has a saveLayer that will be offscreen-checkerboarded, do we?

@ColdPaleLight
Copy link
Member Author

ColdPaleLight commented Jul 14, 2022

Also, do we have a test that confirms the behavior with raster cache checkerboarding off, but offscreen checkerboarding on? That would be nice, especially since we just got the 2 confused.

Yes, those tests are here https://github.com/flutter/engine/blob/main/flow/layers/checkerboard_layertree_unittests.cc

I don't see them. All of those tests are outside of caching as far as I can tell...?

With offscreen vs rastercache checkerboarding being 2 flags we should be checking that all 4 combinations of

  • rastercache checkerboarding of content that has checkerboarded offscreen layers
  • layer-checkerboarding without any caching
  • rastercache checkerboarding without any offscreen layers inside them
  • neither

I think we already test the last 3, but we have no test of layer caching a layer that has a child that also has a saveLayer that will be offscreen-checkerboarded, do we?

I see, that test looks a little hard to implement though. Can we get this patch to land first? I filed an issue flutter/flutter#107676, we can address it in another PR.

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

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 15, 2022
betrevisan pushed a commit to betrevisan/engine that referenced this pull request Jul 15, 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.

The 'checkerboardRasterCacheImages' of 'MaterialApp' not working on master channel

2 participants