Commit graph

86 commits

Author SHA1 Message Date
Josh Matthews
55fee1fb35 canvas: Don't panic if webrender isn't reachable. 2020-06-10 10:40:28 -04:00
Josh Matthews
75efaa95f5 Proxy all WR interactions for layout/font/script/canvas threads to the compositor
thread. There is now a single RenderApi that is used, and all transactions are serialized
through the compositor.
2020-06-09 13:05:16 -04:00
Kunal Mohan
f3fa53b849 update rust toolchain 2020-05-21 21:51:49 +05:30
Josh Matthews
eb2f7f7f0a Convert all uses of UpdateResources api to use webrender transactions. 2020-05-11 17:41:56 -04:00
Manish Goregaokar
fccfff11c5 Update euclid 2020-04-07 08:51:08 -07:00
Paul Rouget
40f6cd87d4 Revert "Add a simple implementation of CanvasRenderingContext2d.fillText"
Windows crash: https://github.com/servo/servo/issues/26015
2020-03-24 10:35:52 +01:00
kaiakz
0d0ac986b7 Add a simple implementation of CanvasRenderingContext2d.fillText 2020-03-19 15:40:14 +08:00
bors-servo
813be91926
Auto merge of #25863 - servo:synup, r=jdm
Remove syn 0.15 from our crate graph
2020-03-05 10:03:48 -05:00
Anthony Ramine
9996e48500 Remove syn 0.15 from our crate graph (fixes #24421)
This required bumps of:

* gleam
* image
* rust-webvr
* webrender
* webxr
2020-03-05 13:01:13 +01:00
pylbrecht
967fabb0d0 Make fill_rect() draw patterns correctly 2020-03-03 07:01:27 +01:00
Daniel Alley
430a65be07 Remove azure canvas backend
closes #25833
2020-02-25 00:14:24 -05:00
pylbrecht
588c09b580 Implement CanvasRenderingContext2D.getTransform() 2020-02-12 08:49:18 +01:00
pylbrecht
3c7205c99f Create new subpath with origin after drawing rect
Step 4 has been missing.
https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-rect
2020-01-19 09:23:18 +01:00
pylbrecht
ca1e780c59 Add first control point if there's no subpath 2020-01-16 21:28:21 +01:00
pylbrecht
ce48a51e99 Ensure subpath for control point in quadratic_curve_to() 2020-01-07 07:24:18 +01:00
pylbrecht
f691acd958 Ensure there's a subpath for the first control point 2020-01-06 17:42:35 +01:00
pylbrecht
a50aef6f00 Add a layer to store Pattern related information
Some information of `canvas_data::Pattern` was lost by
converting it to `raqote::Source` due to the fact that Raqote
did not store this information (e.g. linear gradient's start/end
points). We introduce another layer to keep this information for later
use (like in `is_zero_size_gradient()`).
2019-12-17 19:52:02 +01:00
pylbrecht
1aecf40922 Implement "repeat-x" and "repeat-y" for images 2019-12-17 19:52:02 +01:00
pylbrecht
b8b33788b6 Handle empty paths in PathBuilder::get_current_point()
The case of calling get_current_point() on empty paths has not been
handled and caused panics.
2019-12-17 19:51:57 +01:00
Bailey Blankenship
ec2961920b Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensions
Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
2019-11-10 18:37:14 -05:00
pylbrecht
7c81d20869 Implement create_gradient_stops() 2019-08-29 14:17:03 +02:00
Simon Sapin
98e4a53b72 Upgrade to rustc 1.39.0-nightly (f7af19c27 2019-08-15) 2019-08-23 08:23:21 +02:00
Bastien Orivel
dc78b6a989 Implement a few functions to make tests in draw-image and draw-path pass 2019-08-21 19:10:57 +02:00
Bastien Orivel
8cb8e7c627 WIP: Fix azure backend 2019-08-21 19:10:57 +02:00
Bastien Orivel
4c73e4bb3f Imlplement get_composition_op 2019-08-21 19:10:57 +02:00
Bastien Orivel
1dee418ff1 Set the line cap to butt when drawing a rect with a 0 width/height
Otherwise raqote will draw the cap even though it shouldn't because the
spec says so
2019-08-21 19:10:56 +02:00
Bastien Orivel
9229dc4d85 Implement clear_rect 2019-08-21 19:10:56 +02:00
Bastien Orivel
ed0dbafc72 Implement need_to_draw_shadow 2019-08-21 19:08:18 +02:00
pylbrecht
398929ffef Implement fill() for raqote::DrawTarget 2019-08-21 19:08:17 +02:00
Josh Matthews
4e51caeb7e Deal with fallout from mutable trait method change. 2019-08-21 19:08:17 +02:00
pylbrecht
b43c5c30e3 WIP: Make GenericPathBuilder's methods take &mut self 2019-08-21 19:08:17 +02:00
pylbrecht
f9e398d9f6 Make GenericPathBuilder take &mut self 2019-08-21 19:08:17 +02:00
pylbrecht
4179f91f93 Implement StrokeOptions 2019-08-21 19:08:17 +02:00
pylbrecht
4aad4ff858 Implement DrawOptions.set_alpha() 2019-08-21 19:08:16 +02:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
Patrick Walton
2f9c9cefdb WebRender units are no longer reexported. 2019-07-09 10:50:27 -04:00
Simon Sapin
1df2605292 Rename {azure,raqote}_backend feature flags to canvas2d-{azure,raqote} 2019-07-01 15:46:33 +02:00
Simon Sapin
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00
bors-servo
faf3a183f3
Auto merge of #23499 - est31:unused_code_removal_3, r=jdm
Remove unused code (3/N)

<!-- Please describe your changes on the following line: -->

Third PR in a series of PRs to remove unused/dead code from servo, powered by an (upcoming) tool of mine. Please take a look and tell me if you want to keep something.

* First PR: #23477
* Second PR: #23498

---
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they only remove dead code

<!-- 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/23499)
<!-- Reviewable:end -->
2019-06-04 02:27:29 -04:00
Josh Matthews
ce18636aef Make Azure backend build again. 2019-06-03 00:12:01 -04:00
Josh Matthews
db362184fd Fix formatting. 2019-06-03 00:12:01 -04:00
Josh Matthews
3243f1753b Add cargo feature to control canvas backend. 2019-06-03 00:12:01 -04:00
est31
e64de8d90a Remove unused code from a bunch of crates 2019-06-03 04:18:12 +02:00
pylbrecht
42bf1984be Make CanvasData use GenericDrawTarget 2019-05-31 15:55:18 -04:00
pylbrecht
7ace517770 Make CanvasPaintState generic 2019-05-31 15:55:18 -04:00
pylbrecht
3182eba73b Implement GenericPathBuilder for azure_hl::PathBuilder 2019-05-31 15:55:18 -04:00
pylbrecht
7c6460443c Implement GenericDrawTarget for azure_hl::DrawTarget 2019-05-31 15:55:17 -04:00
pylbrecht
7ad5149e50 Add GenericDrawTarget trait 2019-05-31 15:55:17 -04:00
Maharsh
1de8ddd89c Changes for sender reciever 2019-05-09 21:54:48 -04:00
Josh Matthews
18282b8071 Format canvas code. 2019-02-07 15:13:13 -05:00