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

Cherry-pick upsteam bug fix to expose codec registration methods #132

Closed

Conversation

TomEdwardsEnscape
Copy link

Description of Change

Cherry pick of google/skia@ec70dfb

This commit exports SkCodec::Register from the library. The method accepts a C++ object so can't be easily wrapped in C#, but exposing it costs nothing and does at least enable users of SkiaSharp to register codecs by creating a native library. We want to do exactly this in our product.

SkiaSharp Issue

Fixes mono/SkiaSharp#2992

API Changes

Added:

  • SkCodec::Register
  • SKCodec::Decoder

Behavioral Changes

None.

Required SkiaSharp PR

None.

PR Checklist

  • Rebased on top of skiasharp at time of PR
  • Changes adhere to coding standard
  • Updated documentation

Without these, the various Sk*Decoder::Decode functions were not properly
being marked with SK_API and were not visible to Chromium.

Change-Id: I29b5bb630e54a26205a8f562d61929d61bc4aaec
Bug: skia:13983
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/714237
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
@TomEdwardsEnscape
Copy link
Author

I built Skia within the context of SkiaSharp and found out that it only exposes the C API, and building with both C and C++ exports fails.

So for the purpose of SkiaSharp, a further patch would be needed to expose SkCodec::Register separately from other C++ methods. I'll keep this PR open for now.

@mattleibow
Copy link

I believe that with my bump last night to the 117 milestone, this commit is now included! Thanks for this PR, hopefully I can keep skia more up-to-date and we never need to cherry pick (unless we are ready to eat those cherries and we are in the garden).

@mattleibow
Copy link

Closing this for now as it got merged for free.

@mattleibow mattleibow closed this Oct 29, 2024
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.

[FEATURE] Expose API for registering new codecs
3 participants