[canvaskit] Remove two previously deprecated APIs Change-Id: I952f688fe4292344d1d4a57a29179eaddb35360b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410856 Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/modules/canvaskit/CHANGELOG.md b/modules/canvaskit/CHANGELOG.md index 49efa59..ce73969 100644 --- a/modules/canvaskit/CHANGELOG.md +++ b/modules/canvaskit/CHANGELOG.md
@@ -9,6 +9,11 @@ ### Added - `Font.getGlyphIntercepts()` +### Removed + - `Canvas.flush`, which had been previously deprecated. `Surface.flush` is the preferred method. + - `AnimatedImage.getCurrentFrame`, which had been previously deprecated. + `AnimatedImage.makeImageAtCurrentFrame` is the replacement, which behaves exactly the same. + ## [0.26.0] - 2021-04-23 ### Added
diff --git a/modules/canvaskit/canvaskit_bindings.cpp b/modules/canvaskit/canvaskit_bindings.cpp index 846182f..f949d20 100644 --- a/modules/canvaskit/canvaskit_bindings.cpp +++ b/modules/canvaskit/canvaskit_bindings.cpp
@@ -816,8 +816,6 @@ class_<SkAnimatedImage>("AnimatedImage") .smart_ptr<sk_sp<SkAnimatedImage>>("sk_sp<AnimatedImage>") .function("decodeNextFrame", &SkAnimatedImage::decodeNextFrame) - // Deprecated; prefer makeImageAtCurrentFrame - .function("getCurrentFrame", &SkAnimatedImage::getCurrentFrame) .function("getFrameCount", &SkAnimatedImage::getFrameCount) .function("getRepetitionCount", &SkAnimatedImage::getRepetitionCount) .function("height", optional_override([](SkAnimatedImage& self)->int32_t { @@ -1064,7 +1062,6 @@ } return false; })) - .function("flush", &SkCanvas::flush) // Deprecated - will be removed // 4x4 matrix functions // Just like with getTotalMatrix, we allocate the buffer for the 16 floats to go in from // interface.js, so it can also free them when its done.
diff --git a/modules/canvaskit/externs.js b/modules/canvaskit/externs.js index ed4a462..df997b0 100644 --- a/modules/canvaskit/externs.js +++ b/modules/canvaskit/externs.js
@@ -194,6 +194,7 @@ getFrameCount: function() {}, getRepetitionCount: function() {}, height: function() {}, + makeImageAtCurrentFrame: function() {}, reset: function() {}, width: function() {}, }, @@ -216,7 +217,6 @@ drawText: function() {}, drawTextBlob: function() {}, drawVertices: function() {}, - flush: function() {}, getSaveCount: function() {}, makeSurface: function() {}, markCTM: function() {},
diff --git a/modules/canvaskit/tests/core.spec.js b/modules/canvaskit/tests/core.spec.js index 45eb6c1..e66a618 100644 --- a/modules/canvaskit/tests/core.spec.js +++ b/modules/canvaskit/tests/core.spec.js
@@ -785,7 +785,7 @@ const combined = CanvasKit.ImageFilter.MakeCompose(redIF, blurIF); paint.setImageFilter(combined); - const frame = img.getCurrentFrame(); + const frame = img.makeImageAtCurrentFrame(); canvas.drawImage(frame, 100, 50, paint); paint.delete();