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

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Jan 17, 2021

Rolls us to the latest integration Clang toolchain from Fuchsia. Still 12.0.0.

It's really not clear to me why this test didn't segfault before - it seems like it's pretty obviously dereferencing a null pointer.

This is a slight change in behavior though: previously, an image filter layer with a nullptr image filter could end up in the rastercache, whereas no it will not. I think that is more desirable, but hoping @flar can help determine that.

@flutter-dashboard

This comment has been minimized.


if (!filter_) {
set_paint_bounds(child_bounds);
return;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This avoids https://github.com/flutter/engine/pull/23751/files#diff-ed00eb358e01399f0680370efff68aa55b41d3a886d3a0d9c9c7078323660a37R55, which previously would get hit in the ImageFilterLayerTest.EmptyFilter test from flow_unittests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(line 55 below here, 52 in the original source)

@chinmaygarde
Copy link
Member

Whether contents are filtered ought to be immaterial to whether they are eligible for cache substitution. We can perform a filter null check here instead.

@dnfield
Copy link
Contributor Author

dnfield commented Jan 17, 2021

We'd have to check in both branches, or at least.juat check in the else branch right? Unless you're saying we should always cache if the filter is null.

My thought was that if the filter is null this layer itself is basically just a container layer and we don't need any additional special logic to cache it.

@dnfield
Copy link
Contributor Author

dnfield commented Jan 19, 2021

Or is it that this change could miss removing a cache entry if the filter were nulled out between prerolls?

Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

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

My thought was that if the filter is null this layer itself is basically just a container layer and we don't need any additional special logic to cache it.

Fair point.

@dnfield dnfield merged commit b58dbc8 into flutter:master Jan 19, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 19, 2021
fluttergithubbot pushed a commit to flutter/flutter that referenced this pull request Jan 19, 2021
gspencergoog pushed a commit to gspencergoog/engine that referenced this pull request Jan 20, 2021
hjfreyer pushed a commit to hjfreyer/engine that referenced this pull request Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants