Skip to content

Introduce explicit Viewport sharing#96

Merged
grovesNL merged 1 commit intogrovesNL:mainfrom
iced-rs:explicit-viewport
May 8, 2024
Merged

Introduce explicit Viewport sharing#96
grovesNL merged 1 commit intogrovesNL:mainfrom
iced-rs:explicit-viewport

Conversation

@hecrj
Copy link
Copy Markdown
Contributor

@hecrj hecrj commented May 8, 2024

This PR introduces a Viewport type that explicitly holds the Params of a Pipeline.

This allows sharing a Viewport with multiple TextRenderer instances, reducing pipeline context changes.

Depends on #95.

Copy link
Copy Markdown
Owner

@grovesNL grovesNL left a comment

Choose a reason for hiding this comment

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

This looks great, thank you! Sharing Viewport explicitly seems like a good approach.

I wish we could derive this internally somehow and share params on a shared type like Pipeline. I'm not sure how we could do that without requiring something like a viewport index to be specified during screen resolution updates though.

@hecrj hecrj force-pushed the explicit-viewport branch from 69d0183 to 46dd250 Compare May 8, 2024 13:42
@hecrj hecrj force-pushed the explicit-viewport branch from 46dd250 to e8f89ab Compare May 8, 2024 13:42
@hecrj
Copy link
Copy Markdown
Contributor Author

hecrj commented May 8, 2024

Rebased on top of main!

I wish we could derive this internally somehow and share params on a shared type like Pipeline. I'm not sure how we could do that without requiring something like a viewport index to be specified during screen resolution updates though.

Right... It doesn't seem easy to figure out which params to invalidate internally. At least, we are mostly just trading an argument here (Resolution for Viewport).

@grovesNL grovesNL merged commit b411ea7 into grovesNL:main May 8, 2024
@hecrj hecrj deleted the explicit-viewport branch May 9, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants