aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/canvasrenderingcontext2d.rs
Commit message (Collapse)AuthorAgeFilesLines
* GetImageData should return un-premultiplied alpha valuesDavid Zbarsky2015-08-061-1/+12
|
* Refactor DrawImage implementations to avoid code duplicationDavid Zbarsky2015-08-061-140/+53
|
* Auto merge of #6974 - dzbarsky:tiny-create, r=jdmbors-servo2015-08-051-1/+4
|\ | | | | | | | | | | | | | | | | | | Fix createImageData with sizes < 1 pixel <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6974) <!-- Reviewable:end -->
| * Fix createImageData with sizes < 1 pixelDavid Zbarsky2015-08-041-1/+4
| |
* | Make createRadialGradient throw for negative radiiDavid Zbarsky2015-08-041-4/+8
|/
* Clean up some methods in CanvasRendeingContext2DDavid Zbarsky2015-08-031-85/+26
|
* script: Make the `ImageCacheTask` use IPC.Patrick Walton2015-07-261-3/+2
| | | | | This necessitated getting rid of the boxed trait object that was being be passed between the script task and the image cache task.
* script: Make most of 2D canvas and WebGL run over IPC.Patrick Walton2015-07-251-61/+109
| | | | | | To actually make the multiprocess communication work, we'll need to reroute the task creation to the pipeline or the compositor. But this works as a first step.
* Add servo Image type. Remove rust-png dependency from script, gfx, layout.Glenn Watson2015-07-071-6/+6
|
* Refactor #[jstraceable] to #[derive(JSTraceable)]David Winslow2015-07-011-4/+2
| | | | fixes #6524
* Create pattern from HTMLCanvasElement or CanvasRenderingContext2D.Hyowon Kim2015-06-241-31/+77
|
* Auto merge of #6413 - hyowon:invalid_shadow_attrs, r=Ms2gerbors-servo2015-06-201-2/+15
|\ | | | | | | | | | | | | | | | | | | | | | | Check invalid values for the shadow attributes. I left out checking invalid values when setting the shadows attributes. r? @nox @pcwalton cc @yichoi <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6413) <!-- Reviewable:end -->
| * Check invalid values for the shadow attributes.Hyowon Kim2015-06-181-2/+15
| |
* | Upgrade to SM 39Michael Wu2015-06-191-48/+36
| |
* | Use euclid from crates.ioecoal952015-06-191-4/+4
|/
* rust-geom API changesCorey Farwell2015-06-131-39/+61
| | | | https://github.com/servo/rust-geom/pull/81
* Implementation of pattern fill style for canvas.Hyowon Kim2015-06-131-3/+45
|
* Remove gfx_traits from the dependencies of [script].Mátyás Mustoha2015-06-121-11/+3
|
* Add attributes for canvas shadows.Hyowon Kim2015-06-121-0/+64
|
* Replace fill_color and stroke_color with fill_style and stroke_style in ↵Hyowon Kim2015-06-061-19/+52
| | | | | | | CanvasContextState. The fillStyle and strokeStyle attributes can be either strings(color), CanvasGradients, or CanvasPatterns.
* Serialize colors for fill and stroke styles in canvas.Hyowon Kim2015-06-031-9/+21
|
* Auto merge of #6183 - ecoal95:webglcontextattributes, r=noxbors-servo2015-06-011-1/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r? @jdm I couldn't add the `getContextAttributes` method since `CodegenRust` doesn't know how to return a dictionary value, I'll take a look at it ASAP. I think the helper functions can return directly the renderer, since they're used just for that, but I wanted to hear your opinions about this. By the way I'm interested in adding more serious tests for WebGL, and I think the [khronos conformance suit](https://github.com/KhronosGroup/WebGL/tree/master/conformance-suites/1.0.3) should be the best option. Should I try to integrate it in wpt, or making a `tests/webgl` directory (or similar) inside the servo tree? (Maybe this question should be for @Ms2ger) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6183) <!-- Reviewable:end -->
| * Add WebGLContextAttributes supportecoal952015-06-011-1/+5
| | | | | | | | | | | | | | This commit also: * Allows to return non-rootable dictionaries from Codegen. * Merges the two context types in an enum type.
* | Correct the calculation of rects for drawimage.Hyowon Kim2015-06-011-4/+4
|/
* Reduce max line length from 150 to 120 charactersCorey Farwell2015-05-241-11/+26
| | | | Part of https://github.com/servo/servo/issues/6041
* Auto merge of #5586 - pcwalton:no-broken-background-image-redux, r=glennwbors-servo2015-05-201-7/+5
|\ | | | | | | | | | | | | | | r? @jdm <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5586) <!-- Reviewable:end -->
| * net: Don't load the placeholder image for background images, only forPatrick Walton2015-05-201-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | image fragments. This also changes the way the placeholder is handled in the image cache task to decode it up front instead of each time an image fails to load, both because it was more convenient to implement that way and because it saves CPU cycles to do so. This matches the behavior of Gecko and WebKit. It improves the look of our cached copy of Wikipedia.
* | Layerize canvasecoal952015-05-201-4/+4
|/ | | | | | | Note that this keeps using readback right now, `NativeSurface` painting will be implemented soon. Also see https://github.com/servo/servo/issues/6142
* Auto merge of #5949 - mmatyas:canvas_dirty, r=jdmbors-servo2015-05-071-3/+19
|\ | | | | | | | | | | | | | | With this patch, it is now possible to create nice animations using the canvas. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5949) <!-- Reviewable:end -->
| * Mark the canvas as dirty on certain drawing calls.Mátyás Mustoha2015-05-061-3/+19
| |
* | Canvas: implement transformation matrix reset.Mátyás Mustoha2015-05-061-0/+6
| |
* | Auto merge of #5945 - mmatyas:canvas_mxrotate, r=jdmbors-servo2015-05-061-0/+14
|\ \ | |/ |/| | | | | | | <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5945) <!-- Reviewable:end -->
| * Canvas: implement transformation matrix rotation.Mátyás Mustoha2015-05-061-0/+14
| |
* | Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-2/+1
|/
* Remove Temporary::new()Anthony Ramine2015-04-281-1/+1
| | | | Temporary::from_rooted() now takes an Assignable value.
* Uniformise root() methodsAnthony Ramine2015-04-281-1/+1
| | | | | They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable and ResultRootable.
* Remove as_slice() calls from script.Ms2ger2015-04-261-4/+1
|
* Refactored image cache task - details below.Glenn Watson2015-04-231-10/+5
| | | | | | | | | | | | | | | | | | | | * Simpler image cache API for clients to use. * Significantly fewer threads. * One thread for image cache task (multiplexes commands, decoder threads and async resource requests). * 4 threads for decoder worker tasks. * Removed ReflowEvent hacks in script and layout tasks. * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe. * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow. * Add reflow batching for when multiple images load quickly. * Reduces the number of paints loading wikipedia from ~95 to ~35. * Reasonably simple to add proper prefetch support in a follow up PR. * Async loaded images always construct Image fragments now, instead of generic. * Image fragments support the image not being present. * Simpler implementation of synchronous image loading for reftests. * Removed image holder. * image.onload support. * image NaturalWidth and NaturalHeight support. * Updated WPT expectations.
* Canvas: implement global composition and blending.Mátyás Mustoha2015-04-221-1/+20
|
* Canvas: add clipping path support.Mátyás Mustoha2015-04-221-0/+7
|
* Canvas: implement rectangle drawing.Mátyás Mustoha2015-04-211-0/+9
|
* Kicks off a WebGL implementationDiego Marcos2015-04-201-41/+42
|
* Canvas: implement context state save/restore.Mátyás Mustoha2015-04-191-55/+95
|
* Add specification links to canvas line cap and line joinMátyás Mustoha2015-04-151-0/+4
|
* Add/update comments with links to specCorey Farwell2015-04-141-9/+45
| | | | | | | | | | Extracted out of #5649 * add more hyperlinks to associated specification for structs/methods * follow redirects and update links * replace broken links * removal of WHATWG multipage page name since the page name is not guaranteed to be stable
* Canvas: added lineCap and lineJoin support.Mátyás Mustoha2015-04-141-0/+36
|
* Switch Arc<Box<Image>> to Arc<Image> for perf boost.Aneesh Agrawal2015-04-101-1/+1
| | | | | Image used to be a trait, but no longer is, so boxing it is no longer necessary.
* Auto merge of #5613 - mmatyas:canvas_miterlimit, r=jdmbors-servo2015-04-091-0/+15
|\ | | | | | | This exposes some other canvas tests which were marked as PASS before. Two strokeRect related tests are fixed by #5612, and lineCap/lineJoin will have an implementation soon.
| * Canvas: added miterLimit support.Mátyás Mustoha2015-04-091-0/+15
| |
* | Canvas: moved Rect validation to a common function.Mátyás Mustoha2015-04-091-18/+18
|/