Граф коммитов

35 Коммитов

Автор SHA1 Сообщение Дата
Glenn Watson c6d5efc75f servo: Merge #9589 - Add WebRender integration to Servo (from glennw:webrender); r=pcwalton
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!

Source-Repo: https://github.com/servo/servo
Source-Revision: ab07b06823ea9748a6091aee2281495f86f00bce

--HG--
rename : servo/tests/unit/net_traits/lib.rs => servo/resources/shaders/clear.fs.glsl
rename : servo/tests/unit/net_traits/lib.rs => servo/resources/shaders/debug_color.fs.glsl
rename : servo/tests/unit/net_traits/lib.rs => servo/resources/shaders/mask.fs.glsl
2016-02-19 00:25:06 +05:01
Anthony Ramine 08f5c3da70 servo: Merge #9532 - Say farewell to in-tree HeapSizeOf (from nox:dedup-heapsize); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 2a6707ce58df27d93e865bffb6b44d396b810c99
2016-02-05 03:11:36 +05:01
Emilio Cobos Álvarez 643caf9158 servo: Merge #9107 - webgl: Track the current program, implement some uniform functions, and nits (from emilio:webgl-uniforms-and-nits); r=simartin
Was done while implementing sequence arguments.

Depends on #9056.

Source-Repo: https://github.com/servo/servo
Source-Revision: c13e84010d1dd33c5532cdfa2937dddd4db4dd26
2016-01-13 21:45:59 +05:01
Simon Martin 3106b1bea2 servo: Merge #8948 - Issue #8738: bufferSubData and texImage2D argument sanity checks (from simartin:issue_8738); r=ecoal95
Fixes https://github.com/servo/servo/issues/8738

Source-Repo: https://github.com/servo/servo
Source-Revision: c1cb9403a7bfa9720c653c333134b55fc214c746
2015-12-29 16:58:27 +05:01
David Zbarsky b089820bd0 servo: Merge #8997 - Implement WebGL scissor method (from dzbarsky:scissor); r=dzbarsky
Source-Repo: https://github.com/servo/servo
Source-Revision: 1695c0ad27e4c9c062e26a5db154521e400ecbd9
2015-12-16 10:36:32 +05:01
David Zbarsky fb2993ff72 servo: Merge #8761 - Implement some more WebGL functions (from dzbarsky:gl_functions); r=dzbarsky
r? @ecoal95

Source-Repo: https://github.com/servo/servo
Source-Revision: 89d9aad1e1e3cd93b12088f09aad1193e7298ba4
2015-12-14 07:56:20 +05:01
Roman Klauke f19fc89d4a servo: Merge #8920 - remove the "core" feature attribute from canvas (from romankl:core-feature); r=Ms2ger
The core feature is marked as stable and gives this nice warning:
```
servo/components/canvas_traits/lib.rs:7:12: 7:16 warning: this feature is stable. attribute no longer needed, #[warn(stable_features)] on by default
/servo/components/canvas_traits/lib.rs:7 #![feature(core)]
```
This commit removes the usage of this feature.

Source-Repo: https://github.com/servo/servo
Source-Revision: 996c0a60b81e7d7e0fbfea81a546771ea9327df6
2015-12-11 02:10:37 +05:01
Simon Martin c6b91c93fe servo: Merge #8831 - Issue #6791: Allow more array types in bufferData and bufferSubData (from simartin:ticket_6791); r=eefriedman
Fix https://github.com/servo/servo/issues/6791

Source-Repo: https://github.com/servo/servo
Source-Revision: 95e6b1d101ca1a1019b8fea1a13a5ef37430901f
2015-12-07 02:10:32 +05:01
David Zbarsky dcbe691e75 servo: Merge #8740 - Implement IsPointInPath for Canvas (from dzbarsky:ispointinpath); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 98972d04342602610a7465de7b0639e2b9c1dcf3
2015-12-06 06:50:23 +05:01
Simon Martin 09ba3087f9 servo: Merge #8712 - Issue #8462: Add support for BufferSubData, CompressedTexImage2D and CompressedSubTexImage2D and reenable individual webgl WPT tests (from simartin:issue_8462); r=ecoal95
Fixes https://github.com/servo/servo/issues/8462

Source-Repo: https://github.com/servo/servo
Source-Revision: 5ee6fe120d43506e263cb4482b3a468d967a8386
2015-12-04 00:38:14 +05:01
Patrick Walton 82da2292ff servo: Merge #7802 - Handle zero-sized source surfaces properly, and upgrade `ipc-channel` to incorporate the fix for zero-sized shmem on Mac (from pcwalton:zero-size-source-surfaces); r=mbrubeck
Depends on servo/rust-azure#201 and pcwalton/ipc-channel#10.

Closes #7422.

r? @mbrubeck (don't r+ until the upstream dependencies have landed)

cc @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: e2048d57c4c0602c5a6b82db8cb76e6c3e5467fa
2015-10-01 00:08:34 -06:00
Ravi Shankar 7d512d50d1 servo: Merge #7698 - sorted the declarations in various files (from Wafflespeanut:sorting); r=frewsxcv
This is a direct extract from my abandoned PR for a lint (#7546), along with some rather clumsy modifications (only on `components/script/dom/mod.rs` and `components/style/lib.rs`), because I had to sort some of the files again to make peace with tidy, which hasn't been educated about sorting yet!

Source-Repo: https://github.com/servo/servo
Source-Revision: a7208869f2903e36f9b2f540b55b50283d7df466
2015-09-23 15:02:56 -06:00
Thiago Pontes cfdc5c2426 servo: Merge #7522 - Make use of FromStr and Default traits in lib canvas (from thiagopnts:from-str-canvas); r=Manishearth
fixes #7517

Source-Repo: https://github.com/servo/servo
Source-Revision: d3efcb707c6dc26b171ffada2e1ca48d5abbb4b6
2015-09-03 12:36:23 -06:00
ecoal95 96038bef64 servo: Merge #7442 - Add WebGL shader validation and translation (from emilio:shader-validation); r=jdm
r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 79328c11e320ad10a19d64d280df2e292eaf2e03
2015-08-30 09:29:42 -06:00
ecoal95 d21c34c8ad servo: Merge #6770 - Add multiple WebGL calls and improve error detection (from emilio:webgl-again); r=jdm
Since it probably won't merge until multiprocess lands, I plan to use this PR to keep improving WebGL support until it can land.

Main TODOs are integration of tests, since it seems https://github.com/KhronosGroup/WebGL/issues/1105 is going nowhere, adding missing calls and proper painting via native surfaces instead of readback.

I can't resolve conflicts right now because of time but I will do it soon.

Source-Repo: https://github.com/servo/servo
Source-Revision: a109a333f1f95d4fc677b29e3613b2615514c080
2015-08-25 09:23:00 -06:00
Johann Tuffe 5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
Josh Matthews 6a81d499fc servo: Merge #7203 - Add automated style nit checks to test-tidy (from jdm:style); r=Ms2ger
Expands on the work by @wilmoz and cleans up the existing errors. Closes #7180. Closes #7111.

Source-Repo: https://github.com/servo/servo
Source-Revision: e74825f9fde8e222f4ba9bb24b2c2a3864c73e5f
2015-08-16 08:37:40 -06:00
Bogdan Cuza b3e4dcef5f servo: Merge #7097 - Measure heap memory usage for more types. Fixes #6951 (from boghison:memtypes); r=jdm
Also adds HeapSizeOf implementations/derive for some types. I've used "Cannot calculate Heap size" as a reason everywhere, because my imagination is rather limited. If you'd like me to change this message for specific types, please write something like this: "Trusted - Cannot calculate Heap size for Trusted" so that it would be easier for me to replace them through a script :)

Source-Repo: https://github.com/servo/servo
Source-Revision: a03616f379c255cc6c9b6e1d04dd7d98bd9926ce
2015-08-13 13:16:14 -06:00
David Zbarsky 4db3b420d2 servo: Merge #7092 - Clean up and fix PutImageData (from dzbarsky:putimagedata); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 6a8bc8528498c0cbb2e50567d765a989cde2d115
2015-08-09 07:00:56 -06:00
David Zbarsky 68cd6176d8 servo: Merge #6975 - Fix getImageData with sizes < 1 pixel (from dzbarsky:get-tiny); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: dbce4c5bd8ec005ba78ac8c2f8754bd137c87f25
2015-08-09 06:32:30 -06:00
Patrick Walton d4fd20dc7c servo: Merge #6616 - script: Make most of 2D canvas and WebGL run over IPC (from pcwalton:canvas-webgl-ipc); r=jdm
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 1764267379a00b96a1df89f3917299a0c6fd325c
2015-07-25 01:50:31 -06:00
Patrick Walton 77a86e3023 servo: Merge #6705 - canvas: Move to shared memory for images and canvas backing stores (from pcwalton:image-cache-shmem); r=jdm
The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and `serde` serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: ed1b6a3513e7546b580693f554a081bc0c7c478a
2015-07-24 17:14:59 -06:00
Patrick Walton 0141dfbe06 servo: Merge #6487 - gfx: Use a pattern instead of tiling images manually (from pcwalton:background-tiling); r=glennw
r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: ae01e97efa31a180374dc0fd623ff03a650f7878
2015-07-07 05:42:07 -06:00
ecoal95 4f37e0ba01 servo: Merge #6380 - Refactor WebGL implementation to move logic inside the DOM interfaces (from emilio:webgl-refactoring); r=jdm
This improves the encapsulation and consistency in our WebGL
implementation.

Also allows to implement new methods such as `getShaderSource()`.

It will also allow us to use `delete()` in the destructors of them (note
that we will probably want to keep track of them from the context before).

Some concerns:

**Trait method repetition**:
I'm aware that the traits `WebGL{Buffer,Renderbuffer,Framebuffer,Texture}Helpers` are basically the same, but `delete()` and `id()` methods are everywhere. I've thought something like:

```rust
pub trait WebGLIdentifiable {
    type WebGLId; // id is sometimes i32 (see WebGLUniformLocation)
    fn id(&self) -> Self::WebGLId;
}

pub trait WebGLBindable {
    fn bind(&self);
}

pub trait WebGLDeletable {
    fn delete(&self);
}
```

But I'd want to know your opinion first.

**`renderer` repetition**:
Thought of moving the field: `renderer: Sender<CanvasMsg>` to `WebGLObject`, but I think it makes it way more complicated to read, and also a bit unnecessary, at least IMO (`WebGLObject` will never interact with the field directly). It would also mean that all `WebGLObject`s should have one, which is true at this moment, but maybe not with WebGL 2, for example.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0f8095b950dd144497919cfea65a1f154ed3ae9a
2015-07-06 09:12:59 -06:00
Ms2ger 18fd8097a2 servo: Merge #6459 - Update to rustc 2d0cbf3e3e25e092bd9e4c94d08e446b680869f0 (from servo:rustup_20150625); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 21b48fc44d0b32627918b4778fed16203eecdba5
2015-06-25 12:03:15 -06:00
ecoal95 b32a9cd993 servo: Merge #6423 - Use euclid from crates.io (from emilio:euclid); r=glennw
Sorry for not doing it yesterday, I couldn't.

cc @metajack @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 4ebb95ccd8e034007eacb447a054919ef4af2bf7
2015-06-18 20:50:22 -06:00
ecoal95 126dc71f5c servo: Merge #6357 - Add missing WebGL interfaces, and a few gl calls (from emilio:more-webgl); r=pcwalton
See the commit descriptions for more details.

Blocked on https://github.com/servo/gleam/pull/24

Source-Repo: https://github.com/servo/servo
Source-Revision: ceaca2e2885be89d47553090a45cf9048812e3b4
2015-06-13 15:05:08 -06:00
Corey Farwell 711c6ca962 servo: Merge #6349 - rust-geom API changes (from frewsxcv:geom-api-changes); r=pcwalton
Shouldn't be merged until these have merged:

https://github.com/servo/rust-geom/pull/81

https://github.com/ecoal95/rust-offscreen-rendering-context/pull/13

https://github.com/servo/rust-layers/pull/178

~~I'll also need to update the Cargo lock files once they merge~~

Source-Repo: https://github.com/servo/servo
Source-Revision: cfcd8589d06935f83b903f76477ea03e4d4652d0
2015-06-13 13:52:07 -06:00
Hyowon Kim 97b64f7e8d servo: Merge #6157 - Implement pattern fill style for canvas (from hyowon:canvas_pattern_fill); r=nox
Issue #6056
Depends on servo/rust-azure#160

Source-Repo: https://github.com/servo/servo
Source-Revision: 9474e62d38f61f2b3a385ca32d64cab975b014ce
2015-06-13 01:49:50 -06:00
Mátyás Mustoha a48503b881 servo: Merge #6354 - Remove gfx_traits from the dependencies of [script] (from mmatyas:canvas_remdep); r=Ms2ger
It seems @hyowon uploaded her canvas shadow patch faster than me; I've handled the color dependency a bit different, this way `gfx_traits` is not required by the script module.

Source-Repo: https://github.com/servo/servo
Source-Revision: c8c7bd900dde73d4fddafea8239f44440f1c863b
2015-06-12 10:22:54 -06:00
Hyowon Kim a540721b23 servo: Merge #6337 - Add attributes for canvas shadows (from hyowon:shadow_attrs); r=nox
The first step of the implementation for shadows in canvas.
r? @nox @jdm
cc @yichoi

Source-Repo: https://github.com/servo/servo
Source-Revision: f163f2bf0d32861ea20470d405bb517ed5b09e84
2015-06-12 03:27:07 -06:00
ecoal95 ed9a142a22 servo: Merge #6293 - Implement new WebGL interfaces and methods (from emilio:webgl-objects); r=nox
This commit implements:
* WebGLFramebuffer
* WebGLRenderbuffer
* WebGLTexture

And adds the following methods to `WebGLRenderingContext`:
* create{Texture,Framebuffer,Renderbuffer}
* bind{Texture,Framebuffer,Renderbuffer}
* destroy{Buffer,Texture,Framebuffer,Renderbuffer}

Fixes:
* WebGLUniform location shouldn't inherit from WebGLObject.

Known Issues:
* WebGL objects have to be destroyed on drop, we may want to keep a reference to the context, or maybe a clone of the renderer to achieve this

Also refactors a huge part of the current implementation, to allow
failing on creation of different WebGL objects.

Blocked on https://github.com/servo/gleam/pull/22

A reftest for most of the added functionality is not doable right now,
we need a few more functions in order to upload a texture, for example.

Source-Repo: https://github.com/servo/servo
Source-Revision: e09c555a41b0803388e54013ac8885fb789a0fa6
2015-06-09 10:06:37 -05:00
ecoal95 6679e6dff7 servo: Merge #6240 - WebGLRenderingContext getters and `getParameter` (from emilio:webgl-context-enhancements); r=nox
This implements the `canvas`, `drawingBufferHeight` and `drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial version of `getParameter`.

r? @jdm or @nox?

Source-Repo: https://github.com/servo/servo
Source-Revision: 042737793b1995ad93dc093ea12ec986b99e64b8
2015-06-01 10:20:14 -05:00
ecoal95 73d5e20fe6 servo: Merge #6183 - Add WebGLContextAttributes support (from emilio:webglcontextattributes); r=nox
r? @jdm

I couldn't add the `getContextAttributes` method since `CodegenRust`
doesn't know how to return a dictionary value, I'll take a look at it ASAP.

I think the helper functions can return directly the renderer, since they're used just for that, but I wanted to hear your opinions about this.

By the way I'm interested in adding more serious tests for WebGL, and I think the [khronos conformance suit](https://github.com/KhronosGroup/WebGL/tree/master/conformance-suites/1.0.3) should be the best option.

Should I try to integrate it in wpt, or making a `tests/webgl` directory (or similar) inside the servo tree? (Maybe this question should be for @Ms2ger)

Source-Repo: https://github.com/servo/servo
Source-Revision: 0de09b936e5e37c15b7865157a98ad78b1077659
2015-06-01 08:37:48 -05:00
ecoal95 9dbd03da1c servo: Merge #6083 - First steps to layerize canvas (from emilio:layerize-canvas); r=pcwalton
I've done a bit of job to get this done. Right now readback is still used, but we have a `LayerId` -> `CanvasRenderer` map on the paint task, that we can use to get rid of that.

I'd want review, to see if this is a good approach (I know it's not the initial `CanvasId` -> renderer approach, but it's pretty similar, since a canvas involves a `PaintLayer`).

I had to do a bit of refactoring to avoid cyclic dependencies between canvas and gfx. I'd want you to review them too.

It's mergeable and doesn't break any tests :P

Some of my main concerns:
* Does the canvas render really need to be behind an `Arc<Mutex<T>>`?
* I can't clone a `NativeSurface` right now (that's why the `SendNativeSurface()` msg is unimplemented in the WebGL task). It should be easy to add that to rust-layers, supposing the caller is responsible to mark it as non-leaking, any reason to not do it?

cc @jdm @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: ad53e95080144485e74cd9b9d48ce75e20de4e36

--HG--
rename : servo/components/gfx/color.rs => servo/components/gfx_traits/color.rs
2015-05-20 15:42:06 -05:00