Commit graph

183 commits

Author SHA1 Message Date
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
Anthony Ramine
3e8c2d659a Implement gl.getUniform() 2018-07-18 21:37:41 +02:00
Anthony Ramine
476640c3ab Use active uniforms data to implement gl.uniform* checks 2018-07-17 01:26:44 +02:00
Anthony Ramine
e7631cea61 Move ANGLE name shenanigans to WebGL thread 2018-07-16 10:16:30 +02:00
Anthony Ramine
cbac5d05be Store active uniforms on the DOM side 2018-07-16 10:16:29 +02:00
Anthony Ramine
a5b800970a Remove WebGLCommand::GetActiveAttrib 2018-07-11 11:55:50 +02:00
Anthony Ramine
4e6eea221a Implement instanced WebGL drawing calls (part of #20791) 2018-07-08 10:44:45 +02:00
Anthony Ramine
31774e9203 Implement gl.getParameter(gl.MAX_VIEWPORT_DIMS) 2018-07-08 10:14:10 +02:00
Anthony Ramine
15389586d9 Make gl.useProgram(null) do the right thing 2018-07-05 14:20:47 +02:00
Anthony Ramine
fc593c68c5 Store active attribs in DOM and optimise active attributes APIs 2018-07-05 14:20:47 +02:00
Anthony Ramine
cde6023ed4 Store vertex attribs data in DOM and optimise GetVertexAttrib 2018-07-05 14:20:47 +02:00
Glenn Watson
823f3e2eb1 Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
Anthony Ramine
f1288cc6e0 Implement EXT_texture_filter_anisotropic 2018-06-06 12:24:47 +02:00