Rust Bindings for the Skia Graphics Library
MIT License
Bot releases are hidden (Show)
Published by pragmatrix over 3 years ago
39.1 is a maintenance release:
Pixmap
for accessing pixels in a safe way (suggested by @virtualritz and @konstare).aarch64-apple-darwin
(thank you @splatte).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).Published by pragmatrix over 3 years ago
This release brings rust-skia up to date with the Milestone 90 of Skia (#480).
Also:
Point
can now be divided by a scalar
(suggested by @liquidev)Surface::draw
now accepts Point
instead of Size
(reported by @liquidev)Canvas::local_to_device()
should be used instead of the deprecated Canvas::get_total_matrix
(reported by @ctrlcctrlv)Published by pragmatrix over 3 years ago
SkTypeface::openStream()
function as to_font_data()
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
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).
Published by pragmatrix over 3 years ago
This version updates all wrappers to Chrome Milestone 89 (detailed release notes can be found here):
Additionally:
serial_test_derive
dependency.Color4f
derives Copy
.chrome/m89
Skia branch).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.
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!
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).
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.
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:
GrContextOptions
wrapper was added./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
.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.
webp
.With this release I want to point to two new interesting projects that are built with the help of skia-safe:
Published by pragmatrix about 4 years ago
This is a maintenance and bugfix release that may also break compatibility with previous versions:
SkCodec
.ptr::NonNull
where appropriate.Canvas
. @Kethkud3d
and d3d,textlayout
for Windows targets. @yohopandalibstdc++ 6.0.28
, from this version on, we depend only on 6.0.25
to be compatible with more Linux distributions. @samizdatcoEMPTY_IRECT
and Matrix::IDENTITY
were constified. The long term goal here is to remove the lazy-static
dependency.shaper::run_handler
was made public to support the implementation of custom run handlers. @aarondailPublished 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:
Size
type can now be divided by and multiplied with a scalar.Color::from_argb
and Color::from_rgb
are now const functions.&mut self
for several functions that are obviously meant to be const methods in C++.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.
Published by pragmatrix about 4 years ago
This release contains bug fixes and some usability enhancements:
Canvas::is_clip_rect()
as reported by @colorhook in #373.MaskFilter::blur()
must return an Option. This is a breaking change.&Image
instead of Image
to image_filters::image
in #377.Published by pragmatrix about 4 years ago
This release contains bugfixes, Send & Sync traits, and support for configuring Vulkan extensions:
The detailed changes:
core/vertices.rs
)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.
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
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.Image::peek_pixel
in #341 and also added a missing wrapper Context::perform_deferred_cleanup
in #342. Thank you for that!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.
Published by pragmatrix over 4 years ago
This release updates the Rust wrappers to Skia's Milestone 83.
Published by pragmatrix over 4 years ago
This release adds:
SKIA_BINARIES_URL
that is used to configure the download URL for the prebuilt binaries. #332.. and tweaks some internals:
-std=c++17
to be compatible with the Skia build. #327RUST_FLAGS=-Clink-dead-code
. #321and for the example seekers:
skia-safe/examples/gl-window
to skia-safe. The first one that actually renders to a window. #317 #323