Commit graph

434 commits

Author SHA1 Message Date
Simon Sapin
acd8454b16 Print an error message if neither Canvas 2D backend is selected 2019-07-01 15:46:36 +02: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
Josh Matthews
385b46cff7 Disable WGL for Windows arm64. 2019-06-11 15:53:35 -04: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
3539c029f1 Most basic raqote draw target stubs. 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
pylbrecht
d1397c0b20 Add raqote to canvas' dependencies 2019-05-31 15:55:14 -04:00
Paul Rouget
1758207393 Glutin update: dependencies update 2019-05-25 07:15:30 -04:00
Josh Matthews
60688da71a Revert "Glutin update: dependencies update"
This reverts commit 30fb18e711.
2019-05-22 14:18:38 -04:00
Paul Rouget
30fb18e711 Glutin update: dependencies update 2019-05-22 09:55:38 +02:00
bors-servo
123f58592c
Auto merge of #23226 - mmatyas:webgl_compressed_textures, r=jdm
Add initial support for WebGL compressed textures

This patch is an initial implementation of WebGL compressed texture support, it contains

- functions for registering and querying compressed texture extensions
- initial implementation of `CompressedTexImage2D` and `CompressedTexSubImage2D` and their parameter validation
- implementation of S3TC (DXT1, DXT3, DXT5) and ETC1 extensions as examples

What's still missing:

- some of the parameter validation steps are missing
- the pixel comparison tests fail for more complex cases (I'm probably missing something trivial at the GL calls)

Related: #10209 and #20594

cc @jdm @zakorgy

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] Related issues: #10209, #20594
- [x] There are tests for these changes

<!-- 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/23226)
<!-- Reviewable:end -->
2019-05-21 17:10:24 -04:00
Mátyás Mustoha
7f0b820d4e Add initial support for WebGL compressed textures 2019-05-21 16:56:40 -04:00
bors-servo
fdafc833ae
Auto merge of #23135 - maharsh312:master, r=jdm
Create CanvasRect for OffscreenCanvas

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

Created CanvasRect fot OffscreenCanvas and Updated Testcases

---
<!-- 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
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (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/23135)
<!-- Reviewable:end -->
2019-05-13 16:19:57 -04:00
Maharsh
1de8ddd89c Changes for sender reciever 2019-05-09 21:54:48 -04:00
Paul Rouget
4dcee2f36c WR update: new viewport semantic 2019-03-22 15:41:48 +08:00
Peter Hall
8bfd4dc1e2 #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
bors-servo
34a5a824b8
Auto merge of #23000 - jdm:invisible-webgl, r=nox
Make webgl behave better with session history

This prevents the compositor from animating pages that are not actually visible, so pages using webgl do not needlessly impact the performance of the rest of the browser. Additionally, this fixes a problem that was alluded to in [this code](b5228c098b/src/draw_buffer.rs (L282-L285)), causing Servo to delete arbitrary resources when a GC occurred in content that used three.js.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22987 and fix #22977 and fix #20934 and fix #20953 and fix #20930 and fix #20950 and fix #20924
- [x] There are tests for these changes

<!-- 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/23000)
<!-- Reviewable:end -->
2019-03-08 10:46:52 -05:00
Josh Matthews
056edbbd15 Ensure that removed contexts are made active before removal. 2019-03-08 09:49:52 -05:00
Josh Matthews
3121f42d52 Remove offscreen_gl_context dependency from canvas_traits and script. 2019-03-07 09:27:36 -05:00
Peter Hall
1e9de470ea Fixed inconsistency in import of gl::Gl
All other uses of `Gl` in this file use the qualified path `gl::Gl`.
2019-02-27 19:27:05 +00:00
Alan Jeffrey
8ddde7eacc Pass the GL context to the VRDisplay when rendering 2019-02-27 08:57:02 -06:00
bors-servo
3d4a416c6b
Auto merge of #21310 - jdm:canvas-path, r=pcwalton
Improve rendering of transformed 2d paths

This makes http://webglreport.com/ render correctly by porting the [equivalent code](https://searchfox.org/mozilla-central/rev/196560b95f191b48ff7cba7c2ba9237bba6b5b6a/dom/canvas/CanvasRenderingContext2D.h#847-875) from Gecko's 2d canvas implementation that handles paths with transformations. The first commit fixes the rendering issue, and the second commit fixes some new test failures that were exposed by that change.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21169
- [x] There are tests for these changes

<!-- 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/21310)
<!-- Reviewable:end -->
2019-02-11 14:41:19 -05: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
Josh Matthews
25a61f3783 Report all messages processed by the webgl thread. 2019-01-31 14:57:38 -05:00
Josh Matthews
878f020013 Ensure that resized GL contexts do not destroy their resources while in use by WR. 2019-01-17 22:44:41 -05:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Manish Goregaokar
5413328be2 Update webrender 2018-11-27 17:33:13 -08:00
bors-servo
c96f07a0b5
Auto merge of #22234 - jdm:android-gl-crash, r=Manishearth
Fix android GL crash

There were two issues, fundamentally:
1. POINT_SPRITE is not supported on GLES, which was causing the GL_INVALID_ENUM error when using any WebGL API.
2. The version check was using the wrong version value to determine if enabling point sprites was necessary.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22162
- [x] There are tests for these changes

<!-- 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/22234)
<!-- Reviewable:end -->
2018-11-23 12:38:24 -05:00
Josh Matthews
9c29e139b9 webgl: Don't unnecessarily enable point sprites on GLES. 2018-11-21 14:03:46 -05:00
Anthony Ramine
9a8d03a0f3 Make HTMLCanvasElement::fetch_all_data return a shared memory blob 2018-11-21 12:53:50 +01:00
Anthony Ramine
804d964b7d Send an IpcSharedMemory in tex_image_2d and tex_sub_image_2d
This avoids a copy in the case of textures coming from HTMLImageElement.
2018-11-20 10:14:52 +01:00
Anthony Ramine
cfca906ee2 Call rgba8_byte_swap_colors_inplace on the WebGL thread 2018-11-20 10:14:52 +01:00
Anthony Ramine
87c849c0d6 Move prepare_pixels to the canvas thread
Nothing else uses it in the whole crate graph.
2018-11-20 10:14:51 +01:00
Anthony Ramine
ca62b5c318 Call prepare_pixels on the WebGL thread 2018-11-20 10:14:50 +01:00
Anthony Ramine
2a5539caef Use Size2D in TexImage2D and TexSubImage2D messages 2018-11-20 10:14:49 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00