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

[impeller] implement GetPositionUVBuffer #40248

Merged
merged 6 commits into from
Mar 15, 2023

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Mar 13, 2023

Implements GetPositionUVBuffer for all geometry classes, moving the computation out of the vertex shader. Effectively, this makes the texture_fill and tiled_texture_fill vertex shaders identical. Also removes some duplicated code from TiledTextureContents to handle vertices.

This will make it easier to perform more cleanups, specifically we should be able to adjust this method a bit more to support a source rect, which will allow us to make Texture contents and TiledTexture contents both use a geometry class. Furhtermore, this will allow us to delete one of the vertex shaders, and replace the tiled_texture fragment shader with a specialize decal shader.

Optimizations that apply to drawImage/drawImageRect will be easier to make if they can be shared with TiledTexture (i.e. color filter forwarding, et cetera).

Fixes flutter/flutter#118553

@jonahwilliams jonahwilliams marked this pull request as ready for review March 13, 2023 16:54
entity.GetTransformation().GetMaxBasisLength());

VertexBufferBuilder<TextureFillVertexShader::PerVertexData> vertex_builder;
stroke_builder.IterateVertices(
Copy link
Member Author

Choose a reason for hiding this comment

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

I took a bit of a shortcut here, because refactoring the stroke computation to handle either path felt a bit like a premature optimization

@jonahwilliams jonahwilliams requested a review from bdero March 13, 2023 16:56
@jonahwilliams

This comment was marked as outdated.

@jonahwilliams

This comment was marked as outdated.

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

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 15, 2023
@auto-submit auto-submit bot merged commit 086b1a0 into flutter:main Mar 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 15, 2023
zanderso pushed a commit to flutter/flutter that referenced this pull request Mar 15, 2023
…122746)

* 3c3cbc738 Manual roll Dart SDK from c766fffb626e to 3b109a04f783 (9 revisions) (flutter/engine#40296)

* dee0ae590 [Impeller] Make matrix image filters work as expected with nested saving layers (flutter/engine#40299)

* 835759f4c Roll Skia from 4d90ba479527 to 3b9131c65c01 (5 revisions) (flutter/engine#40304)

* bbde3a77b Roll Fuchsia Linux SDK from BRE9jdqYpdkbU0j7H... to YaWqKKuj-fAqfpKCm... (flutter/engine#40306)

* 1a7e7c468 Roll Dart SDK from 3b109a04f783 to 5c210933cdfe (2 revisions) (flutter/engine#40307)

* 66a3324cf Analyze more shaders (flutter/engine#40285)

* 405c8513e [Impeller] Improve performance of CupertinoPicker with opacity peephole (flutter/engine#40101)

* 9fc3246bf Reland "Make FlutterTest the default test font" (#40188) (flutter/engine#40245)

* 3ed9f1236 Reland: "Added wide-gamut color support for `ui.Image.toByteData` and `ui.Image.colorSpace`" (flutter/engine#40312)

* e143b309c Bump lower Dart SDK constraints to 3.0 (flutter/engine#40178)

* 086b1a022 [impeller] implement GetPositionUVBuffer (flutter/engine#40248)

* ec151bf2c Revert Dart SDK to c766fffb626e (flutter/engine#40315)
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.

[Impeller] Use GetPositionUVBuffer in TiledTextureContents
2 participants