Commit graph

95 commits

Author SHA1 Message Date
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
Mátyás Mustoha
7f0b820d4e Add initial support for WebGL compressed textures 2019-05-21 16:56:40 -04: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
Alan Jeffrey
8ddde7eacc Pass the GL context to the VRDisplay when rendering 2019-02-27 08:57:02 -06: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
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
Anthony Ramine
1c89ac90b9 Send alignment info directly in TexImage2D and TexSubImage2d messages 2018-11-16 12:39:20 +01:00
Anthony Ramine
65d1b11929 Make TexImage2D and TexSubImage2D struct variants 2018-11-16 12:38:07 +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
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +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
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Anthony Ramine
8828925f4f Properly support gl_PointSize and gl_PointCoord
Fixes #21719.
Fixes #20993.
Fixes #20992.
Fixes #21007.
Fixes #20979.
2018-10-18 20:15:23 +02:00
bors-servo
7e78edcff9
Auto merge of #21725 - pyfisch:update-wr, r=jdm
Update Webrender

New version is
9156a4465f6ad715a0206cdd9a7e9a6f0385fbd6

---

- [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 just updating WR

<!-- 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/21725)
<!-- Reviewable:end -->
2018-10-12 12:49:23 -04:00
Pyfisch
d13172845c Update Webrender
New version is
9156a4465f6ad715a0206cdd9a7e9a6f0385fbd6
2018-10-09 18:23:18 -04:00
Anthony Ramine
6c469b90b1 Share some code between 2D canvas and WebGL 2018-10-09 14:57:02 +02:00
Anthony Ramine
784fbb2bc1 Merge some byte swap/premultiply functions in their own crate 2018-10-06 01:11:55 +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
99b6091b7a Clean up create_webgl_context 2018-10-02 14:21:06 +02:00
bors-servo
57053e03bb
Auto merge of #21825 - jdm:backtrace-helpers, r=Manishearth
Optional backtraces for JS errors and WebGL errors

This adds two new build-time features to enable useful debugging tools when investigating why JS and WebGL content isn't working. They're optional because they're quite heavyweight.

---
- [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 they're optional developer features.

<!-- 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/21825)
<!-- Reviewable:end -->
2018-10-02 06:57:38 -04:00
Josh Matthews
26e1001efd
Remove trailing whitespace. 2018-10-01 13:32:34 +02:00
Josh Matthews
5dc80dd07a webgl: Add feature to store backtraces for each WebGL API call for easier debugging. 2018-10-01 10:43:13 +02:00
Josh Matthews
e5892989ca
Warn when using slow WebGL code path. 2018-09-27 18:44:02 -04:00
Anthony Ramine
6e4bf750a4 Kill WebGLThreadObserver 2018-09-12 23:46:49 +02:00
Josh Matthews
1b08dd5232 webgl: Move framebuffer initialization logic to WebGL thread. 2018-09-10 16:31:29 -04:00
Josh Matthews
15e2af0fea webgl: Support DEPTH_STENCIL_ATTACHMENT on osmesa. 2018-09-10 15:56:16 -04:00
Anthony Ramine
4bd8efa49e Use byte channels to send textures to the WebGL thread 2018-09-08 13:42:06 +02:00
Anthony Ramine
408e540c55 Use ipc::bytes_channel in ReadPixels 2018-09-08 13:42:06 +02:00
Anthony Ramine
9f924013bc Use a bytes channel in BufferData
This means we don't need to copy the input ArrayBuffer at all on the DOM side.
2018-09-07 11:28:59 +02:00
Anthony Ramine
04c81c5cc3 Merge code from Draw* and Draw*Instanced methods
This made me realise we weren't supporting OES_element_index_uint in the
ANGLE_instanced_arrays extension.
2018-08-02 22:54:39 +02:00
Anthony Ramine
76f23f7d78 Simplify gl.getShaderParameter() (fixes #20562)
The expectation change is due to the shader now using its DOM-side compile status.
It is actually a bug for the shader to think it actually compiled successfully,
but at least it does so consistently now.
2018-07-31 11:12:45 +02:00
Anthony Ramine
5a9ad01145 Cache which capabilities are enabled in the context (fixes #20534)
This is needed for #20555.
2018-07-25 19:58:02 +02:00