diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-31 23:17:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-31 23:17:49 +0100 |
commit | 95e4741f0008577097984752e8eb3960e68ff169 (patch) | |
tree | 19fabc91ceb68269e2e66a9d7490d7641a6f6f07 /ext/canvas | |
parent | 13a91a69f87df98a31030d602f629a9a20f8a9c8 (diff) |
refactor: migrate runtime/ and ext/canvas/ to virtual ops module (#22196)
Diffstat (limited to 'ext/canvas')
-rw-r--r-- | ext/canvas/01_image.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/canvas/01_image.js b/ext/canvas/01_image.js index f87b227b3..3018e9e2a 100644 --- a/ext/canvas/01_image.js +++ b/ext/canvas/01_image.js @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { core, internals, primordials } from "ext:core/mod.js"; -const ops = core.ops; +import { internals, primordials } from "ext:core/mod.js"; +import { op_image_decode_png, op_image_process } from "ext:core/ops"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { DOMException } from "ext:deno_web/01_dom_exception.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; @@ -438,7 +438,7 @@ function createImageBitmap( "InvalidStateError", ); } - const { data: imageData, width, height } = ops.op_image_decode_png(data); + const { data: imageData, width, height } = op_image_decode_png(data); const processedImage = processImage( imageData, width, @@ -517,7 +517,7 @@ function processImage(input, width, height, sx, sy, sw, sh, options) { * the image at the correct location, which is the inverse of the x & y of * sourceRectangle's top-left corner. */ - const data = ops.op_image_process( + const data = op_image_process( new Uint8Array(TypedArrayPrototypeGetBuffer(input)), { width, |