aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/headless.rs
Commit message (Collapse)AuthorAgeFilesLines
* No more headless compositor. Just the normal one.Michael Howell2016-03-241-147/+0
| | | | | | | | | This changes headless operation to strictly be a runtime option, rather than a compile-time one. Note that the old headless version still relied on a display server to support WebGL, while it now requires one all the time. Fixes #8573
* Fix animation smoothness when using requestAnimationFrame.Glenn Watson2016-03-041-1/+2
| | | | | | | | | | | | | | | | | Previously, the flow for ticking animations was: Compositor -> Constellation -> Layout -> Script However, this means that the compositor <-> layout messages can thrash, meaning layout thread is very rarely idle. This means that the script thread (which joins on the layout thread during reflow) was unable to execute and run rAF callbacks. With this change, the flow is now: Compositor -> Constellation -> Script (when rAF is active). Compositor -> Constellation -> Layout (when transitions / animations are active and no rAF is present). This makes rAF based animation *much* smoother.
* compositing: Stop compositing unnecessarily after each animation frame.Patrick Walton2016-02-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, schedule a delayed composite after each frame of an animation. The previous code would cause jank, because the following sequence frequently occurred: 1. The page uses `requestAnimationFrame()` to request a frame. 2. The compositor receives the message, schedules a composite, dispatches the rAF message to the script thread, composites, and goes to sleep waiting for vblank (frame 1). 3. The script makes a change and sends it through the pipeline. Eventually it gets painted and is sent to the compositor, but the compositor is sleeping. 4. The compositor wakes up, sees the new painted content, page flips, and goes to sleep (frame 2). Repeat from step 1. The problem is that we have two composition frames, not just one. This halves Web apps' framerate! This commit fixes the problem by scheduling the composite in step 2 to 12 ms in the future. We already have this delayed-composition functionality in the form of the scrolling timer, which I repurposed and renamed to the "delayed composition timer" for this task. This change gives the page 12 ms to prepare the frame, which seems to usually be enough, especially with WebRender. Note that simply removing the scheduled composite after rAF is not the correct solution. If this is done, then pages that call rAF and don't modify the page won't receive future rAFs, since the compositor will be sleeping and won't be notified of vblank. Fixes a bunch of jank in browser.html. The remaining jank seems to be a problem with browser.html itself.
* Move AnimationState to script_traitsJoshua Holmer2016-01-131-1/+1
| | | | Resolves #9223
* task -> threadrohan.prinja2016-01-101-4/+4
|
* Moved CompositorMsg enum into compositing crate.Beomjin Kim2015-12-111-1/+1
| | | | | | | moved from components/msg/constellation_msg.rs to components/compositing/lib.rs dependencies on compositing crate added in ports/cef/Cargo.lock
* compositing: Split Servo up into multiple sandboxed processes.Patrick Walton2015-11-191-7/+6
| | | | | Multiprocess mode is enabled with the `-M` switch, and sandboxing is enabled with the `-S` switch.
* Split ConstellationMsg into ScriptMsg and CompositorMsgKeith Yeung2015-11-161-2/+2
|
* Dispatch touch events and perform default touch actions.Matt Brubeck2015-10-221-0/+1
| | | | | This is currently limited to simple single-touch actions. It does not include momentum scrolling or pinch zooming.
* Simplify and unify compositor shutdown code pathsMartin Robinson2015-10-071-9/+8
| | | | | | | Unify all compositor shutdown code paths into two methods, one which starts the shutdown and the other that finishes it. This simplifies the way the compositor shuts down and prevents "leaking" pixmaps when exiting in uncommon ways.
* Remove constellation round trip for subpage mapping in compositor.Glenn Watson2015-10-071-1/+0
| | | | | | This makes use of the new functionality that allows iframes to generate their own pipeline IDs in order to remove any knowledge of subpage ids from the compositor. (This is the first of several commits removing subpage from parts of servo).
* Use same default window size in headless compositorMatt Brubeck2015-09-301-3/+5
| | | | Attempts to fix #7730.
* layout: Make the compositor rather than layout determine the position ofPatrick Walton2015-09-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | each iframe. The old code that attempted to do this during layout wasn't able to work for multiple reasons: it couldn't know where the iframe was going to be on the page (because of nested iframes), and at the time it was building the display list for a fragment it couldn't know where that fragment was going to be in page coordinates. This patch rewrites that code so that both the sizes and positions of iframes are determined by the compositor. Layout layerizes all iframes and marks the iframe layers with the appropriate pipeline and subpage IDs so that the compositor can place them correctly. This approach is similar in spirit to Gecko's `RefLayer` infrastructure. The logic that determines when it is time to take the screenshot for reftests has been significantly revamped to deal with this change in delegation of responsibility. Additionally, this code removes the infrastructure that sends layout data back to the layout task to be destroyed, since it is now all thread-safe and can be destroyed on the script task. The failing tests now fail because of a pre-existing bug related to intrinsic heights and borders on inline replaced elements. They happened to pass before because we never rendered the iframes at all, which meant they never had a chance to draw the red border the tests expect to not render! Closes #7377.
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-1/+1
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-2/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* Introduce InitialCompositorStateAnthony Ramine2015-09-151-19/+9
|
* Remove 'get_*' on getters as per RFC 0344 on various componentsMathieu Rheaume2015-09-121-1/+1
|
* Implement viewport functions for window #1718farodin912015-09-021-1/+8
|
* Fix requestAnimationFrame in headless mode. Fixes #7296.Glenn Watson2015-08-281-1/+13
|
* Implement Msg::Status with serialized url upon mouseoverBruno de Oliveira Abinader2015-07-301-0/+1
| | | | | | | Credits for Mike Blumenkrantz (@zmike), I just rebased against trunk and fixed the url serialization. Fixes #6178.
* Have BufferMap store NativeSurfaces and rename to SurfaceMapMartin Robinson2015-07-241-1/+1
| | | | | | | | | | 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.
* Add memory profiling for the compositor taskMartin Robinson2015-07-161-0/+1
| | | | | Currently only the BufferMap is recorded, but a later change will also measure the memory usage of the compositor tree.
* Move LayerBuffer cache to the compositorMartin Robinson2015-07-081-0/+1
| | | | | | | | 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.
* Update to latest rust-layersMartin Robinson2015-06-301-1/+1
| | | | | The compositing context, painting context and display metadata have all been collapsed into a single NativeDisplay class.
* Use euclid from crates.ioecoal952015-06-191-2/+2
|
* rust-geom API changesCorey Farwell2015-06-131-3/+3
| | | | https://github.com/servo/rust-geom/pull/81
* add window method for notifying when the <head> tag has been parsedMike Blumenkrantz2015-06-021-0/+1
|
* add handling for favicon link elementsMike Blumenkrantz2015-06-021-0/+1
| | | | fixes #6166
* add navigation state data to LoadComplete messages, finish cef load state cbsMike Blumenkrantz2015-05-271-1/+1
|
* add CompositorMsg::LoadStart, implement ↵Mike Blumenkrantz2015-05-271-0/+1
| | | | | | cef_load_handler::on_loading_state_change() only adds the loading:true callback this time...
* compositing: Support multiple events per frame.Patrick Walton2015-05-201-1/+1
| | | | Improves scrolling performance on Mac.
* Fixes a number of race conditions and reliability issues with reftests and ↵Glenn Watson2015-05-141-6/+3
| | | | | | | | | | | | 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.
* Support WebDriver takeScreenshot command.James Graham2015-05-071-1/+2
| | | | | This adds support for compositing to a PNG without actually quiting the browser.
* Constrain the viewport & zoom when reflowingJames Gilbertson2015-05-061-2/+3
|
* Add a `profile_traits` crate to reduce compile times.Nicholas Nethercote2015-04-301-2/+2
| | | | | | | | | | 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`.
* compositing: Keep the event loop awake when scrolling.Patrick Walton2015-04-101-0/+1
|
* layout: Implement CSS transitions per CSS-TRANSITIONS § 2.Patrick Walton2015-03-311-0/+1
| | | | | | | | 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.
* Rename lots of profiling-related things.Nicholas Nethercote2015-03-251-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ 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.
* Move profiler code from `util` into a new crate `profile`.Nicholas Nethercote2015-03-241-5/+5
| | | | | | | | | - 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.
* Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.Ms2ger2015-03-181-1/+1
|
* First part of refactoring constellation to support iframe navigation.Glenn Watson2015-03-171-8/+0
| | | | | | | | | 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.
* Only store the url inside a pipeline instead of the rest of the LoadData.Josh Matthews2015-03-031-1/+1
|
* Fix making an iframe visible when it was initially set to display:none.Glenn Watson2015-03-031-1/+1
| | | | | | | 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.
* Import msg as msg rather than servo_msg.Ms2ger2015-02-101-2/+2
|
* Import the util crate as util rather than servo_util.Ms2ger2015-01-291-4/+4
| | | | | | | | 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.
* Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.Josh Matthews2015-01-281-7/+7
|
* Notify compositor when a FrameTree changes pipelinesMartin Robinson2015-01-091-1/+5
| | | | | | | | 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.
* Fix root layer naming in the compositorMartin Robinson2015-01-061-1/+1
| | | | | | | 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.
* Rename Compositor messages SetIds and PaintMartin Robinson2015-01-061-3/+3
| | | | | These names no longer reflect what the messages do, so rename them to SetFrameTree and AssignPaintedBuffers.
* Rename constellation_msg::Msg variants.Ms2ger2015-01-041-3/+4
|