rust-skia

Rust Bindings for the Skia Graphics Library

MIT License

Downloads
1.7M
Stars
1.4K
Committers
39

Bot releases are visible (Hide)

rust-skia -

Published by pragmatrix over 4 years ago

This is a hotfix release that enables the compilation with the metal feature enabled directly from the crate again (#315). And in addition to that, we've added the ability to convert from gpu::gl::Format to gpu::gl::Enum and back (#312).

rust-skia -

Published by pragmatrix over 4 years ago

This release fixes a compilation error that happened when the feature metal was enabled for macOS and iOS targets. #303

rust-skia - 0.27.0

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:

  • @lykhonis contributed a first version of the wrapper for SkCodec. #292
  • The prebuilt Android libraries were updated to use the NDK r21 and the macOS binaries are built with macOS 10.15 Catalina. #289 #288
rust-skia -

Published by pragmatrix over 4 years ago

Yesterday 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

  • The "no feature" and "default" configuration now builds without OpenGL support and is therefore configured to render with the CPU only. To support OpenGL, the feature gl must be enabled. #269, #267
  • The FontCollection type's match_typeface function got replaced by find_typefaces.
  • The function to_xyd50 was removed from core::ColorSpace.
  • The type core::MultiPictureDraw was removed.
  • core::ColorMatrix got a complete revamp of most of its function signatures.
  • The types 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:

  • The environment variable 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, #251
  • @velyan contributed a PR to the skparagraph module that allowed for treating the type TypefaceFontProvider as FontMgr. #245
  • Contribution guidelines are now available! #246
  • The detection about when skia-bindings should be rebuilt was improved. #250, #265
  • @messense contributed a PR that enables PDF font subsetting by default in textlayout feature builds and found out that the bz2 library dependency on Linux wasn't required. #249, #262
  • @photex improved the LLVM location detection on Windows. #254
  • Google's Skia license is now distributed alongside the prebuilt binaries. #252, #259
  • @StewartCanva contributed a wrapper function that allows to specify the encoding quality of images that were exported from the core::Image type. #271
  • To reduce code duplication, most enum type wrappers were moved from skia-safe into the binding generation process of skia-bindings by rewriting their case names. #270
  • Whitespace issues are now ignored when patches are applied to Skia. #279

New projects that use rust-skia:

  • Neovide is a "No Nonsense Neovim Client in Rust" that uses rust-skia via Skulpin.
  • libskia exposes C wrappers to skia-safe.

Thank you all for the contributions that made this version possible!

rust-skia -

Published by pragmatrix almost 5 years ago

This is Hotfix release that fixes a build problem in the downloaded crate in case a matching prebuilt binary was not available and the feature textlayout was enabled. #255 #257.

rust-skia -

Published by pragmatrix almost 5 years ago

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.

rust-skia - 0.22.0

Published by pragmatrix almost 5 years ago

This release contains a few small but important enhancements and bug fixes:

  • @nof1000 added the missing wrapper function save_layer_alpha() to the Canvas wrapper type. #240
  • @messense added two missing functions to the paragraph/TextStyle wrapper. #241
  • @MarcoPolo found a compilation problem on Android 32 bit targets, #234, which got fixed in #239.
  • @katyo contributed a wrapper function for setting up an OpenGL context with a lambda function that is used to resolve OpenGL entry points. #236
rust-skia - 0.21.2

Published by pragmatrix almost 5 years ago

This release is a small maintenance update to the 0.21 version with two additions:

  • @syrel contributed support for compiling skia-bindings with the target-feature=+crt-static flag set. #230, #231.
  • The rustc compiler 1.41 beta 1 release introduced some clippy warnigs that were fixed in #232.
rust-skia - Chrome Milestone 79

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:

  • Support for an all-features binaries packages was provided by Keith Simmons (@Kethku). The binaries should be downloaded when the skia-safe crate is added to your Cargo.toml with the features vulkan,svg,textlayout enabled. #227
  • For Window, the binaries are now built with LLVM 9. #224
rust-skia - Chrome Milestone 78

Published 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.

rust-skia - 0.18.0

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:

  • Wrappers for reading and modifying OpenGL extensions were added. #200
  • A new driver opengl-es was added to the skia-org example, making it possible to render the images on Android. #207, #145
  • A compilation error with rustc 1.39 beta was fixed. #210
  • The wrappers for the remaining effects were completed. #208, #99
rust-skia - 0.17.0 M77

Published 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:

  • removed all mem::zeroed() uses.
  • Removed .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.
  • Vulkan re-exports were polished.
  • Build instructions for Windows were improved.
  • Build support for the new module skparagraph that implements text shaping for paragraphs is already in skia-bindings and the wrappers are prepared in #186.
  • The use statements at the beginning of the wrapper implementations were cleaned up a bit. #198
rust-skia - 0.16.0

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:

  • The lazy-static dependency is not pinned to version 1.3 anymore, instead, skia-safe needs at least version 1.4 for now. If that conflicts with your project, we probably can lower the minimum version. #194
  • The tools gn and ninja that are needed for a full Skia build are invoked with a full path now. Invoking them with a relative path was platform specific and also caused a weird problem on Windows with msys2. #192
  • The generated file skia-bindings/src/bindings.rs will run through clippy without warnings anymore (we've just disabled all clippy checks). #191
  • The code of the examples were simplified a bit. #187
  • Pictures, TextBlobs, and Typefaces can now be passed as reference or by value to most functions. #187
  • The package skia-safe is now tightly bound to the same version of skia-bindings.
rust-skia -

Published by pragmatrix about 5 years ago

The 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:

  • Skia was updated to the latest chrome/m76 branch commit. #183
  • Python2 detection has been improved. #182
  • Some types were marked as Send to be able to pass them safely across threads. #176
  • A redundant string copy was removed from the TextBlobBuilderRunHandler. #173
rust-skia - https://github.com/rust-skia/rust-skia/releases/tag/0.14.4

Published by pragmatrix about 5 years ago

rust-skia - https://github.com/rust-skia/rust-skia/releases/tag/0.14.3

Published by pragmatrix about 5 years ago

rust-skia - https://github.com/rust-skia/rust-skia/releases/tag/0.14.2

Published by pragmatrix about 5 years ago

rust-skia - https://github.com/rust-skia/rust-skia/releases/tag/0.14.1

Published by pragmatrix about 5 years ago

rust-skia - https://github.com/rust-skia/rust-skia/releases/tag/0.14.0

Published by pragmatrix about 5 years ago

rust-skia - https://github.com/rust-skia/rust-skia/releases/tag/0.13.0

Published by pragmatrix over 5 years ago

Package Rankings
Top 3.74% on Crates.io
Badges
Extracted from project README
crates.io license Windows QA Linux QA macOS QA Rust-skia icon