CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs

From Expertiza_Wiki
Revision as of 21:32, 28 October 2019 by Admaycoc (talk | contribs)
Jump to navigation Jump to search

Servo is an open source, Mozilla led project with the goal of creating a modern web engine with a highly parallel back-end. In this project, we are working on implementing several missing features related to drawing to offscreen HTML canvases.

Introduction

Servo

Servo is an open source layout engine for web content being developed by Mozilla and about 1000 contributors. It differs from previous engines by offering low level parallelism in rendering web components. Servo is designed to be cross platform with builds supporting Windows, Linux, Mac OS, and Android. Servo is written in Rust and tested using Javascript and HTML.

Rust

The bulk of Servo is written in Rust, an open source static compiled language that is largely similar to C++. Compared to similar languages, Rust adds fine grained control of coherency and memory layout, while offering safer threading and concurrency.

OffscreenCanvas API

The OffscreenCanvas API is a web API designed to render web content in a container not currently displayed on screen. These canvases can support a wide range of content. Our project deals with implementing and fixing some of the method implementations in Servo. As of writing, only Chrome 69+ and Opera 56+ fully support the OffscreenCanvas API.

Project Description

Getting servo set up and ready to run requires a few dependencies, namely in installation of the Rust Toolchain and Python 2.7. More specific setup instructions can be found in the Servo README.md. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:

   cd servo
   ./mach build --dev

At this point tests can be run using the following command:

   ./mach run <path_to_test_dir>

To achieve our project goals we were assigned several issues to look at. These issues cover the high level steps to improve the support of the OffscreenCanvas API. These issues are listed here:

In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:

In our instruction we were told to first pursue fix the image data issue, then add support for drawing offscreen canvases onto other canvases. If we make it this far, our goals them shift to pursuing the other listed issues.

Current Progress

In each of these github issues that we have worked on we have there are a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. Before pursuing one of the larger steps listed in our first issue list, we have been working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. The first of these issues has led us to submit out first pull request, and we are continuing on optimizing our submission.

References

1. https://en.wikipedia.org/wiki/Servo_(layout_engine)
2. https://doc.rust-lang.org/book/title-page.html
3. https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas
4. https://rustup.rs/
5. https://github.com/servo/servo/blob/master/README.md
6. https://github.com/servo/servo/issues/24271
7. https://github.com/servo/servo/issues/24269
8. https://github.com/servo/servo/issues/24272
9. https://github.com/servo/servo/issues/24273
10. https://github.com/servo/servo/issues/24465
11. https://github.com/servo/servo/issues/24536
12. https://github.com/servo/servo/pull/24518