Commit graph

52 commits

Author SHA1 Message Date
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
Josh Matthews
decf88331b Keep is_point_in_path using a path, rather than a path builder. 2019-02-07 15:09:59 -05:00
Josh Matthews
2c5a6ebc53 Always store a transform in PathBuilderRef. 2019-02-06 19:17:35 -05:00
Josh Matthews
53ae73bdec canvas: Refactor implicit path/path builder state machine into a single enum. 2019-02-06 18:39:03 -05:00
Josh Matthews
e7edc367f9 Transform paths between user and device space when there is a 2D canvas transformation present. 2019-02-06 18:39:02 -05:00
Josh Matthews
c87a35e4d5 Ensure canvas path stroking and filling use the same paths. 2019-02-06 18:37:22 -05:00
Manish Goregaokar
5413328be2 Update webrender 2018-11-27 17:33:13 -08:00
Anthony Ramine
9a8d03a0f3 Make HTMLCanvasElement::fetch_all_data return a shared memory blob 2018-11-21 12:53:50 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Anthony Ramine
a5779ad372 Prefix some pixels functions with rgba8_ 2018-11-16 12:37:34 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Bastien Orivel
c2be78b3fe Use pixels::get_rect in CanvasData::draw_image
Those functions are the same except that get_rect isn't failible, so we
have to check that the rect we want is actually in the image.
2018-10-12 19:57:26 +02:00
Anthony Ramine
c53db64e63 Return input as is when there is no cropping to be done 2018-10-09 14:57:04 +02:00
Anthony Ramine
2bf4fcd9bd Remove some condition in CanvasData::write_image
The surface creation should never fail.
2018-10-09 14:57:04 +02:00
Anthony Ramine
77c28bdfc9 Abstract some stuff common to ctx.getImageData and ctx.putImageData 2018-10-08 11:39:09 +02:00
Anthony Ramine
e62dbabb46 Handle some transparent black cases in ctx.getImageData 2018-10-07 02:52:06 +02:00
Anthony Ramine
241dba064d Align ctx.createImageData and ctx.getImageData with the spec 2018-10-06 11:41:48 +02:00
Anthony Ramine
f13e35b2c5 Always make sure we get a surface in CanvasData::put_image_data 2018-10-06 10:53:10 +02:00
Anthony Ramine
19f40cdf0b Introduce ImageData::get_rect
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.
2018-10-06 01:12:05 +02:00
Anthony Ramine
82c7d71811 Improve gl.putImageData
This commit should allow us to send smaller blobs to the canvas thread,
I made it into its own commit just to try=wpt.
2018-10-05 17:07:58 +02:00
Anthony Ramine
3d910feb3a Align canvas.putImageData with spec
The arguments are supposed to be long values, not floats.
2018-10-05 17:07:56 +02:00
Anthony Ramine
62ea3c093a Move canvas.putImageData checks to the DOM side 2018-10-05 00:35:39 +02:00
Anthony Ramine
a3392610c3 Make HTMLCanvasElement::get_size return a Size2D<u32>
The changes keep trickling down.
2018-10-02 14:21:06 +02:00
Anthony Ramine
426067069c Clean up ToAzurePattern for FillOrStrokeStyle 2018-10-02 14:21:06 +02:00
Anthony Ramine
36c8cd229e Remove Canvas2dMsg::DrawImageSelf
Now that all canvas share the same thread, it's useless to have a separate message
for that.
2018-09-17 16:24:01 +02:00
Anthony Ramine
9f7b746430 Specify capacity in CanvasData::read_pixels 2018-09-17 10:01:13 +02:00
Anthony Ramine
21e992bf40 Update azure
https://github.com/servo/rust-azure/pull/293
2018-09-16 20:53:38 +02:00
Anthony Ramine
fef04c65f6 Avoid a byte swap roundtrip 2018-09-14 14:48:39 +02:00
Anthony Ramine
2f2331f149 Use a byte channel to retrieve pixels of 2D canvas 2018-09-13 22:04:30 +02:00
Anthony Ramine
b5c469d52e Merge byte swap and unmultiplying loops in ctx.getImageData() 2018-09-13 22:04:30 +02:00
Bastien Orivel
9e446971a8 Update euclid to 0.18 2018-07-18 09:27:24 +02:00
Glenn Watson
823f3e2eb1 Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
cadubentzen
3a6679b3b5 Refactor draw_image and make draw_image_self call draw_image in canvas. 2018-06-08 00:15:10 -03:00