Commit graph

42 commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
b3927d5a2d Implement Msg::Status with serialized url upon mouseover
Credits for Mike Blumenkrantz (@zmike), I just rebased against trunk and
fixed the url serialization.

Fixes #6178.
2015-07-30 16:37:54 +03:00
Martin Robinson
1aedead955 Have BufferMap store NativeSurfaces and rename to SurfaceMap
We currently store LayerBuffers, because previously NativeSurfaces did
not record their own size. Now we can store NativeSurfaces directly,
which saves a bit of space in the surface cache and allows us to create
LayerBuffers only in the PaintTask.

This also means that instead of sending cached LayerBuffers, the
compositor can just send cached NativeSurfaces to the PaintTask.
2015-07-24 11:12:39 -07:00
Martin Robinson
900337e3d1 Add memory profiling for the compositor task
Currently only the BufferMap is recorded, but a later change will also
measure the memory usage of the compositor tree.
2015-07-16 16:08:34 -07:00
Martin Robinson
e115c3d3c4 Move LayerBuffer cache to the compositor
Now that NativeDisplay can be shared between the compositor and the
paint task, we can move the LayerBuffer cache to the compositor. This
allows surfaces to be potentially reused between different paint tasks
and will eventually allow OpenGL contexts to be preserved between
instances of GL rasterization.
2015-07-08 08:05:11 -07:00
Martin Robinson
0f27bd6c4b Update to latest rust-layers
The compositing context, painting context and display metadata have all
been collapsed into a single NativeDisplay class.
2015-06-30 21:58:54 -07:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00
Corey Farwell
5c408d2be9 rust-geom API changes
https://github.com/servo/rust-geom/pull/81
2015-06-13 12:28:21 -07:00
Mike Blumenkrantz
ffa2093012 add window method for notifying when the <head> tag has been parsed 2015-06-02 22:16:28 -04:00
Mike Blumenkrantz
12f20f1ecc add handling for favicon link elements
fixes #6166
2015-06-02 22:16:25 -04:00
Mike Blumenkrantz
0d46a3b89a add navigation state data to LoadComplete messages, finish cef load state cbs 2015-05-27 14:45:48 -04:00
Mike Blumenkrantz
3481c752cd add CompositorMsg::LoadStart, implement cef_load_handler::on_loading_state_change()
only adds the loading:true callback this time...
2015-05-27 14:45:47 -04:00
Patrick Walton
0098d9e9e8 compositing: Support multiple events per frame.
Improves scrolling performance on Mac.
2015-05-20 10:53:48 -07:00
Glenn Watson
eec3fad93d Fixes a number of race conditions and reliability issues with reftests and compositor.
The basic idea is it's safe to output an image for reftest by testing:
 - That the compositor doesn't have any animations active.
 - That the compositor is not waiting on any outstanding paint messages to arrive.
 - That the script tasks are "idle" and therefore won't cause reflow.
    - This currently means page loaded, onload fired, reftest-wait not active, first reflow triggered.
    - It could easily be expanded to handle pending timers etc.
 - That the "epoch" that the layout tasks have last laid out after script went idle, is reflected by the compositor in all visible layers for that pipeline.
2015-05-14 09:35:53 +10:00
James Graham
5311d9ab59 Support WebDriver takeScreenshot command.
This adds support for compositing to a PNG without actually quiting
the browser.
2015-05-07 09:56:15 +01:00
James Gilbertson
138596e861 Constrain the viewport & zoom when reflowing 2015-05-06 00:34:33 -06:00
Nicholas Nethercote
092507d23c Add a profile_traits crate to reduce compile times.
A rebuild after touching components/profile/mem.rs now takes 48 seconds (and
only rebuilds `profile` and `servo`) which is much lower than it used to be.
In comparison, a rebuild after touching components/profile_traits/mem.rs takes
294 seconds and rebuilds many more crates.

This change also removes some unnecessary crate dependencies in `net` and
`net_traits`.
2015-04-30 17:58:47 -07:00
Patrick Walton
b4b3cbccf7 compositing: Keep the event loop awake when scrolling. 2015-04-10 10:39:50 -07:00
Patrick Walton
66dd8c8a6c layout: Implement CSS transitions per CSS-TRANSITIONS § 2.
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.
2015-03-31 08:46:11 -07:00
Nicholas Nethercote
ce36e574f4 Rename lots of profiling-related things.
------------------------------------------------------------------------
BEFORE                              AFTER
------------------------------------------------------------------------
util::memory                        util::mem
- heap_size_of                      - heap_size_of (unchanged)
- SizeOf                            - HeapSizeOf
  - size_of_excluding_self            - heap_size_of_children

prof::mem                           prof::mem
- MemoryProfilerChan                - ProfilerChan
- MemoryReport                      - Report
- MemoryReportsChan                 - ReportsChan
- MemoryReporter                    - Reporter
- MemoryProfilerMsg                 - ProfilerMsg
  - {R,UnR}egisterMemoryReporter      - {R,UnR}egisterReporter
- MemoryProfiler                    - Prof
- ReportsForest                     - ReportsForest (unchanged)
- ReportsTree                       - ReportsTree   (unchanged)
- SystemMemoryReporter              - SystemReporter

prof::time                          prof::time
- TimeProfilerChan                  - ProfilerChan
- TimerMetadata                     - TimerMetadata (unchanged)
- Formatable                        - Formattable [spelling!]
- TimeProfilerMsg                   - ProfilerMsg
- TimeProfilerCategory              - ProfilerCategory
- TimeProfilerBuckets               - ProfilerBuckets
- TimeProfiler                      - Profiler
- TimerMetadataFrameType            - TimerMetadataFrameType (unchanged)
- TimerMetadataReflowType           - TimerMetadataReflowType (unchanged)
- ProfilerMetadata                  - ProfilerMetadata (unchanged)

In a few places both prof::time and prof::mem are used, and so
module-qualification is needed to avoid overlap, e.g. time::Profiler and
mem::Profiler. Likewise with std::mem and prof::mem. This is not a big
deal.
2015-03-25 16:00:23 -07:00
Nicholas Nethercote
52447ccd9b Move profiler code from util into a new crate profile.
- Most of util::memory has been moved into profile::mem, though the
  `SizeOf` trait and related things remain in util::memory. The
  `SystemMemoryReporter` code is now in a submodule
  profile::mem::system_reporter.

- util::time has been moved entirely into profile::time.
2015-03-24 02:09:31 -07:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Glenn Watson
939a89568e First part of refactoring constellation to support iframe navigation.
The history is now recorded per frame, but needs to be exposed in a followup PR.

Also fixes a race condition that occurs loading iframes under heavy CPU load.

This ensures that iframes never do a reflow / layout until they have a valid
window size set from their parent frame.
2015-03-17 09:35:41 +10:00
Josh Matthews
6351fc75fd Only store the url inside a pipeline instead of the rest of the LoadData. 2015-03-03 16:25:40 -05:00
Glenn Watson
f68386f0fa Fix making an iframe visible when it was initially set to display:none.
When an iframe is created with display:none it sets the root layer to be
zero width and height. When updating the rect of the iframe from layout
send the entire rect rather than just the new origin, which handles the case
where the iframe has been made visible and now has a non-zero rect.
2015-03-03 07:46:26 +10:00
Ms2ger
b2fcc2397e Import msg as msg rather than servo_msg. 2015-02-10 11:40:36 +01:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Martin Robinson
19f57008da Notify compositor when a FrameTree changes pipelines
When the constellation change a FrameTree pipeline, it should send a
notification to the compositor, so that it can negotiate buffers from
the correct render task. This commit also migrates away from the
generalized FrameTreeUpdateMsg to ones specific to the situation at
hand. That turned out to be an unnecessary abstraction.
2015-01-09 16:20:04 -08: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
de0caf8761 Rename constellation_msg::Msg variants. 2015-01-04 11:59:21 +01: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
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
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
Patrick Walton
8b2aadc30b ports/cef: Implement accelerated compositing for the CEF port. 2014-12-10 08:35:47 -08:00
Tetsuharu OHZEKI
94071f6330 Rename compositor_task::Msg. 2014-12-08 14:05:50 +09:00
Manish Goregaokar
cdddf6465c Remove unused arguments from LoadComplete and LoadCompleteMsg 2014-11-14 02:14:00 +05:30
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
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
Bryan Bell
ff71c32218 Remove SetLayerClipRect and add SetLayerOrigin
The constallation has accurate information about iframe layer origins,
but not their size.
2014-09-12 11:29:14 -07:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/compositing/headless.rs (Browse further)