Commit graph

6673 commits

Author SHA1 Message Date
Fernando Jiménez Moreno
4a927b5b78 Rustfmt audiobuffer.rs 2018-09-19 07:28:12 +02:00
Fernando Jiménez Moreno
138c739205 Keep shared and js channels in sync 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
346d705c66 Do not skip buffer update during copyToChannel 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
a81389268a Throw IndexError if start_in_channel is equal to ArrayBuffer length 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
10e8ab3892 Apply start_in_channel to destination and not source during AudioBuffer.CopyToChannel 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
e0e1f5f900 Implement AudioBufferSourceOptions.AudioBuffer and always keep servo media audio buffer updated 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
5307766ed2 Check AudioBuffer options constraints 2018-09-19 06:54:16 +02:00
Fernando Jiménez Moreno
b8ade93538 Throw when trying to copy AudioBuffer data from or to a SharedArrayBuffer 2018-09-19 06:54:16 +02:00
Fernando Jiménez Moreno
e80ac0000f Fix AudioBuffer crash. Do not modify number of channels while moving from shared to js channels 2018-09-19 06:54:16 +02:00
bors-servo
a02c43dc67
Auto merge of #21712 - Manishearth:analysernode, r=ferjm
Implement AnalyserNode

<s>Needs https://github.com/servo/media/pull/127 to land (and a dependency
update)</s>

r? @ferjm

realtimeanalyser-fft-scaling.html, the test that actually checks for some level of FFT correctness, sadly doesn't work since we don't process nodes not connected to the destination.

However I locally fixed the test to work differently and it passed. We'll fix the processing model eventually.

<!-- 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/21712)
<!-- Reviewable:end -->
2018-09-18 18:59:07 -04:00
bors-servo
82e94e3b67
Auto merge of #21723 - servo:webgl, r=jdm
More drive-by WebGL and canvas fixes

<!-- 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/21723)
<!-- Reviewable:end -->
2018-09-18 11:06:51 -04:00
Manish Goregaokar
e9be179952 Set default channel count for AnalyserNode to 2
This was deliberately changed
(https://github.com/WebAudio/web-audio-api/pull/1397 ) but the tests
have not been updated
2018-09-18 18:18:36 +05:30
Manish Goregaokar
9dfc57878e Add createAnalyser 2018-09-18 18:18:36 +05:30
Manish Goregaokar
18b9ad9e5c AnalyserNode in script 2018-09-18 18:18:36 +05:30
Emilio Cobos Álvarez
60e28c61e5
Fix Servo build. 2018-09-18 11:52:39 +02:00
Anthony Ramine
900c3cc6b5 Implement gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL) 2018-09-18 11:48:34 +02:00
Anthony Ramine
fe6f53ffb4 Fix a small texSubImage2D bug 2018-09-18 10:49:31 +02:00
Anthony Ramine
8c100b23b1 Implement proper origin checks for WebGL textures (fixes #21522) 2018-09-18 10:33:42 +02:00
Anthony Ramine
36c8cd229e Remove Canvas2dMsg::DrawImageSelf
Now that all canvas share the same thread, it's useless to have a separate message
for that.
2018-09-17 16:24:01 +02:00
Anthony Ramine
f1e8eb640c Don't create 2D canvas contexts arbitrarily
Sometimes, the canvas still has no rendering context, in this case it represents
a transparent black rectangle.
2018-09-16 20:44:41 +02:00
Anthony Ramine
ed673f8070 Mark some canvas methods as unsafe
They use raw JS context pointers.
2018-09-16 20:44:41 +02:00
bors-servo
0ecd671f52
Auto merge of #21711 - servo:webgl, r=jdm
Some fixes to canvas stuff

<!-- 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/21711)
<!-- Reviewable:end -->
2018-09-14 21:09:05 -04:00
Anthony Ramine
462a488d55 Update HTMLCanvasElement WebIDL definition 2018-09-15 00:24:21 +02:00
Josh Matthews
59b8f971b5 webgl: Mark framebuffers as uninitialized when their attached renderbuffer's storage changes. 2018-09-14 16:17:47 -04:00
Anthony Ramine
3528ef30e5 Update CanvasRenderingContext2D WebIDL definition
CanvasImageSource was never supposed to include CanvasRenderingContext2D.
2018-09-14 14:48:42 +02:00
Anthony Ramine
2b574bbdf8 Update the WebIDL parser 2018-09-14 14:48:41 +02:00
Anthony Ramine
70a0174b0a Remove a panic due to missing video support 2018-09-14 14:48:41 +02:00
Anthony Ramine
2f2331f149 Use a byte channel to retrieve pixels of 2D canvas 2018-09-13 22:04:30 +02:00
Anthony Ramine
b5c469d52e Merge byte swap and unmultiplying loops in ctx.getImageData() 2018-09-13 22:04:30 +02:00
Anthony Ramine
ac822ee2fc Remove erroneous check from CopyTexImage2D
The internal format of the bound texture doesn't matter, what matters is
which components can be found in the framebuffer.
2018-09-13 22:04:29 +02:00
bors-servo
60b926ade4
Auto merge of #21683 - servo:webgl, r=jdm
Properly support PACK_ALIGNMENT in WebGL 1

<!-- 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/21683)
<!-- Reviewable:end -->
2018-09-13 01:47:52 -04:00
bors-servo
b0de9c5315
Auto merge of #21628 - paavininanda:Current-pixel-density, r=jdm
Current pixel density

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

---
<!-- 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 a subset of #11416.

<!-- Either: -->
- [x] There are tests for these changes OR

<!-- 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/21628)
<!-- Reviewable:end -->
2018-09-13 00:16:46 -04:00
bors-servo
cd02ca6c19
Auto merge of #21674 - Manishearth:channel-count, r=ferjm
Pass through channel settings in AudioNode constructor

Most audionodes let you pass in channel count/etc settings in their
constructors, and have different defaults. Using the `create_node`
argument added in https://github.com/servo/media/pull/124 , this passes
that information through.

r? @ferjm.

<!-- 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/21674)
<!-- Reviewable:end -->
2018-09-12 19:11:03 -04:00
Anthony Ramine
d5f3b211ba Properly support PACK_ALIGNMENT in WebGL 1 2018-09-12 23:45:49 +02:00
Anthony Ramine
452d85005a Simplify WebGLRenderingContext::PixelStorei 2018-09-12 23:45:49 +02:00
bors-servo
26745b2741
Auto merge of #21461 - jdm:webgltmp2, r=nox
Various webgl fixes for framebuffer attachment test

These changes resolve all panics on macOS when running framebuffer-object-attachment.html in headless and headful testing.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes OR
- [x] Fixes #13710. Fixes #20570.

<!-- 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/21461)
<!-- Reviewable:end -->
2018-09-12 16:36:08 -04:00
paavininanda
25027e476c Current-pixel-density tests passing 2018-09-13 00:23:09 +05:30
bors-servo
910cc23a6e
Auto merge of #21325 - gterzian:crossbeam_integration, r=SimonSapin,jdm
Replace mpsc with crossbeam-channel

Follow up on https://github.com/servo/servo/pull/19515

---

Selecting over multiple channels in `std::sync::mpsc` is not stable and likely never will be:

https://github.com/rust-lang/rust/issues/27800#issuecomment-260136777
> It seems the only thing keeping `mpsc_select` around is Servo.

crossbeam-channel is designed specifically to replace `std::sync::mpsc` and fix many of its shortcomings:
https://github.com/stjepang/rfcs-crossbeam/blob/channel/text/2017-11-09-channel.md

This is to be landed together with https://github.com/servo/ipc-channel/pull/183.

<!-- 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/21325)
<!-- Reviewable:end -->
2018-09-12 13:33:45 -04:00
bors-servo
9a83ab6297
Auto merge of #21280 - paavininanda:Update_the_image_data, r=jdm
Reacting to environment changes

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

---
<!-- 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 a subset of #11416

<!-- Either: -->
- [x] These changes do not require tests because they will be added when the complete responsive images is complete

<!-- 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/21280)
<!-- Reviewable:end -->
2018-09-12 10:47:13 -04:00
Fernando Jiménez Moreno
831201cc1b Make tidy happy 2018-09-12 15:21:55 +02:00
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
Gregory Terzian
b977b4994c add servo_channel crate 2018-09-12 11:25:45 +08:00
paavininanda
2de300d49c Reacting to environment changes 2018-09-12 02:11:13 +05:30
Manish Goregaokar
9254606b01 Pass down ChannelInfo to create_node 2018-09-11 19:24:01 +05:30
bors-servo
049eb6887e
Auto merge of #21539 - ferjm:multichannel.audio.decoder, r=Manishearth
Add support for multichannel decoded audio

- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [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/21539)
<!-- Reviewable:end -->
2018-09-11 08:41:25 -04:00
Fernando Jiménez Moreno
f423ede07f Add support for multichannel decoded audio 2018-09-11 10:38:56 +02:00
bors-servo
b0ee750fba
Auto merge of #21660 - servo:webgl, r=jdm
Some more drive-by fixes for rgba8_image_to_tex_image_data

<!-- 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/21660)
<!-- Reviewable:end -->
2018-09-10 19:21:45 -04:00
Josh Matthews
4edb7b194c webgl: Remove knowledge of attached framebuffers from renderbuffers and textures. 2018-09-10 16:31:33 -04:00
Josh Matthews
8ede221a83 webgl: Ensure that renderbuffers have been bound before attaching to a framebuffer. 2018-09-10 16:31:31 -04:00
Josh Matthews
bb8d9ba74c webgl: Ensure that depth and stencil attachments are rebound after messing with DEPTH_STENCIL attachments. 2018-09-10 16:31:30 -04:00