Commit graph

121 commits

Author SHA1 Message Date
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
bors-servo
846517342b Auto merge of #11147 - danlrobertson:webgl-tex, r=emilio
Impl copyTexImage2D and copyTexSubImage2D

- [X] `./mach build` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

Implement copyTexImage2D and copyTexSubImage2D for WebGLRenderingContext. Feedback would be appreciated. I did my best to follow the [spec](https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8). Please let me know if I missed anything. I couldn't find tests for this. Let me know if I should create one. I'm more than happy to do so. As always any feedback, comments,or critiques are very welcome 😄

Part of #10209

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11147)
<!-- Reviewable:end -->
2016-05-23 20:07:52 -07:00
Daniel Robertson
867cd9be29 Impl copyTexImage2D and copyTexSubImage2D
Implement copyTexImage2D and copyTexSubImage2D for
WebGLRenderingContext.
2016-05-23 22:29:23 -04:00
David Zbarsky
abfbeca670 Implement SampleCoverage 2016-05-22 00:23:29 -07:00
Ms2ger
cc2b2b50a7 Remove ConstellationChan.
It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.
2016-05-19 17:13:44 +02:00
bors-servo
fe116b4bd7 Auto merge of #10776 - dzbarsky:getVertexAttrib, r=emilio
Implement GetVertexAttrib

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10776)
<!-- Reviewable:end -->
2016-05-18 14:40:32 -07:00
David Zbarsky
2bf016ff14 Implement GetVertexAttrib 2016-05-12 23:56:10 -07:00
David Zbarsky
2f416baa11 Implement ReadPixels 2016-05-12 23:50:36 -07:00
Daniel
8a5b0b8972 Implement IsShader fn and IsTexture fn for WebGLRenderingContext 2016-05-09 20:54:57 -04:00
Patrick Walton
91907f563b compositing: Send mouse events to the right pipeline when using
WebRender.

Fixes mouse events in browser.html.

Requires servo/webrender_traits#47 and servo/webrender#272.
2016-05-04 11:40:15 -07:00
Keith Yeung
2946fbef77 Implement stencil fns for WebGLRenderingContext 2016-04-24 02:40:22 -04:00
bors-servo
f1defb446e Auto merge of #10443 - emilio:webgl-teximage2d-overload, r=jdm
webgl: Implement the pending texImage2D overload, and add more validation

This is a large-ish refactor of the Texture2D code, but it should be
easier to read and of course more correct.

I tried to annotate every error condition with a spec paragraph.

I made just a reftest to ensure this works as intended, since I expect #10373 to land pretty soon.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10443)
<!-- Reviewable:end -->
2016-04-22 11:25:29 -07:00
Emilio Cobos Álvarez
f6f1e37b29
webgl: Fix a few typos in comments 2016-04-20 20:30:05 +02:00
Emilio Cobos Álvarez
d152c7fe88
webgl: texture: Make initialize only mark as initialized the current face
Also refactor a bit the code, and remove the unused `is_initialized`
flag.
2016-04-20 20:27:37 +02:00
Emilio Cobos Álvarez
21e2f97cfa
webgl: Fix filling a non-zero level
You can fill a level > 0 as long as the width and height values are
power of two, so the previous test was bogus.
2016-04-20 20:24:56 +02:00
Emilio Cobos Álvarez
1ad7f73caf
webgl: Reset bound buffer when appropiate in BufferData
This makes the test bufferDataBadArgs pass appropiately.
2016-04-20 19:22:05 +02:00
Emilio Cobos Álvarez
bc08762414
webgl: Rename UniformType to UniformSetterType and hoist to the bottom 2016-04-19 20:25:30 +02:00
Emilio Cobos Álvarez
6a15c2f245
webgl: Remove active_uniform related validation.
It's broken for uniform arrays, since uniform.id() stops being the index
then.

We need to add a more complex integration with angle for this to ever
be correct.

Unfortunately the ANGLE part that we should touch is C++, and it has
destructors, so we need to hook destructors there, and I can't do it
right now.
2016-04-19 13:27:19 +02:00
Emilio Cobos Álvarez
c807cab300
webgl: Validate that the texture should be power of two if the level is
greater than 1
2016-04-19 13:25:44 +02:00
Emilio Cobos Álvarez
87e112dea7
webgl: Implement the pending texImage2D overload, and add more validation
This is a large-ish refactor of the Texture2D code, but it should be
easier to read and of course more correct.

I tried to annotate every error condition with a spec paragraph.
2016-04-19 13:25:40 +02:00
David Zbarsky
a67a744057 Prevent use of reserved names in BindAttribLocation 2016-04-17 11:52:40 -07:00
Adrian Utrilla
89c432b2d2
Added remaining uniforms 2016-04-14 07:42:14 +02:00
David Zbarsky
34644401c6 Implement GetActiveAttrib 2016-04-11 23:12:04 -07:00
bors-servo
f0014bd9cd Auto merge of #10224 - emilio:shader-type-validations, r=jdm
webgl: Add attribute validations and other nits

Fixes https://github.com/servo/servo/issues/9958

Depends on a bunch of prs, and needs a test.

r? @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10224)
<!-- Reviewable:end -->
2016-04-12 05:18:49 +05:30
bors-servo
4cc241c858 Auto merge of #10433 - saurvs:pr3, r=emilio
Implement WebGLRenderingContext.getActiveUniform()

Fixes https://github.com/servo/servo/issues/10397

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10433)
<!-- Reviewable:end -->
2016-04-07 03:59:01 +05:30
Saurav Sachidanand
56eef10718 Implement WebGLRenderingContext.getActiveUniform() 2016-04-06 20:02:45 +05:30
Adrian Utrilla
36522ba9c3 Added Uniform2fv 2016-04-06 13:12:44 +02:00
Adrian Utrilla
b48e0f2ba9 Added Uniform1iv 2016-04-06 12:20:57 +02:00
Ar13mis
86b1f4249a Add Uniform2f 2016-04-04 16:00:22 -06:00
bors-servo
88d29e537c Auto merge of #10369 - autrilla:Uniform4iv, r=emilio
Issue #10368: Implemented Uniform4iv and Uniform4i

Uniform4iv can make use of Uniform4i, so I implemented both.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10369)
<!-- Reviewable:end -->
2016-04-03 11:48:47 +05:30
Emilio Cobos Álvarez
6fcc03c965 webgl: Make the api return the context limits and use them for validations
This allows keeping the VertexAttrib* calls asynchronous.

Another option would be to do the validation in the apply() function,
but that'd require us passing an unnecessary channel around and add
extra synchronization.

The counterpart of this is that it has to be updated when the context
changes, but that's less problem.
2016-04-03 01:21:56 +02:00
Emilio Cobos Álvarez
8d7ee15ace webgl: Remove unneeded return value. 2016-04-03 01:21:56 +02:00
Emilio Cobos Álvarez
466c8881de webgl: Use early return in DrawArrays 2016-04-03 01:21:56 +02:00
Emilio Cobos Álvarez
240ac7cfe2 webgl: Validate shader type parameter to CreateShader. 2016-04-03 01:21:56 +02:00
Adrian Utrilla
bd1448ab56 Added Uniform4iv and Uniform4i 2016-04-02 20:48:29 +02:00
Connor Brewster
3fd7634f54 webgl: finish, flush, detachShader, generateMipmap, Uniform1i 2016-04-02 12:31:47 -06:00
Jan-Fabian Humann
d778562844 #10211: Stop re-exporting webrender_traits WebGL types from canvas_traits 2016-03-30 20:05:16 +02:00
Emilio Cobos Álvarez
5ed93a5c4a Change old references of ecoal95 2016-03-23 18:12:40 +01:00
Ms2ger
63a00f4dbf Stop sending the renderer id to script. 2016-03-21 17:55:08 +01:00
Ms2ger
7e2e54326f Remove renderer_id fields. 2016-03-21 17:49:47 +01:00
Ms2ger
3c04bca0f4 Remove get_renderer_id functions. 2016-03-21 17:45:42 +01:00
Glenn Watson
c0531c312f Add WebRender integration to Servo.
WebRender is an experimental GPU accelerated rendering backend for Servo.

The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).

WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
2016-02-18 10:35:29 +10:00
Alexander Lopatin
2be49404be Fix #9508: Beautify our union enums constructors 2016-02-07 02:55:21 +03:00
jmr0
167ffa7a95 adding image metadata notification capabilities to image cache 2016-01-29 20:54:49 -05:00
Kishor Bhat
1ca2073979 Remove unused imports in script 2016-01-17 12:41:28 +05:30
Emilio Cobos Álvarez
4092ffd245 webgl: Check shader compilation status on use_program. 2016-01-13 15:28:36 +01:00
Emilio Cobos Álvarez
e3532dda24 webgl: Check for bound element array buffer on DrawElements
And remove outdated TODOs
2016-01-13 13:41:32 +01:00
Emilio Cobos Álvarez
910b2260ab webgl: Check for pending current_program errors 2016-01-13 13:41:31 +01:00
Emilio Cobos Álvarez
221a583784 webgl: Track uniformlocation's program 2016-01-13 13:41:30 +01:00