Source code

Revision control

Other Tools

1
# WebRender
2
4
5
WebRender is a GPU-based 2D rendering engine written in [Rust](https://www.rust-lang.org/). [Firefox](https://www.mozilla.org/firefox), the research web browser [Servo](https://github.com/servo/servo), and other GUI frameworks draw with it. It currently uses the OpenGL API internally.
6
7
Note that the canonical home for this code is in gfx/wr folder of the
8
mozilla-central repository at https://hg.mozilla.org/mozilla-central. The
9
Github repository at https://github.com/servo/webrender should be considered
10
a downstream mirror, although it contains additional metadata (such as Github
11
wiki pages) that do not exist in mozilla-central. Pull requests against the
12
Github repository are still being accepted, although once reviewed, they will
13
be landed on mozilla-central first and then mirrored back. If you are familiar
14
with the mozilla-central contribution workflow, filing bugs in
16
and submitting patches there would be preferred.
17
18
## Update as a Dependency
19
After updating shaders in WebRender, go to servo and:
20
21
* Go to the servo directory and do ./mach update-cargo -p webrender
22
* Create a pull request to servo
23
24
25
## Use WebRender with Servo
26
To use a local copy of WebRender with servo, go to your servo build directory and:
27
28
* Edit Cargo.toml
29
* Add at the end of the file:
30
31
```
33
"webrender" = { path = "<path>/webrender" }
34
"webrender_api" = { path = "<path>/webrender_api" }
35
```
36
37
where `<path>` is the path to your local copy of WebRender.
38
39
* Build as normal
40
41
## Documentation
42
43
The Wiki has a [few pages](https://github.com/servo/webrender/wiki/) describing the internals and conventions of WebRender.
44
45
## Testing
46
47
Tests run using OSMesa to get consistent rendering across platforms.
48
49
Still there may be differences depending on font libraries on your system, for
50
example.
51
53
how to make the text tests useful in Fedora, for example.