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

Conversation

@jnschulze
Copy link
Member

@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.

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.

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

lgtm for the unbind cleanup here.

Will follow up to see if I can find the location where the texture was being accidentally used in the icon font rendering -- seems like we should be ensuring no previously bound texture is being used accidentally there.

This feels really similar to the multitexturing font bugs we used to see on iOS.

/cc @jvanverth who I recall I'd discussed that issue with years ago for any thoughts/insights.

@cbracken cbracken merged commit d6e5946 into flutter:master Mar 29, 2021
cbracken added a commit that referenced this pull request Mar 29, 2021
This will cause the previous texture binding used by Skia to be
incorrectly unbound, such that should they need to re-used an existing
binding, we'll end up rendering blank instead.

Instead we should be using

    context->flushAndSubmit();
    context->resetContext(kAll_GrBackendState);

in `EmbedderExternalTextureGL::ResolveTexture` in order to notify Skia
that we've updated handles within the current binding and invalidate any
assumptions about previous modifications it has made to the context.

This reverts commit d6e5946.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 30, 2021
chandarrengoog pushed a commit to chandarrengoog/engine that referenced this pull request Mar 30, 2021
chandarrengoog pushed a commit to chandarrengoog/engine that referenced this pull request Mar 30, 2021
…lutter#25292)

This will cause the previous texture binding used by Skia to be
incorrectly unbound, such that should they need to re-used an existing
binding, we'll end up rendering blank instead.

Instead we should be using

    context->flushAndSubmit();
    context->resetContext(kAll_GrBackendState);

in `EmbedderExternalTextureGL::ResolveTexture` in order to notify Skia
that we've updated handles within the current binding and invalidate any
assumptions about previous modifications it has made to the context.

This reverts commit d6e5946.
@jvanverth
Copy link
Contributor

While it's similar to the font corruption, it's not quite the same issue. That corruption was happening for two reasons. First, because of how the texture indexing was being passed into the shader, sometimes it would access the wrong atlas texture. Second, when we recycled areas in the atlas sometimes we uploaded over an area that was still in use. Both of these were internal to the font system so nothing external was stomping textures.

@cbracken
Copy link
Member

cbracken commented Apr 3, 2021

Replaced by #25349

duanqz pushed a commit to duanqz/engine that referenced this pull request Apr 16, 2021
duanqz pushed a commit to duanqz/engine that referenced this pull request Apr 16, 2021
…lutter#25292)

This will cause the previous texture binding used by Skia to be
incorrectly unbound, such that should they need to re-used an existing
binding, we'll end up rendering blank instead.

Instead we should be using

    context->flushAndSubmit();
    context->resetContext(kAll_GrBackendState);

in `EmbedderExternalTextureGL::ResolveTexture` in order to notify Skia
that we've updated handles within the current binding and invalidate any
assumptions about previous modifications it has made to the context.

This reverts commit d6e5946.
@jnschulze jnschulze deleted the fix-win-texture-interference branch June 18, 2021 19:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drawing in Texture() buffer on Windows causes viewport corruption on other widgets in screen

3 participants