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.
--HG--
extra : rebase_source : 1a894b057a117a8520898c9f83308d92c122b180
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.
There are many sub-classes of nsExpirationTracker. In order to distinguish them
nicely in the logging of timer firings, it's necessary to manually name each
one. (This wouldn't be necessary if there was a way to stringify template
parameters, but there isn't.)
--HG--
extra : rebase_source : 89b99e9dbb2a806bd21145d04a5e023794643b61
The untransformation is done using the newly added UntransformTo() functions
which call Matrix4x4::ProjectRectBounds(), which returns an empty rectangle
if the result is not at least partially on the positive side of the w = 0 plane.
UntransformTo() returnis the transformed rectangle if it's not empty, and
Nothing() otherwise, making callers check for this case.
The patch also adds some assertions to places where we apply transforms we
know should be 2D (and thus didn't switch to use UntransformTo()), checking
that the transforms are in fact 2D.
--HG--
extra : rebase_source : bbc226f4135c2cf229c4e00dfb017a6c9c078391
extra : source : c2732f62a3b9a5246801aa000ce572ee07f53481
This avoids excessive amounts of test data accumulating which can slow tests down.
As part of this change, the pref for enabling the logging was made 'Live'.
--HG--
extra : rebase_source : e1d0547e5d3125e9db44bb47ddfff3b4f8d50e99
extra : source : 73fb13743a74a5a920d099fda70d9b1a1fa3a6ed
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.
This patch addresses a number of inconsistencies in the device initialization process, as well as simplifying it for future use. All device decisions are now explicitly made up-front during startup, rather than implicitly or on-demand. In addition a number of restrictions have been placed on when we can construct devices.
Full change list:
(1) We no longer attempt to use D3D11 if acceleration is disabled or D3D9 is preferred. This is a departure from our previous behavior, where we would construct these devices but then not use them as a compositor backend.
(2) D3D11 startup no longer creates a content device (this is reserved for D2D initialization).
(3) D2D is only attempted if we managed to create a D3D11 compositor device. This is a departure from previous behavior where if D3D11 was not used for compositing, we could still create its machinery to use D2D as a content backend.
(4) D2D 1.1 initialization is now directly responsible for creating a D3D11 content device.
(5) D2D 1.0 and 1.1 logic have been disentangled for clarity.
(6) UpdateRenderMode() has been split up, so we can update backend prefs out of band with device resets.
(7) mUseGDIFonts and mUseDirectWrite have been removed as their state was confusing. Instead, D2D now depends on DWrite initialization succeeding. If later we fail to get a DWrite font list, we revert our decision to use Direct2D.
(8) Device resets now clear a little more state, including the devices set in Moz2D Factory.
(9) We no longer create a DWrite text analyzer as it was unused.