3f67f411d8
Bug: skia: Change-Id: I2ffd54cf81c974f3a80103e1726a06067cc90d82 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200044 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Kevin Lubick <kjlubick@google.com>
102 lines
4.2 KiB
Markdown
102 lines
4.2 KiB
Markdown
# CanvasKit Changelog
|
|
All notable changes to this project will be documented in this file.
|
|
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
|
## [Unreleased]
|
|
|
|
### Changed
|
|
- Location in Skia Git repo now `modules/canvaskit` (was `experimental/canvaskit`)
|
|
|
|
## [0.5.0] - 2019-03-08
|
|
|
|
### Added
|
|
- isVolitile option to `CanvasKit.MakeSkVertices`. The previous (and current default) behavior
|
|
was for this to be true; some applications may go faster if set to false.
|
|
- `SkCanvas.saveLayer(rect, paint)`
|
|
- `SkCanvas.restoreToCount(int)` which can be used with the output of .save() and .saveLayer().
|
|
- Optional particles library from modules/particles. `See CanvasKit.MakeParticles(json)`;
|
|
- More public APIs for working with Surfaces/Contexts `GetWebGLContext`,
|
|
`MakeGrContext`, `MakeOnScreenGLSurface`, `MakeRenderTarget`.
|
|
- `SkSurface.getSurface()` and `SkCanvas.getSurface()` for making compatible surfaces (typically
|
|
used as a workspace and then "saved" with `surface.makeImageSnapshot()`)
|
|
|
|
### Breaking
|
|
- `CanvasKit.MakeWebGLCanvasSurface` no longer takes a webgl context as a first arg, only a
|
|
canvas or an id of a canvas. If users want to manage their own GL contexts, they should build
|
|
the `SkSurface` themselves with `GetWebGLContext` -> `MakeGrContext` ->
|
|
`MakeOnScreenGLSurface`.
|
|
|
|
## [0.4.1] - 2019-03-01
|
|
|
|
### Added
|
|
- Optional arguments to `MakeManagedAnimation` for supplying external assets (like images, fonts).
|
|
|
|
## [0.4.0] - 2019-02-25
|
|
|
|
### Added
|
|
- `SkPath.addRoundRect`, `SkPath.reset`, `SkPath.rewind` exposed.
|
|
- `SkCanvas.drawArc`, `SkCanvas.drawLine`, `SkCanvas.drawOval`, `SkCanvas.drawRoundRect` exposed.
|
|
- Can import/export a SkPath to an array of commands. See `CanvasKit.MakePathFromCmds` and
|
|
`SkPath.toCmds`.
|
|
- `SkCanvas.drawTextBlob()` and `SkCanvas.SkTextBlob.MakeFromText()` to draw text to a canvas.
|
|
- `CanvasKit.TextEncoding` enum. For use with `SkTextBlob`.
|
|
- Text shaping with `ShapedText` object and `SkCanvas.drawText`. At compile time, one can choose
|
|
between using Harfbuzz/ICU (default) or a primitive one ("primitive_shaper") which just does
|
|
line breaking. Using Harfbuzz/ICU substantially increases code size (4.3 MB to 6.4 MB).
|
|
|
|
### Changed
|
|
- `SkCanvas.drawText()` now requires an `SkFont` object for raw strings.
|
|
|
|
|
|
### Removed
|
|
- `SkPaint.setTextSize()`, `SkPaint.getTextSize()`, `SkPaint.setTypeface()`
|
|
which should be replaced by using `SkFont`.
|
|
- Deprecated `CanvasKitInit().then()` interface (see 0.3.1 notes)
|
|
|
|
|
|
### Fixed
|
|
- Potential bug in `ready()` if already loaded.
|
|
|
|
## [0.3.1] - 2019-01-04
|
|
### Added
|
|
- `SkFont` now exposed.
|
|
- `MakeCanvasSurface` can now take a canvas element directly.
|
|
- `MakeWebGLCanvasSurface` can now take a WebGL context as an integer and use it directly.
|
|
|
|
### Changed
|
|
- `CanvasKitInit(...).then()` is no longer the recommended way to initialize things.
|
|
It will be removed in 0.4.0. Use `CanvasKitInit(...).ready()`, which returns a real Promise.
|
|
|
|
### Removed
|
|
- `SkPaint.measureText` - use `SkFont.measureText` instead.
|
|
|
|
## [0.3.0] - 2018-12-18
|
|
|
|
### Added
|
|
- Add Canvas2D JS layer. This mirrors the HTML Canvas API. This may be omitted at compile time
|
|
it by adding `no_canvas` to the `compile.sh` invocation.
|
|
- `CanvasKit.FontMgr.DefaultRef()` and `fontmgr.MakeTypefaceFromData` to load fonts.
|
|
- Exposed `SkPath.setVolatile`. Some animations see performance improvements by setting
|
|
their paths' volatility to true.
|
|
|
|
### Fixed
|
|
- `SkPath.addRect` now correctly draws counter-clockwise vs clockwise.
|
|
|
|
### Changed
|
|
- `CanvasKit.MakeImageShader` no longer takes encoded bytes, but an `SkImage`, created from
|
|
`CanvasKit.MakeImageFromEncoded`. Additionally, the optional parameters `clampIfUnpremul`
|
|
and `localMatrix` have been exposed.
|
|
- `SkPath.arcTo` now takes `startAngle`, `sweepAngle`, `forceMoveTo` as additional parameters.
|
|
- `SkPath.stroke` has a new option `precision` It defaults to 1.0.
|
|
- CanvasKit comes with one font (NotoMono) instead of the Skia TestTypeface. Clients are encouraged
|
|
to use the new `fontmgr.MakeTypefaceFromData` for more font variety.
|
|
|
|
### Removed
|
|
- `CanvasKit.initFonts()` - no longer needed.
|
|
|
|
|
|
## [0.2.1] - 2018-11-20
|
|
Beginning of Changelog history
|