Commit graph

456 commits

Author SHA1 Message Date
Josh Matthews
25b20ebfc6
Drop webgl main thread data during shutdown. 2019-07-29 08:15:59 -04:00
Alan Jeffrey
c757a9c009 Get XR sessions to track the draw texture, so we render the XR framebuffer rather than the default canvas framebuffer 2019-07-28 10:24:38 -04:00
Alan Jeffrey
133a17e15c Replace use of callbacks in webxr by channels 2019-07-26 23:36:13 -05:00
Alan Jeffrey
0178fcae4e When using the WebGL external image API, use sync calls if we happen to be on the WebGL thread 2019-07-26 17:39:40 -05:00
Josh Matthews
a2ca3ddbd9 Remove extra webgl message pumping thread. 2019-07-25 23:07:23 -04:00
Josh Matthews
39d13d1fc8 Support running WebGL in its own thread or on the main thread. 2019-07-25 23:05:03 -04: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
bors-servo
650f90b271
Auto merge of #23763 - servo:jdm-patch-40, r=Manishearth
Don't enable azure canvas feature by default.

This caused problems when I was trying to do a UWP build.

<!-- 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/23763)
<!-- Reviewable:end -->
2019-07-12 19:42:02 -04:00
Josh Matthews
dbaed5ed92 Make GL/GLES decisions based on the API in use. 2019-07-12 13:36:44 -04:00
bors-servo
812bf8d816
Auto merge of #23758 - jdm:compositing-canvas-break, r=gterzian
Remove canvas->compositing dependency

There's one tiny place in the canvas crate that depends on the compositing crate, and it's really quite backwards. If we use trait objects instead it becomes much cleaner to reason about.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because no tests for windows-only webgl code.

<!-- 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/23758)
<!-- Reviewable:end -->
2019-07-12 10:26:55 -04:00
Josh Matthews
577eb654cf
Don't enable azure canvas feature by default. 2019-07-12 08:43:33 -04:00
Josh Matthews
f02d594094 Remove canvas->compositing dependency. 2019-07-12 08:22:26 -04:00
bors-servo
df73c71fb1
Auto merge of #23516 - pcwalton:webrenderup, r=pcwalton,jdm
Upgrade WebRender

This is against an old Servo because I can't build current Servo due to compile errors in RNG crates. I verified that it starts up.

---
<!-- 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 #23516
- [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/23516)
<!-- Reviewable:end -->
2019-07-12 08:10:31 -04:00
Manish Goregaokar
c5a0fc56ea Use separate IPC-only locking mechanism when locking from webxr 2019-07-11 11:12:59 -07:00
Patrick Walton
2f9c9cefdb WebRender units are no longer reexported. 2019-07-09 10:50:27 -04:00
Fernando Jiménez Moreno
0da87ad169 Introduce WebrenderExternalImageRegistry 2019-07-04 10:26:48 +02:00
Fernando Jiménez Moreno
ba9cf85fb3 Webrender external image handler demux 2019-07-04 10:26:47 +02:00
Fernando Jiménez Moreno
7d589ed4f5 Media crate 2019-07-04 10:25:49 +02:00
Víctor Manuel Jáquez Leal
a9ad088e70 Instanciate and use the implemented webrender::ExternalImageHandler 2019-07-04 10:25:48 +02:00
Víctor Manuel Jáquez Leal
e000c14eb2 Implement webrender::ExternalImageHandler for player
Added trait GLPlayerExternalImageApi and its implementation
Implemented webrender::ExternalImageHandler using
GLPlayerExternalImageApi
2019-07-04 10:25:48 +02:00
Víctor Manuel Jáquez Leal
38eb48441c GLPlayer thread API implementation 2019-07-04 10:25:48 +02:00
Víctor Manuel Jáquez Leal
43467b4290 Add GLPlayerThreads in canvas
This factory will launch a GLPlayerThread from the application main
thread.

And add GLPlayerThread, the multiplexor for media players' video
renderers. This thread will receive commands from htmlmedialement
and webrenderer.

This code is also inspired by webgl_threads and WebGLThread.
2019-07-04 10:25:47 +02:00
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