Rust Bindings for the Skia Graphics Library
MIT License
Bot releases are hidden (Show)
Published by pragmatrix over 4 years ago
This release updates the wrappers to the Milestone 81 of Skia. Besides minor changes, skia-safe should be compatibility with previous releases.
A summary of the changes in Skia can be found at Skia's website (scroll down to Milestone 81). And If you'd like to balance on the edge, we already got an update to Milestone 82 prepared in #301.
Notable changes in this release:
SkCodec
. #292Yesterday Chrome Version 80 stable got released and today rust-skia got updated with the recent changes of the Skia C++ graphics library.
This version is 0.26.1. The discontinuity from 0.23.2 can be explained with the large number of changes.
At first, the compatibility issues that might affect you in this update: #229
gl
must be enabled. #269, #267FontCollection
type's match_typeface
function got replaced by find_typefaces
.to_xyd50
was removed from core::ColorSpace
.core::MultiPictureDraw
was removed.core::ColorMatrix
got a complete revamp of most of its function signatures.core::Direction
, core::FillType
, core::Convexity
are deprecated and were replaced by the path_types::PathDirection
, path_types::PathFillType
, and path_types::PathConvexityType
, respectively.Besides of the update to Skia Milestone 80, the most important changes on the wrapper side are:
Support for Metal graphics was added for macOS and iOS builds. #275
To build Skia with Metal support and provide the Metal related wrappers, build skia-safe with the feature metal
.
The features svg
and shaper
were removed. #261, #273, #274
svg
is now included in the default build and shaper
was merged with textlayout
. Both features stay supported in skia-bindings and skia-safe, but will trigger a warning if used. For now, the feature svg
gets ignored and shaper
is promoted to textlayout
.
And here are the detailed changes since version 0.23.2:
SKIA_DEBUG
can now be used to build Skia with debugging enabled. This might help to track down bugs that weren't discoverable before. #185, #251TypefaceFontProvider
as FontMgr
. #245textlayout
feature builds and found out that the bz2 library dependency on Linux wasn't required. #249, #262core::Image
type. #271New projects that use rust-skia:
Thank you all for the contributions that made this version possible!
This is a hotfix release that changes two signatures in core/text_blob.rs
as @Kethku reported in #242. #243
This release introduces a breaking change. If you used TextBlob::alloc_run_pos_h
or TextBlob::alloc_run_pos_h
before, you might need to update the callers to these functions to borrow Font
instead of passing ownership.
Published by pragmatrix almost 5 years ago
This release contains a few small but important enhancements and bug fixes:
save_layer_alpha()
to the Canvas
wrapper type. #240paragraph/TextStyle
wrapper. #241Published by pragmatrix almost 5 years ago
This release is a small maintenance update to the 0.21 version with two additions:
target-feature=+crt-static
flag set. #230, #231.Published by pragmatrix almost 5 years ago
Pretty much aligned with the official Chrome 79 release, rust-skia got updated to version 0.21 to reflect the API changes introduced by Google's Skia team.
Take a look at the Skia release notes for the details.
In addition to the maintenance update, this marks the first version with a new Cargo feature textlayout
. It adds the Skia module skshaper
and the skparagraph
to the compilation.
The bindings for skparagraph
can be used to layout and re-layout text paragraphs with the help of HarfBuzz and ICU. And as I read somewhere, the Skia module was created for Flutter.
More notable changes:
skia-safe
crate is added to your Cargo.toml
with the features vulkan,svg,textlayout
enabled. #227Published by pragmatrix almost 5 years ago
Quite late, the 0.19 prerelease marks the update of rust-skia to Chrome Milestone 78.
This release should be compatible with prior versions.
To get an grip on the changes, take a look at the release notes by the Skia team. Most notably, the API for specifying filters got refactored. While skia-safe already wraps the new API and we are trying to keep the old functions around as long as possible, expect to see some annoying deprecation warnings.
For the poor souls in need to compile skia-bindings, we now support Android builds with Apple's XCode 11.
Also ... and for the first time, skia-safe is used in two open source projects reclutch and skulpin that were recently announced on reddit.
Published by pragmatrix about 5 years ago
The highlight of this release is a new example program, that renders the rust-skia logo.
Alberto González Palomo (@AlbertoGP), was kind and persistent enough to contribute a logo / icon for the library and an example program that renders images for an animation with skia-safe. #202
Further changes:
opengl-es
was added to the skia-org example, making it possible to render the images on Android. #207, #145Published by pragmatrix about 5 years ago
Chrome Version 77 will be released tomorrow and this project is on track with the updates in Skia that come along with it.
The most significant improvement of this release is that skia-bindings can cross-compile Skia with the latest Android NDK.
Also notable:
mem::zeroed()
uses..cargo/config
because Android's clang executables contain the API level in their name. The README.md explains how to configure the build to cross-compile for Android.Published by pragmatrix about 5 years ago
The most significant and breaking change of this release is that skia-safe now follows the API convention of Skia closely when it comes to passing ownership of reference counted types. This affects most functions that receive objects of the types ColorSpace
, Data
, Shader
, MaskFilter
, ColorFilter
, ImageFilter
, PathEffect
, and PixelRef
. #187
To update your code, these objects need to be passed as value and transfer ownership. Most changes should be trivial: Either remove an .as_ref()
, or if a reference is all you have, use .clone()
before passing the object.
Also notable:
skia-bindings/src/bindings.rs
will run through clippy without warnings anymore (we've just disabled all clippy checks). #191Pictures
, TextBlobs
, and Typefaces
can now be passed as reference or by value to most functions. #187The highlight of this release is that function inlining was enabled for the Skia build by reimplementing a large number of Skia functions in Rust that are defined in the C++ header files. The performance speedup should be significant, for example Harfbuzz text shaping should be up to 4 times faster. #178
Also:
chrome/m76
branch commit. #183Send
to be able to pass them safely across threads. #176TextBlobBuilderRunHandler
. #173Published by pragmatrix about 5 years ago
Published by pragmatrix about 5 years ago
Published by pragmatrix about 5 years ago
Published by pragmatrix about 5 years ago
Published by pragmatrix about 5 years ago
Published by pragmatrix over 5 years ago