<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admaycoc</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admaycoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Admaycoc"/>
	<updated>2026-05-17T09:56:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=130664</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=130664"/>
		<updated>2019-12-07T01:32:01Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;b&amp;gt;Getting pixel data returns blank pixels&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 &amp;lt;b&amp;gt;Support drawing offscreen canvases onto other canvases&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;b&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;b&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/b&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases]. As we began working towards getting oriented with the servo repo, we were diverted to work on the additional issues first, as they were largely foundation to improve the implementation of OffscreenCanvasAPI.&lt;br /&gt;
&lt;br /&gt;
The issues resolved by our work on this project are bolded above.&lt;br /&gt;
&lt;br /&gt;
=='''OSS Progress'''==&lt;br /&gt;
&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
For our second submission on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs. This pull request also modified the test metadata to indicate the 17 newly passing tests resulting from our fixes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OSS Code Changes==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Final Progress'''==&lt;br /&gt;
&lt;br /&gt;
After spending our time during our OSS project working on familiarizing ourselves with the servo repo and fixing the other OffscreenCanvasAPI issues we were directed to, our final project focuses on the primary issue currently assigned to us: [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]. When properly implemented resolving this issue should result in newly passing test in the below mentioned test directory.&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas&lt;br /&gt;
&lt;br /&gt;
These tests are generated to identify how closely the servo implementation of the OffscreenCanvasAPI matches with the W3C spec.&lt;br /&gt;
&lt;br /&gt;
In our implementation there were several discrete steps:&lt;br /&gt;
1.  Enable an OffscreenCanvas as a possible CanvasImageSource type.&lt;br /&gt;
2.  Write helper functions used to extract different parameters of the canvas_state of the OffscreenCanvas, most of which parallel their HTMLCanvasElement counterparts.&lt;br /&gt;
3.  Implement the draw_offscreen_canvas function to copy canvas data between an OffscreenCanvas source and the destination.&lt;br /&gt;
4.  Run test directory listed above to check for newly passing tests or any errors our changes may have caused.&lt;br /&gt;
&lt;br /&gt;
These issues led to the creation of our [https://github.com/servo/servo/pull/25087 final pull request]. When the above chanegs were implemented we noticed some iregularities in the testing results, which led to the identification of an issue, where some functions in the OffscreenCanvas code were using inconsistent ordering for their height and width parameters. Once resolved our changes led to &amp;lt;b&amp;gt;866 newly passing tests&amp;lt;/b&amp;gt;. These changes were approved and merged from our pull request.&lt;br /&gt;
&lt;br /&gt;
Our changes also, after identifying the redundancies between helper functions in HTMLCanvasState and OffscreenCanvas, led to the creation of a [https://github.com/servo/servo/issues/25118 new refactoring issue].&lt;br /&gt;
&lt;br /&gt;
==Final Code Changes==&lt;br /&gt;
&lt;br /&gt;
These changes will largely parallel the listed changes above.&lt;br /&gt;
&lt;br /&gt;
As mentioned before our first step was enabling OffscreenCanvas as a CanvasImageSource. This can be seen alongside the HTMLCanvasElement option.&lt;br /&gt;
&lt;br /&gt;
[[File:diff7.png]]&lt;br /&gt;
[[File:diff10.png]]&lt;br /&gt;
&lt;br /&gt;
The added helper functions origin_is_clean, fetch_all_data, send_canvas_2d_msg, origin_is_clean, get_canvas_id, and get_ipc_renderer were added to OffscreenCanvasContext and OffscreenCanvasRenderingContext2D to allow the calling functions to identify the state of the OffscreenCanvas being copied.&lt;br /&gt;
&lt;br /&gt;
[[File:diff8.png]]&lt;br /&gt;
[[File:diff9.png]]&lt;br /&gt;
&lt;br /&gt;
Finally we implemented the draw_offscreen_canvas function to analyze the canvas context and copy its data.&lt;br /&gt;
&lt;br /&gt;
[[File:diff11.png]]&lt;br /&gt;
&lt;br /&gt;
This is when we encountered the issues where width and height variables were being swapped in calls to OffscreenCanvas. The changes to fix both callers and the function implementations themselves are shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff12.png]]&lt;br /&gt;
&lt;br /&gt;
These changes can be seen in effect in the video of our [https://youtu.be/yzFocVSXEuw test directory running].&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;br /&gt;
14.    https://github.com/servo/servo/pull/25087&amp;lt;br&amp;gt;&lt;br /&gt;
15.    https://github.com/servo/servo/issues/25118&amp;lt;br&amp;gt;&lt;br /&gt;
16.    https://youtu.be/yzFocVSXEuw&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff12.png&amp;diff=130009</id>
		<title>File:Diff12.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff12.png&amp;diff=130009"/>
		<updated>2019-12-06T15:46:29Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff11.png&amp;diff=130008</id>
		<title>File:Diff11.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff11.png&amp;diff=130008"/>
		<updated>2019-12-06T15:46:18Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff9.png&amp;diff=130007</id>
		<title>File:Diff9.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff9.png&amp;diff=130007"/>
		<updated>2019-12-06T15:46:07Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff8.png&amp;diff=130006</id>
		<title>File:Diff8.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff8.png&amp;diff=130006"/>
		<updated>2019-12-06T15:45:54Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=130005</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=130005"/>
		<updated>2019-12-06T15:45:40Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;b&amp;gt;Getting pixel data returns blank pixels&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 &amp;lt;b&amp;gt;Support drawing offscreen canvases onto other canvases&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;b&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;b&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/b&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases]. As we began working towards getting oriented with the servo repo, we were diverted to work on the additional issues first, as they were largely foundation to improve the implementation of OffscreenCanvasAPI.&lt;br /&gt;
&lt;br /&gt;
The issues resolved by our work on this project are bolded above.&lt;br /&gt;
&lt;br /&gt;
=='''OSS Progress'''==&lt;br /&gt;
&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
For our second submission on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs. This pull request also modified the test metadata to indicate the 17 newly passing tests resulting from our fixes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OSS Code Changes==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Final Progress'''==&lt;br /&gt;
&lt;br /&gt;
After spending our time during our OSS project working on familiarizing ourselves with the servo repo and fixing the other OffscreenCanvasAPI issues we were directed to, our final project focuses on the primary issue currently assigned to us: [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]. When properly implemented resolving this issue should result in newly passing test in the below mentioned test directory.&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas&lt;br /&gt;
&lt;br /&gt;
These tests are generated to identify how closely the servo implementation of the OffscreenCanvasAPI matches with the W3C spec.&lt;br /&gt;
&lt;br /&gt;
In our implementation there were several discrete steps:&lt;br /&gt;
1.  Enable an OffscreenCanvas as a possible CanvasImageSource type.&lt;br /&gt;
2.  Write helper functions used to extract different parameters of the canvas_state of the OffscreenCanvas, most of which parallel their HTMLCanvasElement counterparts.&lt;br /&gt;
3.  Implement the draw_offscreen_canvas function to copy canvas data between an OffscreenCanvas source and the destination.&lt;br /&gt;
4.  Run test directory listed above to check for newly passing tests or any errors our changes may have caused.&lt;br /&gt;
&lt;br /&gt;
These issues led to the creation of our [https://github.com/servo/servo/pull/25087 final pull request]. When the above chanegs were implemented we noticed some iregularities in the testing results, which led to the identification of an issue, where some functions in the OffscreenCanvas code were using inconsistent ordering for their height and width parameters. Once resolved our changes led to &amp;lt;b&amp;gt;866 newly passing tests&amp;lt;/b&amp;gt;. These changes were approved and merged from our pull request.&lt;br /&gt;
&lt;br /&gt;
Our changes also, after identifying the redundancies between helper functions in HTMLCanvasState and OffscreenCanvas, led to the creation of a [https://github.com/servo/servo/issues/25118 new refactoring issue].&lt;br /&gt;
&lt;br /&gt;
==Final Code Changes==&lt;br /&gt;
&lt;br /&gt;
These changes will largely parallel the listed changes above.&lt;br /&gt;
&lt;br /&gt;
As mentioned before our first step was enabling OffscreenCanvas as a CanvasImageSource. This can be seen alongside the HTMLCanvasElement option.&lt;br /&gt;
&lt;br /&gt;
[[File:diff7.png]]&lt;br /&gt;
[[File:diff10.png]]&lt;br /&gt;
&lt;br /&gt;
The added helper functions origin_is_clean, fetch_all_data, send_canvas_2d_msg, origin_is_clean, get_canvas_id, and get_ipc_renderer were added to OffscreenCanvasContext and OffscreenCanvasRenderingContext2D to allow the calling functions to identify the state of the OffscreenCanvas being copied.&lt;br /&gt;
&lt;br /&gt;
[[File:diff8.png]]&lt;br /&gt;
[[File:diff9.png]]&lt;br /&gt;
&lt;br /&gt;
Finally we implemented the draw_offscreen_canvas function to analyze the canvas context and copy its data.&lt;br /&gt;
&lt;br /&gt;
[[File:diff11.png]]&lt;br /&gt;
&lt;br /&gt;
This is when we encountered the issues where width and height variables were being swapped in calls to OffscreenCanvas. The changes to fix both callers and the function implementations themselves are shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff12.png]]&lt;br /&gt;
&lt;br /&gt;
These changes can be seen in effect in the video of our test directory running.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;br /&gt;
14.    https://github.com/servo/servo/pull/25087&amp;lt;br&amp;gt;&lt;br /&gt;
15.    https://github.com/servo/servo/issues/25118&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff10.png&amp;diff=130003</id>
		<title>File:Diff10.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff10.png&amp;diff=130003"/>
		<updated>2019-12-06T15:44:43Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: uploaded a new version of &amp;amp;quot;File:Diff10.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff10.png&amp;diff=130002</id>
		<title>File:Diff10.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff10.png&amp;diff=130002"/>
		<updated>2019-12-06T15:44:23Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=130001</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=130001"/>
		<updated>2019-12-06T15:44:09Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;b&amp;gt;Getting pixel data returns blank pixels&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 &amp;lt;b&amp;gt;Support drawing offscreen canvases onto other canvases&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;b&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;b&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/b&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases]. As we began working towards getting oriented with the servo repo, we were diverted to work on the additional issues first, as they were largely foundation to improve the implementation of OffscreenCanvasAPI.&lt;br /&gt;
&lt;br /&gt;
The issues resolved by our work on this project are bolded above.&lt;br /&gt;
&lt;br /&gt;
=='''OSS Progress'''==&lt;br /&gt;
&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
For our second submission on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs. This pull request also modified the test metadata to indicate the 17 newly passing tests resulting from our fixes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OSS Code Changes==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Final Progress'''==&lt;br /&gt;
&lt;br /&gt;
After spending our time during our OSS project working on familiarizing ourselves with the servo repo and fixing the other OffscreenCanvasAPI issues we were directed to, our final project focuses on the primary issue currently assigned to us: [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]. When properly implemented resolving this issue should result in newly passing test in the below mentioned test directory.&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas&lt;br /&gt;
&lt;br /&gt;
These tests are generated to identify how closely the servo implementation of the OffscreenCanvasAPI matches with the W3C spec.&lt;br /&gt;
&lt;br /&gt;
In our implementation there were several discrete steps:&lt;br /&gt;
1.  Enable an OffscreenCanvas as a possible CanvasImageSource type.&lt;br /&gt;
2.  Write helper functions used to extract different parameters of the canvas_state of the OffscreenCanvas, most of which parallel their HTMLCanvasElement counterparts.&lt;br /&gt;
3.  Implement the draw_offscreen_canvas function to copy canvas data between an OffscreenCanvas source and the destination.&lt;br /&gt;
4.  Run test directory listed above to check for newly passing tests or any errors our changes may have caused.&lt;br /&gt;
&lt;br /&gt;
These issues led to the creation of our [https://github.com/servo/servo/pull/25087 final pull request]. When the above chanegs were implemented we noticed some iregularities in the testing results, which led to the identification of an issue, where some functions in the OffscreenCanvas code were using inconsistent ordering for their height and width parameters. Once resolved our changes led to &amp;lt;b&amp;gt;866 newly passing tests&amp;lt;/b&amp;gt;. These changes were approved and merged from our pull request.&lt;br /&gt;
&lt;br /&gt;
Our changes also, after identifying the redundancies between helper functions in HTMLCanvasState and OffscreenCanvas, led to the creation of a [https://github.com/servo/servo/issues/25118 new refactoring issue].&lt;br /&gt;
&lt;br /&gt;
==Final Code Changes==&lt;br /&gt;
&lt;br /&gt;
These changes will largely parallel the listed changes above.&lt;br /&gt;
&lt;br /&gt;
As mentioned before our first step was enabling OffscreenCanvas as a CanvasImageSource. This can be seen alongside the HTMLCanvasElement option.&lt;br /&gt;
&lt;br /&gt;
//diff7 and diff10&lt;br /&gt;
[[File:diff7.png]]&lt;br /&gt;
[[File:diff10.png]]&lt;br /&gt;
&lt;br /&gt;
The added helper functions origin_is_clean, fetch_all_data, send_canvas_2d_msg, origin_is_clean, get_canvas_id, and get_ipc_renderer were added to OffscreenCanvasContext and OffscreenCanvasRenderingContext2D to allow the calling functions to identify the state of the OffscreenCanvas being copied.&lt;br /&gt;
&lt;br /&gt;
// diff8 and diff9&lt;br /&gt;
&lt;br /&gt;
Finally we implemented the draw_offscreen_canvas function to analyze the canvas context and copy its data.&lt;br /&gt;
&lt;br /&gt;
//diff11&lt;br /&gt;
&lt;br /&gt;
This is when we encountered the issues where width and height variables were being swapped in calls to OffscreenCanvas. The changes to fix both callers and the function implementations themselves are shown below.&lt;br /&gt;
&lt;br /&gt;
//diff12&lt;br /&gt;
&lt;br /&gt;
These changes can be seen in effect in the video of our test directory running.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;br /&gt;
14.    https://github.com/servo/servo/pull/25087&amp;lt;br&amp;gt;&lt;br /&gt;
15.    https://github.com/servo/servo/issues/25118&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff7.png&amp;diff=130000</id>
		<title>File:Diff7.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff7.png&amp;diff=130000"/>
		<updated>2019-12-06T15:43:38Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129999</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129999"/>
		<updated>2019-12-06T15:43:02Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;b&amp;gt;Getting pixel data returns blank pixels&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 &amp;lt;b&amp;gt;Support drawing offscreen canvases onto other canvases&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;b&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;b&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/b&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases]. As we began working towards getting oriented with the servo repo, we were diverted to work on the additional issues first, as they were largely foundation to improve the implementation of OffscreenCanvasAPI.&lt;br /&gt;
&lt;br /&gt;
The issues resolved by our work on this project are bolded above.&lt;br /&gt;
&lt;br /&gt;
=='''OSS Progress'''==&lt;br /&gt;
&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
For our second submission on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs. This pull request also modified the test metadata to indicate the 17 newly passing tests resulting from our fixes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OSS Code Changes==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Final Progress'''==&lt;br /&gt;
&lt;br /&gt;
After spending our time during our OSS project working on familiarizing ourselves with the servo repo and fixing the other OffscreenCanvasAPI issues we were directed to, our final project focuses on the primary issue currently assigned to us: [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]. When properly implemented resolving this issue should result in newly passing test in the below mentioned test directory.&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas&lt;br /&gt;
&lt;br /&gt;
These tests are generated to identify how closely the servo implementation of the OffscreenCanvasAPI matches with the W3C spec.&lt;br /&gt;
&lt;br /&gt;
In our implementation there were several discrete steps:&lt;br /&gt;
1.  Enable an OffscreenCanvas as a possible CanvasImageSource type.&lt;br /&gt;
2.  Write helper functions used to extract different parameters of the canvas_state of the OffscreenCanvas, most of which parallel their HTMLCanvasElement counterparts.&lt;br /&gt;
3.  Implement the draw_offscreen_canvas function to copy canvas data between an OffscreenCanvas source and the destination.&lt;br /&gt;
4.  Run test directory listed above to check for newly passing tests or any errors our changes may have caused.&lt;br /&gt;
&lt;br /&gt;
These issues led to the creation of our [https://github.com/servo/servo/pull/25087 final pull request]. When the above chanegs were implemented we noticed some iregularities in the testing results, which led to the identification of an issue, where some functions in the OffscreenCanvas code were using inconsistent ordering for their height and width parameters. Once resolved our changes led to &amp;lt;b&amp;gt;866 newly passing tests&amp;lt;/b&amp;gt;. These changes were approved and merged from our pull request.&lt;br /&gt;
&lt;br /&gt;
Our changes also, after identifying the redundancies between helper functions in HTMLCanvasState and OffscreenCanvas, led to the creation of a [https://github.com/servo/servo/issues/25118 new refactoring issue].&lt;br /&gt;
&lt;br /&gt;
==Final Code Changes==&lt;br /&gt;
&lt;br /&gt;
These changes will largely parallel the listed changes above.&lt;br /&gt;
&lt;br /&gt;
As mentioned before our first step was enabling OffscreenCanvas as a CanvasImageSource. This can be seen alongside the HTMLCanvasElement option.&lt;br /&gt;
&lt;br /&gt;
//diff7 and diff10&lt;br /&gt;
&lt;br /&gt;
The added helper functions origin_is_clean, fetch_all_data, send_canvas_2d_msg, origin_is_clean, get_canvas_id, and get_ipc_renderer were added to OffscreenCanvasContext and OffscreenCanvasRenderingContext2D to allow the calling functions to identify the state of the OffscreenCanvas being copied.&lt;br /&gt;
&lt;br /&gt;
// diff8 and diff9&lt;br /&gt;
&lt;br /&gt;
Finally we implemented the draw_offscreen_canvas function to analyze the canvas context and copy its data.&lt;br /&gt;
&lt;br /&gt;
//diff11&lt;br /&gt;
&lt;br /&gt;
This is when we encountered the issues where width and height variables were being swapped in calls to OffscreenCanvas. The changes to fix both callers and the function implementations themselves are shown below.&lt;br /&gt;
&lt;br /&gt;
//diff12&lt;br /&gt;
&lt;br /&gt;
These changes can be seen in effect in the video of our test directory running.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;br /&gt;
14.    https://github.com/servo/servo/pull/25087&amp;lt;br&amp;gt;&lt;br /&gt;
15.    https://github.com/servo/servo/issues/25118&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129995</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129995"/>
		<updated>2019-12-06T14:42:27Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;b&amp;gt;Getting pixel data returns blank pixels&amp;lt;/b&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 &amp;lt;s&amp;gt;Support drawing offscreen canvases onto other canvases&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;s&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;s&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/s&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases]. As we began working towards getting oriented with the servo repo, we were diverted to work on the additional issues first, as they were largely foundation to improve the implementation of OffscreenCanvasAPI.&lt;br /&gt;
&lt;br /&gt;
=='''OSS Progress'''==&lt;br /&gt;
&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
For our second submission on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs. This pull request also modified the test metadata to indicate the 17 newly passing tests resulting from our fixes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OSS Code Changes==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Final Progress'''==&lt;br /&gt;
&lt;br /&gt;
After spending our time during our OSS project working on familiarizing ourselves with the servo repo and fixing the other OffscreenCanvasAPI issues we were directed to, our final project focuses on the primary issue currently assigned to us: [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]. When properly implemented resolving this issue should result in newly passing test in the below mentioned test directory.&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas&lt;br /&gt;
&lt;br /&gt;
These tests are generated to identify how closely the servo implementation of the OffscreenCanvasAPI matches with the W3C spec.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;br /&gt;
14.    https://github.com/servo/servo/pull/25087&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129994</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129994"/>
		<updated>2019-12-06T14:42:09Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;e&amp;gt;Getting pixel data returns blank pixels&amp;lt;/e&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 &amp;lt;s&amp;gt;Support drawing offscreen canvases onto other canvases&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;s&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;s&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/s&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases]. As we began working towards getting oriented with the servo repo, we were diverted to work on the additional issues first, as they were largely foundation to improve the implementation of OffscreenCanvasAPI.&lt;br /&gt;
&lt;br /&gt;
=='''OSS Progress'''==&lt;br /&gt;
&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
For our second submission on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs. This pull request also modified the test metadata to indicate the 17 newly passing tests resulting from our fixes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OSS Code Changes==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Final Progress'''==&lt;br /&gt;
&lt;br /&gt;
After spending our time during our OSS project working on familiarizing ourselves with the servo repo and fixing the other OffscreenCanvasAPI issues we were directed to, our final project focuses on the primary issue currently assigned to us: [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]. When properly implemented resolving this issue should result in newly passing test in the below mentioned test directory.&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas&lt;br /&gt;
&lt;br /&gt;
These tests are generated to identify how closely the servo implementation of the OffscreenCanvasAPI matches with the W3C spec.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;br /&gt;
14.    https://github.com/servo/servo/pull/25087&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129993</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129993"/>
		<updated>2019-12-06T14:41:49Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;s&amp;gt;Getting pixel data returns blank pixels&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 &amp;lt;s&amp;gt;Support drawing offscreen canvases onto other canvases&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;s&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;s&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/s&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases]. As we began working towards getting oriented with the servo repo, we were diverted to work on the additional issues first, as they were largely foundation to improve the implementation of OffscreenCanvasAPI.&lt;br /&gt;
&lt;br /&gt;
=='''OSS Progress'''==&lt;br /&gt;
&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
For our second submission on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs. This pull request also modified the test metadata to indicate the 17 newly passing tests resulting from our fixes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OSS Code Changes==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Final Progress'''==&lt;br /&gt;
&lt;br /&gt;
After spending our time during our OSS project working on familiarizing ourselves with the servo repo and fixing the other OffscreenCanvasAPI issues we were directed to, our final project focuses on the primary issue currently assigned to us: [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]. When properly implemented resolving this issue should result in newly passing test in the below mentioned test directory.&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas&lt;br /&gt;
&lt;br /&gt;
These tests are generated to identify how closely the servo implementation of the OffscreenCanvasAPI matches with the W3C spec.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;br /&gt;
14.    https://github.com/servo/servo/pull/25087&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129992</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129992"/>
		<updated>2019-12-06T14:39:05Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;s&amp;gt;Getting pixel data returns blank pixels&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;s&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;s&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/s&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases]. As we began working towards getting oriented with the servo repo, we were diverted to work on the additional issues first, as they were largely foundation to improve the implementation of OffscreenCanvasAPI.&lt;br /&gt;
&lt;br /&gt;
=='''OSS Progress'''==&lt;br /&gt;
&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
For our second submission on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs. This pull request also modified the test metadata to indicate the 17 newly passing tests resulting from our fixes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==''OSS Code Changes''==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Final Progress'''==&lt;br /&gt;
&lt;br /&gt;
After spending our time during our OSS project working on familiarizing ourselves with the servo repo and fixing the other OffscreenCanvasAPI issues we were directed to, our final project focuses on the primary issue currently assigned to us: [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]. When properly implemented resolving this issue should result in newly passing test in the below mentioned test directory.&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing Plan==&lt;br /&gt;
&lt;br /&gt;
The Servo project includes premade tests for validating functionality across the W3C browser specification. When testing our project, we run tests related to the web platform–specifically those associated with the Offscreen Canvas&lt;br /&gt;
&lt;br /&gt;
To run these tests, we use the mach tool:&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas&lt;br /&gt;
&lt;br /&gt;
As we continue to implement functionality related to OffscreenCanvas, we will continue to make use of these tests. We will not be adding our own, as these tests are dynamically generated via script so that they can validate code against the W3C spec with high fidelity.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;br /&gt;
14.    https://github.com/servo/servo/pull/25087&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129382</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129382"/>
		<updated>2019-11-15T22:09:14Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;s&amp;gt;Getting pixel data returns blank pixels&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;s&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;s&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/s&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases].&lt;br /&gt;
&lt;br /&gt;
=='''Current Progress'''==&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
Since our first round on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs.&lt;br /&gt;
&lt;br /&gt;
=='''Next Steps'''==&lt;br /&gt;
Our initial plans for our final pull requests are to tie up any remaining issues with our first pull request. At this point we will proceed with tackling the blob conversion functionality of the API. This will require changes to the following two files:&lt;br /&gt;
*components/script/dom/webidls/OffscreenCanvas.webidl&lt;br /&gt;
*components/script/dom/offscreencanvas.rs&lt;br /&gt;
&lt;br /&gt;
When completed this functionality will lead to the following test directory passing:&lt;br /&gt;
*tests/wpt/web-platform-tests/offscreen-canvas/convert-to-blob/&lt;br /&gt;
&lt;br /&gt;
=='''Code Changes'''==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing Plan==&lt;br /&gt;
&lt;br /&gt;
The Servo project includes premade tests for validating functionality across the W3C browser specification. When testing our project, we run tests related to the web platform–specifically those associated with the Offscreen Canvas&lt;br /&gt;
&lt;br /&gt;
To run these tests, we use the mach tool:&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas&lt;br /&gt;
&lt;br /&gt;
As we continue to implement functionality related to OffscreenCanvas, we will continue to make use of these tests. We will not be adding our own, as these tests are dynamically generated via script so that they can validate code against the W3C spec with high fidelity.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129374</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=129374"/>
		<updated>2019-11-15T22:00:18Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
Some of the most notable uses of this API are prerendering media, such as an image, in an environment that is invisible to a user. This canvas could then be converted into a bitmap or a blob and cast onto another, visible canvas. Mozilla offers examples with code on the [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas OffscreenCanvas API page].&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 &amp;lt;s&amp;gt;Getting pixel data returns blank pixels&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 &amp;lt;s&amp;gt;Make offscreen canvas rendering context use offscreen canvas' size&amp;lt;/s&amp;gt;]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 &amp;lt;s&amp;gt;Add set_bitmap_dimensions method to CanvasState&amp;lt;/s&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases].&lt;br /&gt;
&lt;br /&gt;
=='''Current Progress'''==&lt;br /&gt;
In each of these Github issues that we have worked on, we have a thread of our communications with the project owners. The initial pixel issue seems to have been resolved by another user. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
Since our first round on this project, we have made changes that led to our pull request successfully being merged in Servo. During the next round of feedback, we will be focusing on continuing to implement OffscreenCanvas APIs.&lt;br /&gt;
&lt;br /&gt;
=='''Next Steps'''==&lt;br /&gt;
Our initial plans for our final pull requests are to tie up any remaining issues with our first pull request. At this point we will proceed with tackling the blob conversion functionality of the API.&lt;br /&gt;
&lt;br /&gt;
=='''Code Changes'''==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing Plan==&lt;br /&gt;
&lt;br /&gt;
The Servo project includes premade tests for validating functionality across the W3C browser specification. When testing our project, we run tests related to the web platform–specifically those associated with the Offscreen Canvas&lt;br /&gt;
&lt;br /&gt;
To run these tests, we use the mach tool:&lt;br /&gt;
&lt;br /&gt;
    ./mach test-wpt tests/wpt/web-platform-tests/offscreen-canvas&lt;br /&gt;
&lt;br /&gt;
As we continue to implement functionality related to OffscreenCanvas, we will continue to make use of these tests. We will not be adding our own, as these tests are dynamically generated via script so that they can validate code against the W3C spec with high fidelity.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=127871</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=127871"/>
		<updated>2019-11-07T03:05:53Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 Getting pixel data returns blank pixels]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 Make offscreen canvas rendering context use offscreen canvas' size]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 Add set_bitmap_dimensions method to CanvasState]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases].&lt;br /&gt;
&lt;br /&gt;
=='''Current Progress'''==&lt;br /&gt;
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. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
=='''Code Changes'''==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
This step also required writing many of the used casting functions for a given context. Again these functions span several files with an example of the functions below.&lt;br /&gt;
&lt;br /&gt;
[[File:diff2.png]]&lt;br /&gt;
&lt;br /&gt;
Another step towards supporting Offscreen Canvases was to allow them to properly maintain their context when setting their parameters. We do this by testing the context of the canvas in the height and width setters.&lt;br /&gt;
&lt;br /&gt;
[[File:Diff3.png]]&lt;br /&gt;
&lt;br /&gt;
The overall theme of adding more versatility to offscreen canvases often requires implementing canvas_state with more universal functions, both on and offscreen. One example of this is refactoring repeated code to set bitmap dimensions from the specific rendering contexts to the canvas_state class. &lt;br /&gt;
&lt;br /&gt;
[[File:diff4.png]]&lt;br /&gt;
[[File:diff5.png]]&lt;br /&gt;
&lt;br /&gt;
These changes are the biggest among many other that can be seen detailed in either of our pull requests. The end result is 2 new passing tests indicating essential functionality for offscreen canvases. &lt;br /&gt;
&lt;br /&gt;
[[File:diff6.png]]&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff6.png&amp;diff=127870</id>
		<title>File:Diff6.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff6.png&amp;diff=127870"/>
		<updated>2019-11-07T03:05:49Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff5.png&amp;diff=127862</id>
		<title>File:Diff5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff5.png&amp;diff=127862"/>
		<updated>2019-11-07T03:03:37Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff4.png&amp;diff=127858</id>
		<title>File:Diff4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff4.png&amp;diff=127858"/>
		<updated>2019-11-07T03:02:27Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff3.png&amp;diff=127836</id>
		<title>File:Diff3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff3.png&amp;diff=127836"/>
		<updated>2019-11-07T02:50:52Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff2.png&amp;diff=127830</id>
		<title>File:Diff2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff2.png&amp;diff=127830"/>
		<updated>2019-11-07T02:41:35Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=127824</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=127824"/>
		<updated>2019-11-07T02:36:55Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 Getting pixel data returns blank pixels]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 Make offscreen canvas rendering context use offscreen canvas' size]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 Add set_bitmap_dimensions method to CanvasState]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 add support for drawing offscreen canvases onto other canvases].&lt;br /&gt;
&lt;br /&gt;
=='''Current Progress'''==&lt;br /&gt;
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. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
=='''Code Changes'''==&lt;br /&gt;
&lt;br /&gt;
The first major step in better supporting offscreen canvases was to make sure that the parameterization types were ubiquitous across all canvas contexts. In most cases this required a simple change such as changing size integers to cast to 32 or 64 bit integers. This shows up in about a dozen files with the only difference being calls to cast functions or strongly typed parameterizations. An example is given below. &lt;br /&gt;
&lt;br /&gt;
[[File:diff1.png]]&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff1.png&amp;diff=127821</id>
		<title>File:Diff1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diff1.png&amp;diff=127821"/>
		<updated>2019-11-07T02:36:34Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=127783</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=127783"/>
		<updated>2019-11-07T02:07:09Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 Getting pixel data returns blank pixels]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 Make offscreen canvas rendering context use offscreen canvas' size]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 Add set_bitmap_dimensions method to CanvasState]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 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.&lt;br /&gt;
&lt;br /&gt;
=='''Current Progress'''==&lt;br /&gt;
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. The bulk of our time in resolving the [https://github.com/servo/servo/issues/24269 paramount issue] has been spent working on the two issues that serve as prerequisites for drawing one offscreen canvas onto another canvas. Our first [https://github.com/servo/servo/pull/24518 pull request] addressed these issues and allowed us to get feedback on our work towards our primary goals. Our second [https://github.com/servo/servo/pull/24524 pull request] rebases our first and takes into account some of our feedback, in addition to finishing the [https://github.com/servo/servo/issues/24536 refactoring issue].&lt;br /&gt;
&lt;br /&gt;
=='''Code Changes'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;br /&gt;
13.    https://github.com/servo/servo/pull/24524&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=125996</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=125996"/>
		<updated>2019-10-28T21:32:03Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 Getting pixel data returns blank pixels]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24465 Make offscreen canvas rendering context use offscreen canvas' size]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 Add set_bitmap_dimensions method to CanvasState]&lt;br /&gt;
&lt;br /&gt;
In our instruction we were told to first pursue fix the [https://github.com/servo/servo/issues/24271 image data issue], then [https://github.com/servo/servo/issues/24269 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.&lt;br /&gt;
&lt;br /&gt;
=='''Current Progress'''==&lt;br /&gt;
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 [https://github.com/servo/servo/pull/24518 pull request], and we are continuing on optimizing our submission.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://doc.rust-lang.org/book/title-page.html&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://rustup.rs/&amp;lt;br&amp;gt;&lt;br /&gt;
5.    https://github.com/servo/servo/blob/master/README.md&amp;lt;br&amp;gt;&lt;br /&gt;
6.    https://github.com/servo/servo/issues/24271&amp;lt;br&amp;gt;&lt;br /&gt;
7.    https://github.com/servo/servo/issues/24269&amp;lt;br&amp;gt;&lt;br /&gt;
8.    https://github.com/servo/servo/issues/24272&amp;lt;br&amp;gt;&lt;br /&gt;
9.    https://github.com/servo/servo/issues/24273&amp;lt;br&amp;gt;&lt;br /&gt;
10.    https://github.com/servo/servo/issues/24465&amp;lt;br&amp;gt;&lt;br /&gt;
11.    https://github.com/servo/servo/issues/24536&amp;lt;br&amp;gt;&lt;br /&gt;
12.    https://github.com/servo/servo/pull/24518&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=125992</id>
		<title>CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1951._Implement_missing_OffscreenCanvas_APIs&amp;diff=125992"/>
		<updated>2019-10-28T21:15:29Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: Created page with &amp;quot;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 severa...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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. &lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) 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.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
The bulk of Servo is written in [https://doc.rust-lang.org/book/title-page.html 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.&lt;br /&gt;
&lt;br /&gt;
===OffscreenCanvas API===&lt;br /&gt;
The [https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas 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.&lt;br /&gt;
&lt;br /&gt;
=='''Project Description'''==&lt;br /&gt;
Getting servo set up and ready to run requires a few dependencies, namely in installation of the [https://rustup.rs/ Rust Toolchain] and Python 2.7. More specific setup instructions can be found in the [https://github.com/servo/servo/blob/master/README.md Servo README.md]. After dependencies are installed and the Servo repo cloned, the following script will build the dev version of Servo:&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
At this point tests can be run using the following command:&lt;br /&gt;
&lt;br /&gt;
    ./mach run &amp;lt;path_to_test_dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* [https://github.com/servo/servo/issues/24271 Getting pixel data returns blank pixels]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24269 Support drawing offscreen canvases onto other canvases]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24272 Support converting offscreen canvas data into a blob]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24273 Implement linking offscreen canvases to placeholder canvases]&lt;br /&gt;
&lt;br /&gt;
In addition to these issues we have also been directed to a couple more issues that also deal with the OffscreenCanvas API:&lt;br /&gt;
* [https://github.com/servo/servo/pull/24518 Make offscreen canvas rendering context use offscreen canvas' size]&lt;br /&gt;
* [https://github.com/servo/servo/issues/24536 Add set_bitmap_dimensions method to CanvasState]&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=125952</id>
		<title>CSC/ECE 517 Fall 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=125952"/>
		<updated>2019-10-28T20:03:07Z</updated>

		<summary type="html">&lt;p&gt;Admaycoc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CSC/ECE 517 Fall 2019 - Project E1947. Refactor quiz_questionnaire_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1972. OSS project J. Skellington: Accessing Assignment Rubrics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1961. Email notification to reviewers and instructors]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1971. OSS project Finklestein: Instructors &amp;amp; Institutions]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1953. Tagging report for student]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1955.Write  unit tests for student_task.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1948. Refactor review_mapping_helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1959. Intelligent copying of assignments without topics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1968. Fixes for adding members to teams]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1969. Fixes for reviews not being available]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1957. Time travel Not Allowed..!!! Restrict TAs’ ability to change their own grade + limit file-size upload]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1941. Issues related to topic deadlines]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1966. Tabbed_reviews partial file refactor for displaying the alternate view of reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1962. Email notification upon account creation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1967. Fix glitches in author feedback]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1960. Create new late policy successfully and fixing &amp;quot;Back&amp;quot; link]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1939. OSS Project Juniper: Bookmark enhancements]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1938. OSS project Duke Blue: Fix import glitches]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs]]&lt;/div&gt;</summary>
		<author><name>Admaycoc</name></author>
	</entry>
</feed>