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 - 0.39.1

Published by pragmatrix over 3 years ago

39.1 is a maintenance release:

  • #504 adds two functions to Pixmap for accessing pixels in a safe way (suggested by @virtualritz and @konstare).
  • #506 fixes a build error on macOS M1 (ARM) variants and when cross-comping on mac Intel Big Sur to aarch64-apple-darwin (thank you @splatte).
  • #505 From now on, binaries for Linux with the feature set gl,x11 and gl,textlayout,x11 are available. They can be used to run the gl-window example on Linux distributions with the X11 protocol supported (reported by @qingxiang-jia).
rust-skia - 0.39.0

Published by pragmatrix over 3 years ago

This release brings rust-skia up to date with the Milestone 90 of Skia (#480).

Also:

  • #493 Point can now be divided by a scalar (suggested by @liquidev)
  • #494 Surface::draw now accepts Point instead of Size (reported by @liquidev)
  • #492 Hint that Canvas::local_to_device() should be used instead of the deprecated Canvas::get_total_matrix (reported by @ctrlcctrlv)
rust-skia - 0.38.3

Published by pragmatrix over 3 years ago

  • #487 wraps the SkTypeface::openStream() function as to_font_data()
rust-skia - 0.38.2

Published by pragmatrix over 3 years ago

Another hotfix release that works around a potential build problem on Windows: 369b008fdff88d22dddab64a461b0a2b78fef544, https://github.com/rust-lang/regex/issues/750

rust-skia - 0.38.1

Published by pragmatrix over 3 years ago

This is a hotfix release fixing a bug in the conversion from 3x3 Matrix type to a 4x4 M44 matrix (#482).

rust-skia - 0.38.0

Published by pragmatrix over 3 years ago

This version updates all wrappers to Chrome Milestone 89 (detailed release notes can be found here):

Additionally:

  • #463 @palfrey removed the serial_test_derive dependency.
  • #464 improved the Visual Studio resolver.
  • #459 uses ureq version 2.
  • #470 Color4f derives Copy.
  • #473 fixes some clippy warnings in Rust 1.51.
  • #460 updates all wrappers to Milestone 89 (the chrome/m89 Skia branch).
  • #479 @superwhiskers Added nix development shell files.

In #479, the environment variables SKIA_OFFLINE_SOURCE_DIR, SKIA_OFFLINE_NINJA_COMMAND and SKIA_OFFLINE_GN_COMMAND were renamed to SKIA_SOURCE_DIR, SKIA_NINJA_COMMAND and SKIA_GN_COMMAND, respectively. So if you maintain custom build scripts that set these environment variables, you must use the renamed counterparts.

rust-skia - 0.37.0

Published by pragmatrix over 3 years ago

This release updates all bindings and wrappers to Skia's Milestone 88. Detailed release notes can be found here.

Besides of a number of maintenance tasks and the update to Milestone 88 (#445), this update contains the following changes:

  • #433 makes it possible to build rust-skia on more Linux based platforms. @Vurich

  • #435 added support for the Wayland Window Manager through the features egl, x11, wayland. @Vurich

  • #436 fixes wrong line feeds in repository. @Vurich

  • #450 corrects a wrong enumeration value. @StringKe

  • #457 makes Paint::set_color4f accept Option<&ColorSpace> instead of just &ColorSpace. Suggested by @JackRedstonia in #456.

  • Because of a stack overflow on Windows after a recent update to thread_local 1.1, we stick to version 1.0.1 for now.

This update should build on M1 Macs, though we don't have any configuration of that yet.

And for a creative use of rust-skia, take a look at the GitHub project loopers, which is a graphical live looper that uses rust-skia to render its user interface.

Thank you all for the contributions and the 400 stars!

rust-skia - 0.36.0

Published by pragmatrix almost 4 years ago

This release updates rust-skia to match Skia's milestone 87. At skia.org you'll find the detailed release notes.

In addition to that @j4qfrost removed the curl dependency and replaced it with ureq to prevent build errors on Linux without OpenSSL installed (#426).

rust-skia - 0.35.1

Published by pragmatrix about 4 years ago

This is a bugfix release that fixes potential access violations in several wrapper functions. You should update to this version immediately.

As @MNTRA thankfully found out in #427, the invocation of some functions caused access violations and the reason behind that was that some C++ member functions, generated by Bindgen, were called directly from Rust without considering that a caller has to use the C++ calling convention / ABI. PR #428 adds some tests and additional C wrapper functions to fix all the potentially problematic wrapper functions we are aware of.

rust-skia - 0.35.0

Published by pragmatrix about 4 years ago

Chrome 86 was released a few days ago and rust-skia has been updated to support the Skia branch chrome/86 (#390). Detailed release notes for Skia can be found here.

The most important change is that gpu::Context split up into three types which build up on each other. The most basic one is gpu::RecordingContext, then there is gpu::Context, and finally gpu::DirectContext. From the Skia release notes:

Ganesh is moving towards replacing GrContext with the GrDirectContext/GrRecordingContext pair. GrDirectContexts have direct access to the GPU and are very similar to the old GrContext. GrRecordingContexts are less powerful contexts that lack GPU access but provided context-like utilities during DDL recording.

These types were represented in C++ by simple derivation, in which GrContext derives from GrRecordingContext and GrDirectContext from GrContext. On the Rust side, Deref traits are implemented to accept all context types when a gpu::RecordingContext is expected, and gpu::DirectContext & gpu::Context when a &mut gpu::Context is expected. This should cover most use cases and should make it possible to update to skia-safe 0.35 with only minor adjustments, if any.

More notable changes:

  • #390: Together with the Milestone 86 update PR, a GrContextOptions wrapper was added.
  • #424: Even though technically defined as private because of their definition in the /skia/include/private directory, we've decided to wrap all the functions in GrContext_Base, primarily for supporting downcasts from a gpu::RecordingContext to a gpu::DirectContext.
rust-skia - 0.34.2

Published by pragmatrix about 4 years ago

This release contains some minor fixes that aren't breaking and the highlight is that we now generate rudimentary online documentation. Although there isn't much to be seen, it makes browsing the skia-safe types possible and should help discovering the structure of the Rust API surface. Thank you @ctrlcctrlv for the nudge.

  • #415 #412: Add cargo doc generated documentation.
  • #416 #389: GIF image decoding support was accidentally removed, this change reenables it, documents the codecs available, and adds test cases to validate which codecs are available. Thank you @samizdatco for asking to clarify which codecs Skia supports.
  • #417 Adds support for the WEBP image encoding format gated behind the new feature webp.

With this release I want to point to two new interesting projects that are built with the help of skia-safe:

rust-skia - 0.34.0

Published by pragmatrix about 4 years ago

This is a maintenance and bugfix release that may also break compatibility with previous versions:

  • #396 Improves the wrapper for SkCodec.
  • #400 Never trigger a full build when the download of binaries was forced.
  • #401 Internal: Use ptr::NonNull where appropriate.
  • #402 Breaking: Only expect a mutable reference in functions that expect a mutable Canvas. @Kethku
  • #405 Additional binaries are now release for the features d3d and d3d,textlayout for Windows targets. @yohopanda
  • #406 Bugfix: Previous Linux binaries were built with a dependency to libstdc++ 6.0.28, from this version on, we depend only on 6.0.25 to be compatible with more Linux distributions. @samizdatco
  • #407 EMPTY_IRECT and Matrix::IDENTITY were constified. The long term goal here is to remove the lazy-static dependency.
  • #410 The module shaper::run_handler was made public to support the implementation of custom run handlers. @aarondail
rust-skia - 0.33.0

Published by pragmatrix about 4 years ago

This release updates Skia to Milestone 85 and adds wrappers for the Direct3D backend. To use them, add the feature d3d.

Here are the PRs that went into this update:

  • #381 Rust-skia now supports the Direct3D backend of Skia.
  • #387 #386 A problem in the PictureRecorder wrapper was fixed that caused segmentation faults if used inappropriately. Reported by @samizdatco.
  • #352 Updated Skia to Milestone 85 (Release Notes).
  • #383 The Size type can now be divided by and multiplied with a scalar.
  • #384 Color::from_argb and Color::from_rgb are now const functions.
  • #385 #300 @therealbnut suggested that the Paragraph API should not expect &mut self for several functions that are obviously meant to be const methods in C++.
  • #382 The OpenGL window rendering example now renders and animates the rust-skia logo / icon.
rust-skia - 0.32.1: HOTFIX Release

Published by pragmatrix about 4 years ago

Bindgen version 0.54.1 was yanked this night with the effect that version 0.32.0 was not compilable anymore. This release relaxes the version requirement on bindgen #391.

rust-skia - 0.32.0

Published by pragmatrix about 4 years ago

This release contains bug fixes and some usability enhancements:

  • #374 fixes the wrapper for Canvas::is_clip_rect() as reported by @colorhook in #373.
  • #378 @samizdatco reported in #375 that MaskFilter::blur() must return an Option. This is a breaking change.
  • #379 supports passing any reference counted value as a reference whenever the Skia API takes ownership of the handle. This was inspired by @samizdatco who wanted to pass an &Image instead of Image to image_filters::image in #377.
  • #380 fixes broken Windows builds after an update to Visual Studio 2019 16.7.
rust-skia - 0.31.0

Published by pragmatrix about 4 years ago

This release contains bugfixes, Send & Sync traits, and support for configuring Vulkan extensions:

The detailed changes:

  • #364 add Data::new_bytes to create without copy, contributed by @syrel
  • #361 Support Vulkan Extension
  • #362 Implement Send and Sync Traits
  • #366 Make Pixmap::new() implementation actually use the arguments
  • #365 IRect: computation of width() and height() with negative left / top values should not cause an overflow
  • #368 Update Skia (deprecating two - probably rarely used - functions from core/vertices.rs)
rust-skia - 0.30.1

Published by pragmatrix about 4 years ago

A hotfix release that fixes a potential crash when a Vulkan context was set up. See #358 and #359 for the details.

rust-skia - 0.30.0

Published by pragmatrix over 4 years ago

A few days behind schedule, this release aligns the Rust wrappers with Skia's milestone 84 (#336, release notes).

And in addition to that

  • @Vengarioth suggested a function FourByteTag::from_chars that was added in #339 and also found that the Rust shaping wrappers had some limitations that we've tried to mitigate in #338.
  • @lykhonis found and fixed a bug in the wrapper function Image::peek_pixel in #341 and also added a missing wrapper Context::perform_deferred_cleanup in #342. Thank you for that!
  • @theotherjimmy initiated and pushed forward environment variable based support for offline builds in #340 and #343.

Also we merged some minor internal and build fixes that should have no effect on the crate usage. These were: #347, #348, #350, #351, #353, #354.

rust-skia - 0.29.3

Published by pragmatrix over 4 years ago

This release updates the Rust wrappers to Skia's Milestone 83.

rust-skia - 0.27.3

Published by pragmatrix over 4 years ago

This release adds:

  • @lykhonis provided build support for armv7. #324
  • @j4qfrost introduced a new environment variable SKIA_BINARIES_URL that is used to configure the download URL for the prebuilt binaries. #332

.. and tweaks some internals:

  • The binding's C++ code is now build with -std=c++17 to be compatible with the Skia build. #327
  • We don't support support Apple's Clang for Android builds on macOS anymore. You'll have to install LLVM 10. #327
  • We made sure that the Android build works with NDK version r21b and updated the build instructions. #326
  • We've added some yet experimental unsafe functions to allow users of skia-safe more control over the wrapper and wrapped types. #320
  • We've improved support for builds that use RUST_FLAGS=-Clink-dead-code. #321
  • We've removed a number of directories from the Skia repository that are not used in our builds. #329

and for the example seekers:

  • @nornagon contributed a new example skia-safe/examples/gl-window to skia-safe. The first one that actually renders to a window. #317 #323
  • The skia-org example took quite a lot memory on Metal devices. We've added a nested autorelease pool to prevent that. #319
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