-
Notifications
You must be signed in to change notification settings - Fork 117
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
base: main
Are you sure you want to change the base?
scene viewport #2229
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick feedbacks, thanks.
322b83e
to
9a25d84
Compare
I'll check the regression bugs |
9a25d84
to
49eae77
Compare
368ea76
to
c1db549
Compare
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
c1db549
to
29238f8
Compare
Composition optimized by replacing axis-aligned clipping with viewport.
29238f8
to
aef2e72
Compare
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; |
There was a problem hiding this comment.
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;
87ee4f3
to
9b43b93
Compare
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.