Content-Length: 397827 | pFad | http://github.com/thorvg/thorvg/pull/2229

7F scene viewport by mgrudzinska · Pull Request #2229 · thorvg/thorvg · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scene viewport #2229

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

mgrudzinska
Copy link
Collaborator

common: scene viewport api introduced

New api can be used to replace clipping with a rectangle.
Scenes with viewport set can be still clipped/masked.

@issue: #2172

loaders: use viewport in svg/lottie loader

The viewport api is used to replace the rectangular cliping.

@mgrudzinska mgrudzinska added the APIs Update / Revise APIs label Apr 29, 2024
@mgrudzinska mgrudzinska self-assigned this Apr 29, 2024
Copy link
Member

@hermet hermet left a comment

Choose a reason for hiding this comment

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

quick feedbacks, thanks.

src/loaders/lottie/tvgLottieBuilder.cpp Outdated Show resolved Hide resolved
inc/thorvg.h Show resolved Hide resolved
src/renderer/tvgPaint.cpp Outdated Show resolved Hide resolved
src/renderer/tvgScene.h Outdated Show resolved Hide resolved
src/renderer/tvgScene.h Outdated Show resolved Hide resolved
src/renderer/tvgScene.h Outdated Show resolved Hide resolved
src/renderer/tvgScene.cpp Show resolved Hide resolved
@hermet hermet added feature New feature additions renderer Core rendering and removed APIs Update / Revise APIs labels Apr 30, 2024
@mgrudzinska mgrudzinska force-pushed the mira/scene_viewport branch 3 times, most recently from 322b83e to 9a25d84 Compare May 3, 2024 00:35
@mgrudzinska mgrudzinska marked this pull request as draft May 3, 2024 00:41
@mgrudzinska
Copy link
Collaborator Author

I'll check the regression bugs

@mgrudzinska mgrudzinska force-pushed the mira/scene_viewport branch from 9a25d84 to 49eae77 Compare May 3, 2024 12:10
@mgrudzinska mgrudzinska marked this pull request as ready for review May 5, 2024 23:08
@mgrudzinska mgrudzinska force-pushed the mira/scene_viewport branch from 368ea76 to c1db549 Compare May 8, 2024 09:14
@mgrudzinska
Copy link
Collaborator Author

rebased, no other changes

New api can be used to replace clipping with a rectangle.
Scenes with viewport set can be still clipped/masked.

@issue: thorvg#2172
@mgrudzinska mgrudzinska force-pushed the mira/scene_viewport branch from c1db549 to 29238f8 Compare May 9, 2024 10:36
Composition optimized by replacing axis-aligned
clipping with viewport.
@mgrudzinska mgrudzinska force-pushed the mira/scene_viewport branch from 29238f8 to aef2e72 Compare May 9, 2024 10:36
@hermet
Copy link
Member

hermet commented May 13, 2024

Performance is enhanced by ~3% with Lottie example


bool viewport(int32_t* x, int32_t* y, int32_t* w, int32_t* h)
{
if (!vport) return false;
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps, It'd be better if we check the case all parameters are nullptr

if (!vport || !(x || y || w || h)) return false;

@hermet hermet force-pushed the main branch 6 times, most recently from 87ee4f3 to 9b43b93 Compare December 18, 2024 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature additions renderer Core rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/thorvg/thorvg/pull/2229

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy