commit | f7fdf1aa2911a14944f7646928ea15347fef065f | [log] [tgz] |
---|---|---|
author | Kevin Lubick <kjlubick@google.com> | Thu Dec 10 15:21:01 2020 -0500 |
committer | Kevin Lubick <kjlubick@google.com> | Fri Dec 11 12:29:17 2020 +0000 |
tree | 31cf7238d5e14576f791fe19c237dd9fd5597e00 | |
parent | 5284e96599a89356abc2aed12dd7fcee42b76faf [diff] [blame] |
[canvaskit] Add API for deleting webgl ctx Change-Id: I55e70cc1ae6b16d642dd63170e9402bd3c192d5f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343101 Reviewed-by: Nathaniel Nifong <nifong@google.com>
diff --git a/modules/canvaskit/gpu.js b/modules/canvaskit/gpu.js index 0323596..061822e 100644 --- a/modules/canvaskit/gpu.js +++ b/modules/canvaskit/gpu.js
@@ -48,7 +48,11 @@ } GL.makeContextCurrent(handle); return handle; - } + }; + + CanvasKit.deleteContext = function(handle) { + GL.deleteContext(handle); + }; // idOrElement can be of types: // - String - in which case it is interpreted as an id of a