aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/paint_task.rs
Commit message (Collapse)AuthorAgeFilesLines
* task -> threadrohan.prinja2016-01-101-817/+0
|
* Move LayerKind and ScrollPolicy enums to gfx_traitsBrandon Fairchild2015-12-201-2/+2
| | | | | | This also moves LayerId and LayerProperties to gfx_traits. Fixes #8836.
* Move PaintMsg enum to gfx_traits #8844Maciej Skrzypkowski2015-12-181-2/+1
|
* Add test to constellation to avoid writing reftest image if there are ↵Glenn Watson2015-12-171-32/+20
| | | | | | | | | | | | | | | | pending frames. Also change when pipelines become active. This makes the constellation activate a pipeline as the current frame when it is ready to do initial reflow, rather than when it is ready to paint. This fixes a number of intermittent failures that could previously occur if an iframe was not visible - which would mean it was never moved from a pending frame in the constellation to an active frame. (It happens that webrender exposes these intermittents as permanent failures).
* Move PaintListener to gfx_traits, Fixes #8834Tomas Cernaj2015-12-111-3/+2
| | | | Adding layers and msg dependency to gfx_traits.
* Replaced ZERO_POINT with Point2D::zero()Alexander Mankuta2015-12-031-2/+2
|
* Split paint task messages from ScriptMsgGreg Guthe2015-11-251-3/+3
| | | | Refs: https://github.com/servo/servo/issues/8592
* compositing: Split Servo up into multiple sandboxed processes.Patrick Walton2015-11-191-5/+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-4/+3
|
* Draw layers that are under sub-displaylists.Michael Howell2015-11-141-9/+32
| | | | Fixes #8325
* Auto merge of #8355 - Ms2ger:Exit, r=noxbors-servo2015-11-071-6/+13
|\ | | | | | | | | | | | | | | Cleanup exit messages and related code. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8355) <!-- Reviewable:end -->
| * Remove the unused PipelineExitType field from ChromeToPaintMsg::Exit.Ms2ger2015-11-051-3/+3
| |
| * Remove the unused PipelineExitType from LayoutToPaintMsg::Exit.Ms2ger2015-11-051-2/+2
| |
| * Remove the unused Option around the IpcSender from LayoutToPaintMsg::Exit.Ms2ger2015-11-051-2/+2
| |
| * Remove the unused IpcSender from ChromeToPaintMsg::Exit.Ms2ger2015-11-051-3/+10
| |
* | Change PaintContext rects to TypedRects #7023Maciej Skrzypkowski2015-11-041-2/+2
|/ | | | | Needs update to_nearest_pixel method in app_unit module. Argument of to_nearest_pixel should be: ScaleFactor<PagePx, ScreenPx, f32>
* Mix stacking contexts into the positioned content listMartin Robinson2015-11-031-8/+11
| | | | | | | | | | | | | | | | | Sometimes positioned content needs to be layered on top of stacking contexts. The layer synthesis code can do this, but the current design prevents it because stacking contexts are stored in a separate struct member. In order to preserve tree order, mix stacking contexts into the positioned content list, by adding a new StackingContextClass DisplayItem. Such items do not have a base DisplayItem. In some ways this simplifies the code, because we no longer have to have a separate code path in the StackingContextLayerCreator. Fixes #7779. Fixes #7983. Fixes #8122. Fixes #8310.
* Expand DisplayList layer bounds to whole pixelsMartin Robinson2015-10-281-2/+2
| | | | | | | | Before passing these layers to the paint task, expand them to pixel boundaries. This ensures that subpixel edges of the layer will not be clipped away and helps prevent rounding issues with layer contents. Fixes #8166.
* Integrate iframes into the display listMartin Robinson2015-10-201-9/+8
| | | | | | | | | | | | | | | | | | | | | | | Instead of always promoting iframes to StackingContexts, integrate them into the display list. This prevents stacking bugs when non-stacking-context elements should be drawn on top of iframes. To accomplish this, we add another step to ordering layer creation, where LayeredItems in the DisplayList are added to layers described by the LayerInfo structures collected at the end of the DisplayList. Unlayered items that follow these layered items are added to synthesized layers. Another result of this change is that iframe layers can be positioned directly at the location of the iframe fragment, eliminating the need for the SubpageLayerInfo struct entirely. Iframes are the first type of content treated this way, but this change opens up the possibility to properly order canvas and all other layered content that does not create a stacking context. Fixes #7566. Fixes #7796.
* Properly size synthesized layersMartin Robinson2015-10-071-72/+143
| | | | | | | | | | | | | Layers that are composed of several stacking contexts that need to be rendered on top of other layered content need synthesized layers. Previously, these layers were placed into a stacking context that was the same size as their parent. This patch creates a new type of PaintLayer which simply holds a display list. The layer is sized to the bounds of the DisplayList and its children are positioned relative to the parent stacking context. This will also be useful in the future, when items outside of StackingContexts are given their own layer for render order purposes.
* Auto merge of #7807 - glennw:pid, r=jdmbors-servo2015-10-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible for iframes to create their own pipeline ID. This doesn't change any functionality, but it's the first step towards removing SubpageId. Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR. Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7807) <!-- Reviewable:end -->
| * Make it possible for iframes to create their own pipeline ID.Glenn Watson2015-10-061-1/+1
| | | | | | | | | | | | | | | | This doesn't change any functionality, but it's the first step towards removing SubpageId. Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR. Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.
* | Rework how StackingContexts are dynamically added to layersMartin Robinson2015-10-051-9/+25
|/ | | | | | | | | StackingContexts are added to layers when it is necessary to maintain their ordering on top of other layered StackingContexts. Instead of tracking the information about a layer scattered around into different structs, combine it all into LayerInfo. LayerInfo will be used in the future to hold layer information for DisplayItems that are layerized independently of StackingContexts.
* Split Au type into separate crate, with minimal dependencies.Glenn Watson2015-10-011-1/+2
|
* layout: Make the compositor rather than layout determine the position ofPatrick Walton2015-09-291-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Auto merge of #7710 - mrobinson:small-dl-refactor, r=pcwaltonbors-servo2015-09-231-19/+20
|\ | | | | | | | | | | | | | | | | | | | | | | A few small bits of refactoring to prepare for more advanced DisplayList layerization This will be useful when PaintLayers that contain DisplayLists instead of StackingContexts need to draw themselves. This is a simple preparatory refactoring and doesn't change any behavior. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7710) <!-- Reviewable:end -->
| * Pass PaintTile to painting threadsMartin Robinson2015-09-221-19/+20
| | | | | | | | | | This will be useful because in the future, PaintTiles might hold simple DisplayLists instead of StackingContexts.
* | sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-1/+1
|/
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-5/+4
| | | | This merges import blocks that were reported by tidy as unmerged.
* Improve printing of DisplayListsMartin Robinson2015-09-161-1/+0
| | | | | Use box tree characters to make DisplayLists easier to scan when printing them out.
* Remove 'get_*' on getters as per RFC 0344 on various componentsMathieu Rheaume2015-09-121-2/+2
|
* Have PaintLayers own StackingContexts instead of the oppositeMartin Robinson2015-09-041-80/+110
| | | | | | | | | | | | | | | Previously, StackingContexts might have a PaintLayer. We switch the ownership, for several reasons: * We want PaintLayers to potentially contain something other than a StackingContext soon. * We want to delay the creation of PaintLayers until the last minute, so that we can synthesize new layers for sandwiched content. This commit also implements the second goal. Instead of creating PaintLayers during layout itself, wait until we are sorting and layerizing a completed DisplayList.
* Auto merge of #7392 - mrobinson:layered-separate, r=pcwaltonbors-servo2015-08-261-7/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Split out layered child stacking contexts in display lists This patch is in preparation for more dynamic layerization of the pieces of display lists. It also prevents having to sort the children by z-index multiple times. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7392) <!-- Reviewable:end -->
| * Split out layered child stacking contexts in display listsMartin Robinson2015-08-261-7/+3
| | | | | | | | | | | | This patch is in preparation for more dynamic layerization of the pieces of display lists. It also prevents having to sort the children by z-index multiple times.
* | layout: Fix calculation of overflow for stacking contexts that containPatrick Walton2015-08-251-1/+1
|/ | | | | | `position: relative` fragments. Fixes placement of the header on espn.go.com.
* sort all usesJohann Tuffe2015-08-201-6/+6
|
* gfx: Sort layers according to their Z-index value before handing themPatrick Walton2015-08-191-0/+8
| | | | | | off to the compositor. Closes #7166.
* Replace uses of `for foo in bar.iter()`,João Oliveira2015-08-181-2/+2
| | | | | and `for foo in bar.iter_mut(), and for foo in bar.into_iter() (continuation of #7197)
* Fix existing syntactics nits.Josh Matthews2015-08-161-8/+8
|
* Replace uses of `for foo in bar.iter()` and `for foo in bar.iter_mut()`João Oliveira2015-08-151-1/+1
| | | | closes #7197
* layout: Carry out some minor style cleanups.Patrick Walton2015-08-101-1/+3
|
* layout: Implement basic `overflow: scroll` functionality.Patrick Walton2015-08-101-14/+13
| | | | | | | | | | | | | | | Known issues: * Display list optimization can sometimes optimize out elements that should be shown. This affects the Enyo demo. * The `overflow: scroll` container doesn't clip the inner layer properly when borders, border radius, etc. are present. * `overflow-x: scroll` and `overflow-y: scroll` don't work individually; elements are scrolled all at once. * Scrolling only works on absolutely-positioned elements.
* Create a run_with_memory_reporting method to reduce the boilerplate ↵Ms2ger2015-08-061-21/+5
| | | | associated with registering memory reporters.
* Support transforms for display list optimization. Prevents clipping in #6643.Glenn Watson2015-08-051-1/+0
|
* gfx: Split the paint messages into layout and chrome messages, and makePatrick Walton2015-07-311-37/+50
| | | | the layout messages serializable.
* Update to the latest skiaMartin Robinson2015-07-301-16/+36
| | | | | | | | | | | | | | Now GLRasteizationContexts require having an active GLContext. This will allow preserving GLContexts and possibly framebuffers between rasterization sessions, improving GL Rasterization performance. Linux Before: + Painting Per Tile 4.5559 4.3392 1.6920 18.5548 74 Painting 170.1554 151.8353 0.0008 350.1093 28 Linux After: + Painting Per Tile 3.8726 3.1299 1.5848 12.6732 62 Painting 13.5480 10.8947 0.0029 39.1198 23
* script: Make most of 2D canvas and WebGL run over IPC.Patrick Walton2015-07-251-5/+5
| | | | | | To actually make the multiprocess communication work, we'll need to reroute the task creation to the pipeline or the compositor. But this works as a first step.
* Auto merge of #6629 - pcwalton:profiler-ipc, r=jdmbors-servo2015-07-241-14/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | profile: Make the time and memory profilers run over IPC. Uses a couple of extra threads to work around the lack of cross-process boxed trait objects. r? @nnethercote <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6629) <!-- Reviewable:end -->
| * profile: Make the time and memory profilers run over IPC.Patrick Walton2015-07-241-14/+18
| | | | | | | | | | Uses the `Router` abstraction inside `ipc-channel` to avoid spawning new threads.
* | Have BufferMap store NativeSurfaces and rename to SurfaceMapMartin Robinson2015-07-241-21/+18
|/ | | | | | | | | | 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.