Martin Robinson
c5994c65ef
Be less stringent with invalid compositor messages
...
It is possible for messages for defunct pipelines to arrive in the
compositor. If the compositor believes that the pipelines are in the
process of shutting down, simply ignore the messages. We still panic in
the case that the pipeline is totally unknown.
Fixes #3733 .
2015-01-09 14:33:58 -08:00
Martin Robinson
d93b80608f
Combine all pipeline status trackers into a single struct
...
This will make it easier to organize and clean up this information
during pipeline shutdown.
2015-01-08 12:11:21 -08:00
bors-servo
1458709247
auto merge of #4558 : mrobinson/servo/compositor-message-renames, r=zwarich
...
These names no longer reflect what the messages do, so rename them to
SetFrameTree, AssignPaintedBuffers, and CreateOrUpdateBaseLayer.
2015-01-08 12:36:53 -07:00
Ms2ger
16c7060bc8
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
2015-01-08 09:58:46 -05:00
Martin Robinson
9ac759ed80
Fix root layer naming in the compositor
...
The term "root layer" is used in the compositor to refer to both the
pipeline root layer and the page background layer. This can be quite
confusing. Instead, call the page background layer the "base layer,"
which is always the first child of the pipeline root layer.
2015-01-06 15:40:42 -08:00
Martin Robinson
ad751e4926
Rename Compositor messages SetIds and Paint
...
These names no longer reflect what the messages do, so rename them to
SetFrameTree and AssignPaintedBuffers.
2015-01-06 07:23:26 -08:00
Ms2ger
be683a0888
Rename MouseWindowEvent variants.
2015-01-05 12:08:16 +01:00
Ms2ger
6e027cda2d
Rename the ConstellationControlMsg variants.
2015-01-04 19:01:13 +01:00
Ms2ger
138081ba25
Rename the PaintState variants.
2015-01-04 11:59:49 +01:00
Ms2ger
4d47817bae
Rename TimeProfilerCategory variants.
2015-01-04 11:59:23 +01:00
Ms2ger
de0caf8761
Rename constellation_msg::Msg variants.
2015-01-04 11:59:21 +01:00
Ms2ger
d5cc791d31
Rename paint_task::Msg variants.
2015-01-04 11:06:07 +01:00
bors-servo
e8fac3681b
auto merge of #4535 : servo/servo/pre-rustup_20141221, r=jdm
...
This prepares for the rust upgrade currently being conducted.
2015-01-03 14:39:46 -07:00
Martin Robinson
c0b397322f
Stall PaintTask exit until it can release all buffers
...
It is possible for a PaintTask to start exiting soon after sending new
buffers to the compositor. In that case, the compositor should return
the now unnecessary buffers to the PaintTask so that it can properly
free them.
To accomplish this, the compositor now keeps a hash map of paint task
channels per pipeline id. When a PaintTask exists, the constellation
informs the compositor that it can forget about it. Additionally, the
PaintTask should not wait for any buffers when the engine is doing a
complete shutdown. In that case, the compositor is already halted and
has simply let all buffers leak. We pipe through the shutdown type when
destroying the pipeline to make this decision.
Fixes #2641 .
2015-01-02 15:20:32 -08:00
Ms2ger
b51e83819d
Fix obsolete format traits.
...
They are to be removed from the language in the next rust upgrade.
2015-01-02 19:04:18 +01:00
Matt Brubeck
8dd1a363cb
Update layer bounds on resize
...
This fixes a bug where fixed-position layers are not repositioned when the
window is resized.
2014-12-18 07:02:14 -08:00
Simon Sapin
084a63df45
Remove usage of the deprecated std::num::Zero trait.
2014-12-18 11:16:47 +00:00
Patrick Walton
7371e0b8e3
compositing: Implement cursor
per CSS3-UI § 8.1.1 in the CEF/Mac port.
...
I'm not sure how we want to handle Linux cursors, and GLFW has no
ability to set cursors (short of disabling it and managing it yourself).
2014-12-17 22:58:52 -08:00
Ms2ger
466faac2a5
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
2014-12-17 15:19:45 -05:00
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