Make the FrameLayerBuilder remember for what region it has calculated
display item visibility, then recompute the visibility whenever the
dirty region it is passed to DrawPaintedLayer changes.
This means that the caller does not have to know the entire dirty region
that will be drawn for the transaction, but we can still optimise cases
where it knows some of the dirty region in advance.
This fixes a regression where MultiTiledContentClient's low-res display
port would not be painted if a smaller region of its high-res buffer had
already been painted that transaction, since the FrameLayerBuilder
had decided that most of the larger low-res region was invisible.
Remove WrapPreserve3DList() and replaced it by creating a
nsDisplayTransform item for each transformed frame.
- Add an additional item for each top frame extending 3D context to
separate consequence contexts.
- Effective transform of a layer is the accumulation of ancestors in
the same 3D context.
- The layers creating new context and extended by children need a
temporary buffer if it's effective transform is not 2D.
- Clip rects are accumulated along the context chain.
- Visible rects of items are computed from dirty regions of the frame
creating the context and accumulated transforms.
- Bounds of items are computed from accumulated transforms and
accumulated bounds of the descent frames.
- Backface hidden is handled by compositor and BasicLayerManager.
This ensures that regions beyond the clip are painted, and async scrolling can reveal them by moving the layer-level clip.
This patch also ensures that we continue creating mask layers for fixed background layers correctly, where appropriate.
--HG--
extra : rebase_source : e0759006463e7d69cd1d916c8e759b35d300a7c7
extra : source : 09922c7c550760f9b61d8ef523281234805af218
This is done for performance reasons, as the event regions can be complex.
--HG--
extra : rebase_source : 864ff7cf6f7286271c8f32b50b2166feefecc011
extra : source : 0de9f9d0f8c1dd915e0b04225450ad09552a139e
Bug 1176077 introduced the parameter aDirtyRegion to
DrawPaintedLayerCallback, which allows the callback to recompute the
visibility of all items to be painted in that transaction in a single
go. However, this parameter can not always be determined correctly
when using RotatedBuffer, and using an incorrect value was causing
graphical glitches.
Make the parameter optional, and on null values do not perform the
optimisation. Pass null from ClientPaintedLayer, which uses
RotatedBuffer and was causing problems, but continue to pass the
correct value from other Layer implementations. This optimisation was
most important for tiled layers using progressive paint, so this is
okay.
FrameLayerManager::RecomputeItemsVisibility() was being called on every
call to FrameLayerBuilder::DrawPaintedLayer(), each time for the region
to be painted by that paint call. This is inefficient when progressive
paint is enabled. Change it so that we compute the visibility of all the
layer's items within the total region to be painted, but only on the
first paint after the display list has been modified.
Get rid of EnumerateEntries by inlining those enumerate functions. Also
move gPaintedDisplayItemLayerUserData, gColorLayerUserData, etc. to the
front of the file since LayerManagerData::Dump() references to one of
them.
--HG--
extra : commitid : K1KepLsdyS4
extra : rebase_source : 97543d7cb9c7333ae2b5b5a298afdd22f5fa249c
This makes those caret display items not share a layer with any other display items, and uses a different async scroll frame clip for that layer.
--HG--
extra : rebase_source : f01cd0343ea3e672b1d696a4e4e8924d070cc23d
extra : histedit_source : 14cefb8c1c9834d02a095e52e463add8a56a8625
This fixes bug 1153539 with the Firefox download arrow being pixellated
(verified by testing locally).
I also confirmed what happens on a flame device with the transform
unlocking the Firefox OS homescreen (bug 945082 / bug 972310). For that
transform (which had a maximum scale of 2), I see four calls to
GetSuitableScale:
GetSuitableScale: aMaxScale=2.000000, displayVisibleRatio=1.000000
GetSuitableScale: aMaxScale=2.000000, displayVisibleRatio=1.000586
GetSuitableScale: aMaxScale=2.000000, displayVisibleRatio=1.000000
GetSuitableScale: aMaxScale=2.000000, displayVisibleRatio=1.000586
(Presumably the first and third are for width, and the second and fourth
are for height.) I believe this shows that bug 972310 will remain fixed
with this patch.
I chose to use the pres context's visible area rather than the screen
size because it seemed more appropriate, and also because (if memory
serves correctly) it's much cheaper to get.
Change interface of getter/setter for mClipRect,
also necessary modification for codes that use these resources.
* * *
Bundle mUseClipRect and mClipRect as Maybe<ParentLayerIntRect> mClipRect
--HG--
extra : rebase_source : ca0c60404a28b7418df88104b863760033289910
- Added specialized rect clipping functionality to Matrix4x4::ProjectRectBounds
so we don't have to return infinite values when rects cross the w=0 plane
in homogenous coordinate space.
- Updated callsites of ProjectRectBounds to pass a clipping rect that is
appropriate for the units that are returned.
--HG--
extra : rebase_source : 9b1088a77e88259e2c32379ade23fbc2236596fb
This adds support for class="reftest-opaque-layer" and for
reftest-assigned-layer="some-layer-name" to the reftest harness.
From reftest/README.txt:
Opaque Layer Tests: class="reftest-opaque-layer"
================================================
If an element should be assigned to a PaintedLayer that's opaque, set the class
"reftest-opaque-layer" on it. This checks whether the layer is opaque during
the last paint of the test, and it works whether your test is an invalidation
test or not. In order to pass the test, the element has to have a primary
frame, and that frame's display items must all be assigned to a single painted
layer and no other layers, so it can't be used on elements that create stacking
contexts (active or inactive).
Layerization Tests: reftest-assigned-layer="layer-name"
=======================================================
If two elements should be assigned to the same PaintedLayer, choose any string
value as the layer name and set the attribute reftest-assigned-layer="yourname"
on both elements. Reftest will check whether all elements with the same
reftest-assigned-layer value share the same layer. It will also test whether
elements with different reftest-assigned-layer values are assigned to different
layers.
The same restrictions as with class="reftest-opaque-layer" apply: All elements
must have a primary frame, and that frame's display items must all be assigned
to the same PaintedLayer and no other layers. If these requirements are not
met, the test will fail.
Once we're smarter about recycling the right layer, we can't decide on a layer
as soon as we encounter its first display item. We might need to have to look
at all of the assigned display items. This change makes that requirement
explicit.
--HG--
extra : rebase_source : 743deff9257c2da3b87d7f929465e09ea33859c0
The calls above don't need access to the PaintedLayer, but the ones this change
is moving down do. This change just makes it more obvious that we're free to
move the calls to an even later point.
--HG--
extra : rebase_source : e63bbc37a634e84e28a86e765f50927a63fbce2f
UpdateCommonClipCount accesses the PaintedLayerData's mLayer field in order to
get the layer manager. We want to be able to call UpdateCommonClipCount when
mLayer is null.
--HG--
extra : rebase_source : d2964e3e390e0cd564469dee2bf691e76be07cf2