Commit graph

673 commits

Author SHA1 Message Date
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
Martin Robinson
ea14fca1dc Store content offset in unscaled pixels
Content offset is now stored in unscaled pixels, so that it can be
applied to tile positions during compositor rendering without unscaling
it. This means that when using it in calculations of layer size (stored
in device pixels), we need to scale it. Scene scale is now stored as a
scale rather than a transformation.

Fixes #3269.
Fixes #3042.
2014-09-16 08:57:08 -07:00
Martin Robinson
39e3a4af70 Don't produce image output until all pipelines rendered something
Instead of producing image output as soon as the first pipeline is
ready, we wait to produce the output until all pipelines are in the
idle RenderState. This should remove a race condition when running
reference tests.
2014-09-12 11:29:14 -07: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
Bryan Bell
e17cc2d5e2 Create root compositor layers for all frames eagerly
Instead of waiting to create the root layer, create them as soon as the
Compositor receives the frame tree. This allows the compositor to
create a layer tree skeleton of which to hang the base layers when they
are ready.
2014-09-12 11:29:11 -07:00
Bryan Bell
0e86679464 Store one RenderState per-pipeline in the Compositor
This can later be used to decide whether the entire pipeline is ready
for rendering.
2014-09-12 10:47:51 -07:00
Bryan Bell
c182308350 Store Compositor ReadyState per-pipeline
Instead of storing a single ReadyState, store one per pipeline and
track the earliest one.
2014-09-12 10:47:50 -07:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/compositing/compositor.rs (Browse further)