Skip to content

Implement ImageBitmap project

Josh Matthews edited this page Feb 15, 2020 · 2 revisions

Background information: Major browsers support the ImageBitmap standard which can be used to create images that ready to be drawn efficiently to HTML canvas elements. Servo is a new, experimental browser that supports these canvas APIs; the goal of this project is to implement support for image bitmaps and improve our canvasautomated test coverage as a result.

Tracking issue: (please ask questions in these issues)

Useful references:

Initial steps:

  • email the mozilla.dev.servo mailing list (be sure to subscribe to it first!) introducing your group and asking any necessary questions
  • add a ImageBitmap WebIDL interface to components/script/dom/webidls and Rust implementation in components/script/dom/imagebitmap.rs that is backed by a Vec<u8> buffer
  • add and implement the createImageBitmap method that takes no extra x/y/w/h parameters in component/script/dom/webidls/Window.webidl, handling the HTMLCanvasElement and OffscreenCanvas types from the possible image sources

Subsequent steps:

  • implement several remaining image source types (HTMLImageElement, ImageData, ImageBitmap)
  • implement the createImageBitmap overload that accepts x/y/w/h parameters
  • implement support for ImageBitmaps as canvas image sources in components/script/canvas_state.rs
Clone this wiki locally