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 Jun 20, 2023

Fixes flutter/flutter#128329
Fixes flutter/flutter#128807

The panorama example app is still not quite visually on par with skia - the scaling or filtering or something isn't quite as nice as in the skia backend - but it does render now and no longer tries to create gigantical textures.

@dnfield dnfield requested review from bdero and jonahwilliams June 20, 2023 20:31
@dnfield dnfield changed the title Fix up coverage hints for blending/vertices [Impeller] Fix up coverage hints for blending/vertices Jun 20, 2023
@dnfield dnfield self-assigned this Jun 20, 2023
Entity sub_entity;
auto color_size = contents.GetColorSourceSize();
if (color_size.has_value()) {
auto sx = coverage->size.width / color_size->width;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I believe sizes have operator/ already.

Copy link
Member

Choose a reason for hiding this comment

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

So the origin correction is the stuff missing here right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the operator/ now.

Adding the origin correction was making things wrong on Metal. Do we still need it for Vulkan?

Copy link
Member

Choose a reason for hiding this comment

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

Vulkan and Metal coordinate spaces should be configured to be the same (after the vk_khr_maintenance1).

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 20, 2023
Copy link
Member

@bdero bdero left a comment

Choose a reason for hiding this comment

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

LGTM. Would you happen to have a screengrab of the remaining issue? (No worries if not)

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 20, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 20, 2023

auto label is removed for flutter/engine, pr: 43017, due to - The status or check suite Mac mac_host_engine has failed. Please fix the issues identified (or deflake) before re-applying this label.

@dnfield
Copy link
Contributor Author

dnfield commented Jun 20, 2023

LGTM. Would you happen to have a screengrab of the remaining issue? (No worries if not)

I'll add screenshots to the issue I filed. Also looking into the CI failures

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 20, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 20, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 20, 2023

auto label is removed for flutter/engine, pr: 43017, due to - The status or check suite Linux linux_clang_tidy has failed. Please fix the issues identified (or deflake) before re-applying this label.

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 20, 2023
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #43017 at sha cc70d5b

@dnfield
Copy link
Contributor Author

dnfield commented Jun 21, 2023

I don't think those goldne changes are quite right :\

[&contents = *this, &entity, &coverage](const ContentContext& renderer,
RenderPass& pass) -> bool {
Entity sub_entity;
auto color_size = contents.GetColorSourceSize();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is quite right. Why would we need to perform a scale-up on the entity before rendering it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes this is the problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea was this would provide corrective scaling if the color source was down-scaled for coverage hinting we'd scale it to the right coordinate space again.

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 is gone now. Instead I'm overriding TiledTextureContents::RenderToSnapshot to pass through the original texture in cases where theeffect matrix is identity.

@dnfield dnfield changed the title [Impeller] Fix up coverage hints for blending/vertices [Impeller] Fix up coverage hints for blending/vertices, fix TiledTextureContents::RenderToSnapshot Jun 21, 2023
@dnfield dnfield requested a review from bdero June 21, 2023 23:55
Copy link
Member

@bdero bdero left a comment

Choose a reason for hiding this comment

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

LGTM

.transform = entity.GetTransformation(),
.sampler_descriptor = sampler_descriptor.value_or(sampler_descriptor_),
.opacity = GetOpacity(),
};
Copy link
Member

@bdero bdero Jun 22, 2023

Choose a reason for hiding this comment

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

This optimization will be a nice win for a lot of apps.

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #43017 at sha 33206dd

@dnfield
Copy link
Contributor Author

dnfield commented Jun 22, 2023

Golden changes look either small or expected to me.

@auto-submit auto-submit bot merged commit d9530e2 into flutter:main Jun 22, 2023
@dnfield dnfield deleted the coverage branch June 22, 2023 03:20
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 22, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 22, 2023
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 e: impeller will affect goldens

Projects

No open projects
Archived in project

3 participants