Patrick Walton
fa1e06e7ce
compositing: Translate clip rects into the coordinate systems of child
...
layers when doing hit tests.
Fixes clicking on links on the second page of Hacker News.
2014-12-12 16:58:25 -08:00
Nathan E. Egge
b0552cb98e
Sending key events through script task before processing them in the compositor.
...
Fixes #4163
2014-12-12 12:31:44 -05:00
Martin Robinson
14bfa45105
Hit test against clipped layer boundaries
...
When finding the layer under a point, take into account clipping
rectangles defined by layers that mask to bounds. This prevents clicks
from being hijacked by masked layers.
2014-12-11 13:18:21 +01:00
Martin Robinson
66f6c3a213
All root layers should mask their content
...
Root layers that define the extent of iframes should always mask their
child content. This fixes a bug where root layers without an assigned
size and location do not spill over the entire scene.
2014-12-11 12:29:31 +01:00
Patrick Walton
8b2aadc30b
ports/cef: Implement accelerated compositing for the CEF port.
2014-12-10 08:35:47 -08:00
Tetsuharu OHZEKI
8cee554898
Replace almost "render" to "paint" in compositing crate.
...
This doesn't touch some "render" words which are used as general means.
2014-12-08 14:55:30 +09:00
Tetsuharu OHZEKI
15a32247a6
Rename WindowMethods::set_paint_state()
2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
189f40f6f8
Rename IOCompositor's members.
2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
806b6f09c9
Rename RenderState -> PaintState
2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
94071f6330
Rename compositor_task::Msg.
2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
79722bdc03
Rename gfx::paint_task::Msg
2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
7ff790d941
Rename RenderChan -> PaintChan
2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
9b6faaf7f0
Rename RenderRequest -> PaintRequest
2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
daba904302
Rename gfx/render_task.rs -> gfx/paint_task.rs
2014-12-08 11:46:43 +09:00
Glenn Watson
898c1ecc8f
Remove unused exit after load option.
...
This simplifies some upcoming changes to how event handling works.
2014-11-21 09:15:02 +10:00
bors-servo
9da7f10c3c
auto merge of #3964 : mrobinson/servo/code-duplication, r=larsbergstrom
...
It is possible to share the code which creates root layers.
2014-11-19 09:00:47 -07:00
Josh Matthews
329ba56fca
Dispatch keydown, keyup, and keypress events at appropriate times.
2014-11-13 11:27:15 -05:00
Josh Matthews
1c64dabb15
Pass all key events to the current constellation frame.
2014-11-13 11:24:14 -05:00
Jack Moffitt
d1b433a3b3
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
2014-11-13 11:17:43 +10:00
bors-servo
26045d7fcb
auto merge of #3809 : mrobinson/servo/display-list-optimization, r=pcwalton
...
Instead of creating a display list for the entire page, only create one
for an area that expands around the viewport. On my machine this makes
incremental layout of http://timecube.com 50% faster.
2014-11-12 17:36:32 -07:00
Martin Robinson
4f1bda0c36
Remove some code duplication in the Compositor
...
It is possible to share the code which creates root layers.
2014-11-12 12:01:36 -08:00
Martin Robinson
fbb1e0c6b8
Send incremental frame tree updates to the compositor
...
This allows the compositor to add frames after the call to SetIds,
where the initial frame tree is created. There are still some issues
preventing proper late frame creation, but this prevents crashes when
it happens.
Fixes #3738 .
2014-11-11 17:36:19 -08:00
Martin Robinson
c7327450ef
Clip display list based on frame viewport
...
Instead of creating a display list for the entire page, only create one
for an area that expands around the viewport. On my machine this makes
incremental layout of http://timecube.com 50% faster.
2014-11-11 08:46:16 -08:00
Patrick Walton
10f7b49cf7
Invert control flow, fix resizing, and improve checkerboarding
...
significantly by giving tiles some time to paint before we render
unrendered content.
2014-11-04 13:51:56 -08:00
Glenn Watson
69c5bc8fca
Update to use new GL bindings.
2014-10-30 15:31:10 +10:00
Martin Robinson
80a6f3a732
Move compositor_data.rs to compositor_layer.rs.
...
The new name better reflects the majority of the code in the file.
2014-10-28 08:33:23 -07:00
Martin Robinson
c0fa32e7aa
Combine events and CompositorData methods into CompositorLayer
...
This is a more natural collection of methods, as they all operate
directly on layers and accept a layer as their first argument.
2014-10-28 08:33:23 -07:00
Martin Robinson
96f6c53b52
Make compositor event handling a Layer trait
...
This simplifies the way that event handling interacts with the
compositor.
2014-10-28 08:33:23 -07:00
Glenn Watson
2d6626e7ef
Use WindowMethods to get native graphics metadata instead of
...
relying on azure. This is a prerequisite for the switch to glutin.
Tested on Linux, mac. Tested that android + cef build.
2014-10-24 13:45:42 +10:00
Glenn Watson
076495db94
Use opts as a global, to avoid cloning and passing the struct all over the code.
2014-10-20 10:48:47 +10:00
Martin Robinson
fbd0b6f9d0
Allow individual layers to render their own background color
...
Instead of relying on a scene-wide background color, all layers can now
have their own background color.
2014-10-14 09:59:07 -07:00
Matt Brubeck
77d32ee447
Move windowing code out of the compositor
...
This is mainly just moving code around, in preparation for further changes to
the "windowing" API.
2014-10-10 11:36:12 -07:00
Manish Goregaokar
ad16c52a6b
Allow passing a method, request body, and headers to the pipeline in LoadUrlMsg
2014-10-09 14:09:29 +05:30
Cameron Zwarich
54f9bb0eea
Cleanup some code formatting in compositing/compositor.rs
2014-10-06 15:40:38 -07:00
Martin Robinson
31a6270d52
No longer consider window size when scrolling
...
Now that scrolling roots are properly sized, we can simply look at the
scrolling root layer size when deciding the extents of layer scrolling.
This simplifies things a bit and further codifies the current model of
scrolling root + mask_to_bounds.
2014-10-01 10:58:35 -07:00
Martin Robinson
62ef7cd7ff
Use LayerPixel for Layer bounds and most arguments
...
When interacting with Layers it is simpler to use LayerPixels, which
are unscaled pixels in the Layer coordinate system. This removes a lot
of room for error and makes things simpler.
2014-09-30 17:42:00 -07:00
Martin Robinson
a75594d7cf
Mask root layer rectangles to their boundaries
...
This prevents iframes contents from overflowing their root layers.
2014-09-29 16:42:26 -07:00
Matt Brubeck
5f0d2ae98c
Pass a viewport to the rendering code
...
Part of servo/rust-layers#114
2014-09-29 15:48:42 -07:00
bors-servo
6fb8eb32f2
Merge pull request #3474 from glennw/reftest-fbo
...
When rendering to PNG, draw to an FBO rather than default framebuffer.
Reviewed-by: mrobinson
2014-09-27 12:21:31 -06:00
bors-servo
177127e597
Merge pull request #3398 from glennw/config-res
...
Allow resolution to be configured on command line. Default to 1280x1024.
Reviewed-by: SimonSapin
2014-09-25 18:27:38 -06:00
Martin Robinson
f346a215f3
Don't let base layers override root layer size
...
Base layers (the background layer of each frame) shouldn't override the
size of their root layers. This allows base layers to scroll inside
root layer frames. This does mean that when determining the maximum
scroll position, we need to look at the size of scrolling root children
though.
2014-09-25 07:57:46 -07:00
Martin Robinson
e01c5cd863
Differentiate clearly how child layers handle scroll events
...
This allows the scroll handler to know if a child layer didn't handle
an event or the scroll position of the child layer was simply unchanged.
2014-09-25 07:57:46 -07:00
Martin Robinson
80433f7ea0
Properly size root layers
...
Root layers should be sized to their frame rectangles and the root of
the root layers should track the window size. This is important because
layers need to be properly sized to scroll.
2014-09-25 07:57:44 -07:00
Martin Robinson
6bbde703c1
Give root layers a scrollable policy
...
This allows iframe layers to move properly when their parents scroll
and is necessary to properly track their masking rects as their
children move and to draw their backgrounds in the proper position.
2014-09-25 07:57:14 -07:00
Glenn Watson
1edbe17db1
When rendering to PNG, draw to an FBO rather than default framebuffer.
...
This means that it doesn't matter if the window if partially placed
off screen when reftests run.
Fixes #3470 .
2014-09-25 10:24:23 +10:00
Glenn Watson
ff4713c434
Change opts to work in screen pixels that are scaled to device pixels.
2014-09-24 07:39:37 +10:00
Glenn Watson
c33f18b7df
Allow resolution to be configured on command line. Default to 1280x1024.
2014-09-24 06:59:05 +10:00
Keegan McAllister
dc86e83654
Eliminate warnings
2014-09-20 13:00:55 -07:00
Keegan McAllister
a640a7c5c3
Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000)
2014-09-20 13:00:06 -07:00
Clark Gaebel
6bc63d47cd
Added more complex profiling metadata.
2014-09-17 15:41:27 -07:00