Fix CanvasKit SkSurface.requestAnimationFrame for web workers
Change-Id: I19d368d6f9f8a2bf4bed73a8f1843be907183096 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305539 Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Elliot Evans <elliotevans@google.com>
This commit is contained in:
parent
024d745fcc
commit
1ec3b1ab2e
@ -1257,7 +1257,7 @@ CanvasKit.onRuntimeInitialized = function() {
|
||||
if (!this._cached_canvas) {
|
||||
this._cached_canvas = this.getCanvas();
|
||||
}
|
||||
window.requestAnimationFrame(function() {
|
||||
requestAnimationFrame(function() {
|
||||
if (this._context !== undefined) {
|
||||
CanvasKit.setCurrentContext(this._context);
|
||||
}
|
||||
@ -1277,7 +1277,7 @@ CanvasKit.onRuntimeInitialized = function() {
|
||||
if (!this._cached_canvas) {
|
||||
this._cached_canvas = this.getCanvas();
|
||||
}
|
||||
window.requestAnimationFrame(function() {
|
||||
requestAnimationFrame(function() {
|
||||
if (this._context !== undefined) {
|
||||
CanvasKit.setCurrentContext(this._context);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user