aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/canvasrenderingcontext2d.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-1/+1
|
* Reorder importsPyfisch2018-11-061-6/+6
|
* Format remaining filesPyfisch2018-11-061-12/+30
|
* Sort `use` statementsSimon Sapin2018-11-061-3/+3
|
* `cargo fix --edition`Simon Sapin2018-11-061-23/+23
|
* Simplify ctx.drawImage a bitAnthony Ramine2018-10-111-28/+5
| | | | There is no need to swap between RGBA and BGRA twice.
* Share some code between 2D canvas and WebGLAnthony Ramine2018-10-091-21/+3
|
* Avoid ctx.getImageData in canvas.toDataURLAnthony Ramine2018-10-081-12/+23
|
* Abstract some stuff common to ctx.getImageData and ctx.putImageDataAnthony Ramine2018-10-081-119/+80
|
* Handle some transparent black cases in ctx.getImageDataAnthony Ramine2018-10-071-13/+38
|
* Align ctx.createImageData and ctx.getImageData with the specAnthony Ramine2018-10-061-44/+33
|
* Avoid copying pixels in ctx.putImageData sometimesAnthony Ramine2018-10-061-1/+4
|
* Introduce ImageData::get_rectAnthony Ramine2018-10-061-9/+4
| | | | | | | We use that to send only the pixels that will be actually drawn to the canvas thread in CanvasRenderingContext2d::PutImageData. We also make the canvas thread byte swap and premultiply colours in-place.
* Merge some byte swap/premultiply functions in their own crateAnthony Ramine2018-10-061-2/+3
|
* Improve gl.putImageDataAnthony Ramine2018-10-051-2/+28
| | | | | This commit should allow us to send smaller blobs to the canvas thread, I made it into its own commit just to try=wpt.
* Align canvas.putImageData with specAnthony Ramine2018-10-051-31/+18
| | | | The arguments are supposed to be long values, not floats.
* Move canvas.putImageData checks to the DOM sideAnthony Ramine2018-10-051-11/+60
|
* Make HTMLCanvasElement::get_size return a Size2D<u32>Anthony Ramine2018-10-021-5/+5
| | | | The changes keep trickling down.
* Format script componentchansuke2018-09-191-310/+408
|
* Implement proper origin checks for WebGL textures (fixes #21522)Anthony Ramine2018-09-181-2/+1
|
* Remove Canvas2dMsg::DrawImageSelfAnthony Ramine2018-09-171-19/+7
| | | | | Now that all canvas share the same thread, it's useless to have a separate message for that.
* Don't create 2D canvas contexts arbitrarilyAnthony Ramine2018-09-161-46/+58
| | | | | Sometimes, the canvas still has no rendering context, in this case it represents a transparent black rectangle.
* Update CanvasRenderingContext2D WebIDL definitionAnthony Ramine2018-09-141-13/+0
| | | | CanvasImageSource was never supposed to include CanvasRenderingContext2D.
* Use a byte channel to retrieve pixels of 2D canvasAnthony Ramine2018-09-131-5/+5
|
* Merge byte swap and unmultiplying loops in ctx.getImageData()Anthony Ramine2018-09-131-5/+5
|
* Moved Canvas rendering to a single thread.Brody-Eastwood2018-04-231-11/+10
|
* Add unique canvas IDs to all canvas operations.Brody Eastwood2018-04-021-122/+92
|
* Use ByteBuf for the canvas messagesAnthony Ramine2018-03-261-13/+15
| | | | | The type Vec<u8> is super unefficient to work with in Serde if all you want to represent is a simple blob.
* Implements profiler for blocked recvNakul Jindal2018-03-221-5/+6
|
* Avoid `Window::GetComputedStyle` when checking for `display: none`Alex Fong2018-02-261-13/+5
|
* Revert "Send IPC receiver for canvas as part of CreateCanvasPaintThread message"Josh Matthews2017-12-181-2/+3
| | | | This reverts commit a504c9358b70fcf02bd8f2067fcbd17d16c89439.
* Send IPC receiver for canvas as part of CreateCanvasPaintThread messagetigercosmos2017-12-161-3/+2
|
* use entry global's origin in `is_origin_clean` check for canvas renderingtigercosmos2017-12-051-7/+2
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+3
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-14/+14
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-7/+7
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename LayoutJS<T> to LayoutDom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-9/+9
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Implement Ellipse Canvas 2D APIJoone Hur2017-09-011-0/+20
| | | | | | | | | * Update rust-azure to 0.21.0 * Mark the following test case as fail: tests/wpt/mozilla/tests/mozilla/css-paint-api/background-image-tiled.html * Make the ellipse test case pass. BUG: https://github.com/servo/servo/issues/17598
* Auto merge of #18179 - davidcl:master, r=jdmbors-servo2017-08-231-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically verify that derive() lists are alphabetically ordered #… <!-- Please describe your changes on the following line: --> Automatically verify that derive() lists are alphabetically ordered #18172 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #18172 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18179) <!-- Reviewable:end -->
| * order derivable traits listsClément DAVID2017-08-231-2/+2
| | | | | | | | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* | Implement CanvasRenderingContext2d.fillText's "unimplemented" messageBruno Bernardino2017-08-231-0/+7
|/
* Revert "Auto merge of #18114 - emilio:revert-webgl-refactor, r=nox"Anthony Ramine2017-08-161-10/+6
| | | | | This reverts commit 4d10d39e8fe841c5fe2ac58da2daaa13c10c140e, reversing changes made to ee94e2b7c0bd327abe8f9545b2a1f792f67a2bdd.
* Revert "Auto merge of #17891 - MortimerGoro:webgl_move, r=glennw,emilio"Emilio Cobos Álvarez2017-08-161-6/+10
| | | | | This reverts commit 90f55ea4580e2a15f7d70d0491444f18b972d450, reversing changes made to 2e60b27a2186a8cba4b952960155dfcf3f47d7db.
* Improve WebGL architecture.Imanol Fernandez2017-08-151-10/+6
|
* make use of ScriptToConstellationChanPaul Rouget2017-08-151-3/+3
|
* Implement drawing an image from a CSS style value into a canvas.Alan Jeffrey2017-07-211-53/+117
|
* Implemented paint worklet rendering context.Alan Jeffrey2017-06-301-17/+40
|