Commit Graph

667 Commits

Author SHA1 Message Date
Ryan Hunt
17a7546f6b Bug 1420865 - Don't check for CONTENT_MAY_CHANGE_TRANSFORM across layer trees. r=mstange
MayResample() is used on the content and compositor to determine whether the whole
visible region should be or should have been validated. This calculation is done
partially by traversing ancestor layers and looking for a flag. This can return
different values then in the content side versus the shadow side, which in this
case leads to artifacts.

This commit tries to solve the problem by ignoring layers that content is unaware
of. This works, but has the downside that resampling artifacts could show up if
the parent process is truly doing animations that require resampling.

MozReview-Commit-ID: 4TW6nzxS6E

--HG--
extra : rebase_source : 0bc82d09686245599b12c42af812b454875291f6
extra : amend_source : 6b423326a2952125468af13f0041e3daff40362f
2018-05-07 16:07:06 -05:00
Hiroyuki Ikezoe
05604b4dce Bug 1454324 - Clear all animation data when we release layer. r=kats
MozReview-Commit-ID: AOGNjLesY0t

--HG--
extra : rebase_source : 4fcb314209a92ea160ca8377d1b7f731239427a6
2018-04-24 09:27:54 +09:00
Kartikaya Gupta
697a7719d0 Bug 1455691 - Make the transaction id a struct instead of a uint64_t. r=mattwoodrow
MozReview-Commit-ID: 9yZknygQvFr

--HG--
extra : rebase_source : 8b7a2398bdabf52f2de1c5dbd30b6868c1e0bed0
2018-04-20 15:13:06 -04:00
Hiroyuki Ikezoe
9e4f56c4f5 Bug 1455155 - Drop AnimationValue usage in gfx/. r=birtles
Two AnimationValue are still used in AnimationPropertySegment since the
AnimationPropertySegment is used in compose_animation_segment() which is also
invoked on the main-thread, so we will fix it later in a bug that will drop
AnimationValue usage on the main-thread side.

MozReview-Commit-ID: B086g2qHtZL

--HG--
extra : rebase_source : 419308155bf95fb0acd94549c2c6cc9690925b29
2018-04-19 13:50:14 +09:00
Kartikaya Gupta
abcf2e229e Bug 1454485 - Stop passing around the scroll view and container direction since it's already in the scrollbar data. r=botond
MozReview-Commit-ID: 3t4uLBQZSAi
2018-04-17 15:04:34 -04:00
Daniel Zielas
aa51622886 Bug 1453469 - Remove nsDisplayOwnLayer::mScrollTarget. r=botond
MozReview-Commit-ID: 1LAWH96mm5m

--HG--
extra : rebase_source : fe2bf1d16dc1921057f718cd5f7dd00b11e566c5
extra : amend_source : 53a8a2c0cd03b94002ba0600859e6c18d3a466b6
2018-04-14 09:42:45 +02:00
Daniel Zielas
471ef50beb Bug 1420512 - Try unifying data structures for scrollbar container and scrollbar thumb info. r=botond
MozReview-Commit-ID: 9zPkrA3CwsN

--HG--
extra : rebase_source : b52bef52576558f03afc65120a40a5312ae7eba3
2018-03-02 19:00:03 +01:00
Kartikaya Gupta
395eaf8c66 Bug 1448490 - Make the layers id a struct instead of a uint64_t. r=mattwoodrow
The new struct is in LayersTypes.h, all the rest of the changes are just
replacing existing uint64_t instances with the new LayersId struct.

Note that there is one functional change, in
CompositorBridgeParent::DeallocPWebRenderBridgeParent, where we now
correctly convert the PipelineId to a LayersId before using it to index
into sIndirectLayerTrees, whereas before we were incorrectly just using
the mHandle part of the PipelineId.

MozReview-Commit-ID: GFHZSZiwMrP

--HG--
extra : rebase_source : d2b274f63aaee2ee9bba030297e0a37a19af0d6c
2018-03-24 19:06:01 -04:00
Ryan Hunt
e34eeaaa86 Remove DisplayItemLayer and corresponding layers.advanced prefs. (bug 1439960, r=mstange)
MozReview-Commit-ID: FAWTC1Llu31

--HG--
extra : rebase_source : 05bda872389db5cc61e805c3eb48e70eb5d95cbe
2018-02-21 09:29:49 -06:00
Cosmin Sabou
e997286c08 Backed out 3 changesets (bug 1439960) for build bustages on APZInputBridgeChild.cpp and FrameBuilder.cpp. CLOSED TREE
Backed out changeset b8057c06fc4c (bug 1439960)
Backed out changeset c8d6b0fa1447 (bug 1439960)
Backed out changeset e6bd6ebc8597 (bug 1439960)
2018-03-20 23:18:44 +02:00
Ryan Hunt
1fe1a843f9 Remove DisplayItemLayer and corresponding layers.advanced prefs. (bug 1439960, r=mstange)
MozReview-Commit-ID: FAWTC1Llu31

--HG--
extra : rebase_source : 447e835dc664549a8bdbd4097d42773acf523f08
extra : histedit_source : d98b0f0654c2214a368313de84f11160a3fa7030
2018-02-21 09:29:49 -06:00
Kartikaya Gupta
f80768ca40 Bug 1446022 - Guard against dereferencing a null APZC pointer in degenerate cases. r=botond
This rolls back a few of the changes from bug 1443792. Although in
theory a LayerMetricsWrapper having an APZC should be equivalent to it
having a scrollable metrics, this might not always be strictly true. For
example, if there is no GeckoContentController registered for a layer
tree, then there might not be APZCs for that layer tree even though it
has scrollable metrics. More importantly, a malicious child process
might be able to trigger scenarios where the equivalence doesn't hold,
and thereby trigger failures in the UI/GPU process.

MozReview-Commit-ID: 1gfbILx7HWU

--HG--
extra : rebase_source : 69a2bd82a812d674046957346c4f5036211d94cf
2018-03-19 17:11:22 -04:00
Kartikaya Gupta
86032d9307 Bug 1443792 - Tighten the equivalence between a layer being scrollable and having an APZC. r=botond
If we can assume that a layer being composited has an APZC at index i if and
only if the frame metrics at index i is scrollable, then we can do the
transformations in the next patch without any change in functionality.

MozReview-Commit-ID: FRkvhwdd3nh

--HG--
extra : rebase_source : f1bee292305730079b3208e447330028c1a40727
2018-03-12 16:06:37 -04:00
Botond Ballo
b4385a3fda Bug 1442767 - Rename Box to RectAbsolute (Gecko changes). r=kats
MozReview-Commit-ID: 1wrzwQw8bdx

--HG--
rename : gfx/src/nsCoordBox.h => gfx/src/nsRectAbsolute.h
extra : rebase_source : ec71a9add57c07887cb37f2d105390072e13d98d
2018-03-05 18:08:18 -05:00
Matt Woodrow
720a1bf71e Bug 1440177 - Part 2: Combine PaintedLayerItemsEntry and PaintedDisplayItemLayerUserData into a single struct. r=jnicol
These two structs store very similar state (including duplicating the mask layer common clip count), and the former uses an expensive hashtable for lookups.
This patch combines the two, and uses a vector of entries instead of the hashtable so we can do the cleanup pass.
* * *
[mq]: fix

MozReview-Commit-ID: KamhbGAIqpD

--HG--
extra : rebase_source : 2d4c1522b04018dfab5cd4eabde828349548548c
2018-02-13 15:56:43 +13:00
arthur.iakab
1577dd49c5 Backed out 7 changesets (bug 1440177) for build bustages on a CLOSED TREE
Backed out changeset d83a1820b2f2 (bug 1440177)
Backed out changeset a77d06b2cf03 (bug 1440177)
Backed out changeset 928770efc9a3 (bug 1440177)
Backed out changeset 49b285030492 (bug 1440177)
Backed out changeset 717a696b17e0 (bug 1440177)
Backed out changeset 0840994846bf (bug 1440177)
Backed out changeset b1ba6c67264b (bug 1440177)

--HG--
extra : amend_source : 1396090c186d31b5196c2c876bcb1ccf5f1ba940
2018-03-01 23:45:23 +02:00
Matt Woodrow
a1d4e255f4 Bug 1440177 - Part 2: Combine PaintedLayerItemsEntry and PaintedDisplayItemLayerUserData into a single struct. r=jnicol
These two structs store very similar state (including duplicating the mask layer common clip count), and the former uses an expensive hashtable for lookups.
This patch combines the two, and uses a vector of entries instead of the hashtable so we can do the cleanup pass.
* * *
[mq]: fix

MozReview-Commit-ID: KamhbGAIqpD

--HG--
extra : rebase_source : 5da2d922f1ae6f47e7e82928f878c7810630ac22
2018-02-13 15:56:43 +13:00
Matt Woodrow
cf9c739dc2 Bug 1435643 - Remove no longer needed layer flattening code. r=mstange 2018-02-12 19:03:09 +13:00
Botond Ballo
d6cea6bca1 Bug 1434250 - Use a Box, rather than a Rect, representation for position:sticky inner/outer rects in the Layers API. r=kats
MozReview-Commit-ID: 4LDQ3XmWynx

--HG--
extra : rebase_source : cebe70a08b27d930618f44cb3923d3ede1171724
2018-02-09 15:40:13 -05:00
Alexis Beingessner
c3946e70ab Bug 1406231 - remove the TextLayer class, and all remaining traces of it. r=mattwoodrow
MozReview-Commit-ID: 5fmKfkO6hnO

--HG--
extra : rebase_source : ac74903f6929f21cd70d66a9fb756fcea120f11e
2017-12-07 17:13:05 -05:00
Milan Sreckovic
099cfc4242 Bug 1423570: Use BaseRect access methods instead of member variables in gfx/ r=bas.schouten
MozReview-Commit-ID: ZGySgc9oP3

--HG--
extra : rebase_source : 23aadc10e9885002290155684b2c495780d979ce
2017-12-19 15:48:39 -05:00
Cosmin Sabou
9937354d94 Backed out changeset 497efe3a096b (bug 1406231) for windows build bustages on build\build\src\obj-firefox\dist\include\mozilla/layers/ScrollingLayersHelper.h(48) r=backout on a CLOSED TREE 2017-12-08 13:04:05 +02:00
Alexis Beingessner
90d0f66f33 Bug 1406231 - remove the TextLayer class, and all remaining traces of it. r=mattwoodrow
MozReview-Commit-ID: 5fmKfkO6hnO

--HG--
extra : rebase_source : 4749bff0a8d799f7a81d9f6e32e40e14b9f24191
2017-12-07 17:13:05 -05:00
Kartikaya Gupta
0fab36e756 Bug 1418387 - Propagate scrollbar direction for scrollbar containers to APZ. r=botond
Most of this patch is just mechanical changes, but note that this patch
now makes the mFlags in scrollbar-container nsDisplayOwnLayer instances
have one of the direction bits set. As a result, this requires changing
the implementation of nsDisplayOwnLayer::IsScrollThumbLayer().

MozReview-Commit-ID: 2BLdbpz5Sa8

--HG--
extra : rebase_source : 27e7d90ce60c7f702fe77d8a3a0f7e3ae3e4a4ff
2017-11-24 16:23:05 -05:00
Kevin Chen
49b2130100 Bug 1415469 - Remove mDeviceResetSequenceNumber from TDR process since we don't need it anymore; r=dvander
MozReview-Commit-ID: 3uQQwW8QOJA

--HG--
extra : rebase_source : ab6090ad51a2a4714f1739a30d854d624d187239
2017-11-08 15:26:43 +08:00
Kartikaya Gupta
3c76c8128a Bug 1415225 - Move the EventRegionsOverride field to be on RefLayers only. r=botond
We now set EventRegionsOverride flags on ref layers only, so
there's no need to have the APIs to set it on container layers in
general.

MozReview-Commit-ID: JKU4UXvdR2e

--HG--
extra : rebase_source : 77f49787e8953520dc56ea4a8f9286b35d6942b8
2017-11-09 09:03:52 -05:00
Sebastian Hengst
8916884b22 Backed out 6 changesets (bug 1415225) for frequently failing own gfx/layers/apz/test/mochitest/test_group_overrides.html on Windows. r=backout
Backed out changeset 27403a9dec13 (bug 1415225)
Backed out changeset 9e6710586531 (bug 1415225)
Backed out changeset 8cfef302b710 (bug 1415225)
Backed out changeset 8ae80d7421d5 (bug 1415225)
Backed out changeset 5f14fc545115 (bug 1415225)
Backed out changeset 4704645d4e81 (bug 1415225)
2017-11-09 11:59:04 +02:00
Kartikaya Gupta
f07bd076ed Bug 1415225 - Move the EventRegionsOverride field to be on RefLayers only. r=botond
We now set EventRegionsOverride flags on ref layers only, so
there's no need to have the APIs to set it on container layers in
general.

MozReview-Commit-ID: EX57VvaZv8A

--HG--
extra : rebase_source : 7ea4c8bb2716821bf7069158fdf9729fb6137a35
2017-11-08 20:47:19 -05:00
Daniel Holbert
126bd9e1a4 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Boris Chiou
743614effe Bug 1340005 - Part 3: Use AnimationValue on the compositor thread. r=birtles
MozReview-Commit-ID: CtnDLsdcr9x

--HG--
extra : rebase_source : 3d4a0f40e2f522471555c04c88474cb08e082851
2017-09-21 17:01:48 +08:00
Morris Tseng
f482bf5f38 Bug 1410359 - Remove unused css filter codes. r=kats
Some css filter codes only used in layers-full mode. Since layers-full
already removed, we can also remove those unused codes.

MozReview-Commit-ID: 8YrfOfuXHNt

--HG--
extra : rebase_source : e9475d9100fbc2e5b301833f31fde1db458117aa
2017-10-20 16:10:03 +08:00
David Anderson
2b8bc13b5c Remove the ability for LayerManagers to disable complex component alpha cases. (bug 1402737 part 1, r=mattwoodrow)
--HG--
extra : rebase_source : be0a1fb30936acb12d74953b4e599b107b0a0db2
2017-10-10 17:39:41 -07:00
Kartikaya Gupta
8c4d9f46ad Bug 1403176 - Make WebRenderLayerManager reject pending scroll offset updates. r=mstange
Currently some callers attempt to set a "pending scroll offset update"
on the layer tree, which basically allows it to send a scroll offset
update to the compositor in an empty transaction, without doing a full
paint. However, WebRenderLayerManager doesn't really support empty
transactions yet, so we want to reject attempts to do this for now. This
will force the callers to schedule a full transaction instead of an
empty transaction.

MozReview-Commit-ID: 1bBlj59W5HH

--HG--
extra : rebase_source : 0a018989c2681b01ff325e8e2c79c9ff146f04d4
2017-10-02 16:49:55 -04:00
Matt Woodrow
a3ffb3d06c Bug 1381753 - Recompute visible regions for ContainerLayers without intermediate surfaces when needed for invalidation. r=mstange 2017-08-25 15:41:29 +12:00
Sebastian Hengst
8066ec372a Backed out changeset 3b8bb2bc1ac0 (bug 1381753) for unexpectedly passing web-platform-reftest /css/css-transforms-2/transform3d-sorting-001.html. r=backout 2017-08-25 11:51:21 +02:00
Matt Woodrow
032751ce40 Bug 1381753 - Recompute visible regions for ContainerLayers without intermediate surfaces when needed for invalidation. r=mstange 2017-08-25 15:41:29 +12:00
Milan Sreckovic
f330369b4e Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in .h files in gfx/*. r=botond
MozReview-Commit-ID: 4knfAC1HTI1

--HG--
extra : rebase_source : 6ac939b478d22d429e8643e6ba96e372d8220bfb
2017-08-14 08:28:11 -04:00
David Anderson
2cc63ceef3 Handle invalidation bounds overflow in ContainerLayerMLGPU. (bug 1345891 part 3, r=mattwoodrow) 2017-08-03 21:22:49 -07:00
Morris Tseng
f3d4ff499f Bug 1379920 - Introduce CanvasRenderer and its derived classes. r=nical,jrmuizel
This patch move common canvas interfaces out of layer. So I create a
base class CanvasRenderer which move interfaces from CanvasLayer.
CopyableCanvasRenderer from CopyableCanvasLayer, ClientCanvasRenderer
from ClientCanvasLayer and WebRenderCanvasRenderer from
WebRenderCanvasLayer. And finally, WebRenderCanvasRendererSync for the
non layers free mode and WebRenderCanvasRendererAsync for the layers
free mode.

Summary all changes in this patch.
* Move class CanvasLayer::Data to CanvasRenderer.h and rename it to
CanvasInitializeData. Because this class not only use by layer but also
* Move BasicCanvasLayer::UpdateSurface to
CopyableCanvasRenderer::ReadbackSurface.
* CanvasClient::Update now accepts ShareableCanvasRenderer as parameter.
not CanvasLayer.
use by layers-free mode. Move it out of layer's class makes more sense.
* Add InitializeCanvasRenderer in the canvas related classes to
initialize CanvasRenderer without involved layer.
* All canvas layer has function "CreateCanvasRendererInternal" that
initialize corresponding CanvasRenderer.

* Description of all CanvasRenderer classes:
** CanvasRenderer: Based classes.
** CopyableCanvasRenderer: Can readback canvas content to a
SourceSurface. Use by BasicCanvasLayer.
** ShareableCanvasRenderer: Provide IPC capabilities that allow sending
canvas content over IPC. This is pure virtual class because the IPC handling is
different in different LayerManager.
** ClientCanvasRenderer: Implement IPC handling for ClientLayerManager.
Use by ClientCanvasLayer.
** WebRenderCanvasRenderer: Implement IPC handling for
WebRenderLayerManager.
** WebRenderCanvasRendererSync: Use by WebRenderCanvasLayer.
** WebRenderCanvasRendererAsync: Use by layers-free mode in WebRender.

class diagram shows below:

                      +--------------+
                      |CanvasRenderer|
                      +-------+------+
                              ^
                              |
                  +----------------------+
                  |CopyableCanvasRenderer|
                  +----------------------+
                              ^
                              |
                  +-----------+-----------+
                  |ShareableCanvasRenderer|
                  +-----+-----------------+
                        ^      ^
          +-------------+      +-------+
          |                            |
+--------------------+       +---------+-------------+
|ClientCanvasRenderer|       |WebRenderCanvasRenderer|
+--------------------+       +--------+--+-----------+
                                      ^  ^
              +-----------------------+  +----+
              |                               |
+-------------+-------------+   +-------------+--------------+
|WebRenderCanvasRendererSync|   |WebRenderCanvasRendererAsync|
+---------------------------+   +----------------------------+

MozReview-Commit-ID: 5hqQ19W169r
2017-08-03 13:55:14 +08:00
Ryan VanderMeulen
f4e3a91992 Merge m-c to inbound. a=merge 2017-07-21 09:40:28 -04:00
Kartikaya Gupta
4b9801e41b Bug 1359808 - Don't do empty transactions for scroll updates if there are already pending transforms in the layer tree. r=mstange
The pending transforms must have been computed using the older scroll offset
values, which means that updating the scroll offsets without recomputing the
transforms will make them wrong. If we do an empty transaction for the scroll
offset updates, the transforms will not get computed. This patch catches this
scenario and schedules a full paint instead of the empty transaction instead.
The case where the scroll offset is modified *before* the transform is already
handled by code in nsIFrame::TryUpdateTransformOnly.

MozReview-Commit-ID: I5s5J7BS1ru

--HG--
extra : rebase_source : 63fec656440c8bee322f069a4466a311ebcd0f7d
2017-07-12 11:14:11 -04:00
Ethan Lin
a48f3ac6fe Bug 1378602 - Part2. Move animation data from layer to AnimationInfo. r=kats
MozReview-Commit-ID: 4gv8EfPgsii
2017-07-21 14:21:47 +08:00
Kartikaya Gupta
1147b9727c Bug 1382200 - Rename Layer::IsScrollInfoLayer to better capture what the call sites care about. r=botond
MozReview-Commit-ID: 1vMBMo5zOhK

--HG--
extra : rebase_source : c7f7e94c87c177cc244885912a916133a7cbfbd3
2017-07-19 09:24:22 -04:00
David Anderson
e09978bd8b Implement LayerMLGPU::SetLayerManager. (bug 1375759, r=mattwoodrow) 2017-06-27 13:11:01 -07:00
Ryan Hunt
a6a2b4f7c4 Bug 1351783 part 10 - Create and sync the current FocusTarget on each layer transaction. r=kats,botond
This commit modifies PresShell and nsDisplayList to send a FocusTarget update on
every layer transaction. Ideally we would like to send updates as often as possible,
but this seems like it works well. This can be iterated on later, if necessary.

MozReview-Commit-ID: 8PFqIOhzH77

--HG--
extra : rebase_source : 1e2c3b5620f5d7e6e789848da57b2486c3d74f14
2017-06-13 02:00:49 -04:00
Sebastian Hengst
4798a534fd Backed out changeset 9db369ba372c (bug 1375759) for unused mComputedDrawRegion. r=backout 2017-06-27 20:47:30 +02:00
David Anderson
45ebfe4fb7 Implement LayerMLGPU::SetLayerManager. (bug 1375759, r=mattwoodrow) 2017-06-27 11:31:37 -07:00
David Anderson
a967d21a69 Allow LayerManagers to disable complex component alpha cases. (bug 1365879 part 19, r=mattwoodrow) 2017-06-20 01:17:22 -07:00
David Anderson
eda24ede27 Rename LayerManager::Composite to LayerManager::ScheduleComposite. (bug 1365879 part 17, r=mattwoodrow) 2017-06-20 01:17:21 -07:00
David Anderson
452df9e9d2 Allow ContainerLayers to track their invalid regions. (bug 1365879 part 16, r=mattwoodrow) 2017-06-20 01:17:21 -07:00