All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
SkPathMeasure
, RSXFormBuilder
, SkFont.getWidths
, SkTextBlob.MakeFromRSXform
which were needed to add the helper function SkTextBlob.MakeOnPath
.modules/canvaskit
(was experimental/canvaskit
)CanvasKit.SkMatrix.invert
SkCanvas.flush
will be removed soon - client should only call SkSurface.flush
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().See CanvasKit.MakeParticles(json)
;GetWebGLContext
, MakeGrContext
, MakeOnScreenGLSurface
, MakeRenderTarget
.SkSurface.getSurface()
and SkCanvas.getSurface()
for making compatible surfaces (typically used as a workspace and then “saved” with surface.makeImageSnapshot()
)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
.MakeManagedAnimation
for supplying external assets (like images, fonts).SkPath.addRoundRect
, SkPath.reset
, SkPath.rewind
exposed.SkCanvas.drawArc
, SkCanvas.drawLine
, SkCanvas.drawOval
, SkCanvas.drawRoundRect
exposed.CanvasKit.MakePathFromCmds
and SkPath.toCmds
.SkCanvas.drawTextBlob()
and SkCanvas.SkTextBlob.MakeFromText()
to draw text to a canvas.CanvasKit.TextEncoding
enum. For use with SkTextBlob
.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).SkCanvas.drawText()
now requires an SkFont
object for raw strings.SkPaint.setTextSize()
, SkPaint.getTextSize()
, SkPaint.setTypeface()
which should be replaced by using SkFont
.CanvasKitInit().then()
interface (see 0.3.1 notes)ready()
if already loaded.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.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.SkPaint.measureText
- use SkFont.measureText
instead.no_canvas
to the compile.sh
invocation.CanvasKit.FontMgr.DefaultRef()
and fontmgr.MakeTypefaceFromData
to load fonts.SkPath.setVolatile
. Some animations see performance improvements by setting their paths' volatility to true.SkPath.addRect
now correctly draws counter-clockwise vs clockwise.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.fontmgr.MakeTypefaceFromData
for more font variety.CanvasKit.initFonts()
- no longer needed.Beginning of Changelog history