-
Notifications
You must be signed in to change notification settings - Fork 549
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
expose more of SKMatrix #2153
expose more of SKMatrix #2153
Conversation
SKMatrix o; | ||
fixed (SKMatrix* t = &this) | ||
{ | ||
SkiaApi.sk_matrix_post_translate(&o, t, dx, dy); |
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.
shouldn't it read sk_matrix_pre_translate()
here?
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.
Not sure, havnt worked on it in ages
Thanks for this PR! However, I am not sure the current I have been investigating this from a perf perspective and right now It may even be cheaper to use |
alright
…On Sun, 3 Mar 2024 at 06:15, Matthew Leibowitz ***@***.***> wrote:
Thanks for this PR! However, I am not sure the current SKMatrix approach
is the way we want to go for 3.0.
I have been investigating this from a perf perspective and right now
SKMatrix has terrible performance compared to SKMatrix44. It is about
200% slower because it has to hop the interop, and it also is deceiving
because using a struct is supposed to be light, however it does expensive
things.
- See #2779 <#2779>
It may even be cheaper to use Matrix4x4 under the hood. In addition to
the current interop, the managed struct does not have the matrix type mask
which skia uses to take shortcuts. As a result, even just passing the
struct between C++ and C# causes skia to have to recalculate it. It may be
better to just re-implement the whole thing in C#.
—
Reply to this email directly, view it on GitHub
<#2153 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGLITH7XCBP7JBLEKMB3ZZTYWIXM5AVCNFSM525MXEBKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJXGQ4DSNZSGMZQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Description of Change
Bugs Fixed
API Changes
None.
Behavioral Changes
None.
Required skia PR
#2153
PR Checklist