Commit Graph

629 Commits

Author SHA1 Message Date
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
David Anderson
392b83f1c4 Allow LayerManagers to force intermediate surfaces for blend containers. (bug 1365879 part 11, r=mattwoodrow) 2017-06-20 01:17:19 -07:00
Markus Stange
fcebd73530 Bug 1368386 - Only call mInvalidRegion.GetRegion() when an up-to-date valid region is requested. r=mattwoodrow
MozReview-Commit-ID: IHb0fNAzyjj

--HG--
extra : rebase_source : 7042eb85f99c0a578a5e732e1edfe364deec330d
2017-06-15 23:35:38 -04:00
Markus Stange
5e44be6da9 Bug 1368386 - Make PaintedLayer::mValidRegion private so that its access can be tightly controlled. r=mattwoodrow
MozReview-Commit-ID: LdtH3hrXT5v

--HG--
extra : rebase_source : c1eff1ba44f9a762cadb028113576bbffee93715
2017-06-15 18:20:53 -04:00
Markus Stange
23716b1586 Bug 1368386 - Add PaintedLayer::InvalidateWholeLayer(). r=mattwoodrow
MozReview-Commit-ID: 7sgQDs82Wwt

--HG--
extra : rebase_source : 6a13c3b53f85d88535451cda57c76e5d845a53d5
extra : source : 92eb66a5357939ca239cb2167dcccbc2328ea51b
2017-06-15 17:29:18 -04:00
Martin Robinson
7d937678f4 Bug 1365972 - Add initial WebRender support for nsDisplayFilter. r=rhunt, r=mattwoodrow 2017-06-06 06:28:00 -04:00
sotaro
e19a847326 Bug 1359993 - Reduce invalidation of video r=nical 2017-06-05 20:55:14 +09:00
Kartikaya Gupta
cd79f50c8d Bug 1364525 - Ensure all scroll thumbs have an animations id. r=pchang
In order to have the scrollbar thumbs reflect the async scroll position, we're
going to re-use the API for OMTA. That is, we set an animation id on the
stacking context for the scroll thumb, and we'll update the transform on the
stacking context at composite time based on the async scroll position. For this
to work we need to ensure that the scroll thumb does in fact have an
animation id set on it.

MozReview-Commit-ID: 6TvRemxRUrR
2017-05-23 10:50:41 -04:00
Jeff Muizelaar
b9411eb4eb Bug 1364626. Ensure our transaction arrives at the compositor before asking the parent to paint. r=dvander
This makes UpdateLayerTree synchronous enough to ensure that the layer
transaction from the child reaches the compositor. Given the comment in
http://searchfox.org/mozilla-central/rev/484d2b7f51b7aed035147bbb4a565061659d9278/dom/interfaces/base/nsIDOMWindowUtils.idl#106
this seems to be the original intent of this function anyways. Without this, we
can have a race between the child talking to the compositor and the child
talking to the parent talking to the compositor.

This also changes GetCompositorBridgeChild to work even when the widget doesn't
have a CompositorBridge
2017-05-17 10:45:33 -04:00
Jeff Muizelaar
0ed20eff4a Revert "Ensure our transaction arrives at the compositor before asking the parent to paint"
This reverts commit e0ec2a72700f.
2017-05-17 10:44:33 -04:00
Jeff Muizelaar
b2c7a3fec1 Ensure our transaction arrives at the compositor before asking the parent to paint
This makes UpdateLayerTree synchronous enough to ensure that the layer
transaction from the child reaches the compositor. Given the comment in
http://searchfox.org/mozilla-central/rev/484d2b7f51b7aed035147bbb4a565061659d9278/dom/interfaces/base/nsIDOMWindowUtils.idl#106
this seems to be the original intent of this function anyways. Without this, we
can have a race between the child talking to the compositor and the child
talking to the parent talking to the compositor.

This also changes GetCompositorBridgeChild to work even when the widget doesn't
have a CompositorBridge
2017-05-17 10:42:09 -04:00
Botond Ballo
6c0eea50b3 Bug 1349750 - Group scroll thumb-related information in Layer into a ScrollThumbData structure. r=kats
The patch also renames Layer::SetScrollbarData() to Layer::SetScrollThumbData()
for clarity.

MozReview-Commit-ID: DVwJ3DMl3Zs

--HG--
extra : rebase_source : 7b2bfccf1351c82bb16296635e69d5488c87a50f
2017-05-10 14:02:15 -04:00
Kartikaya Gupta
7259e787f4 Merge m-c to graphics
MozReview-Commit-ID: 9XwZUWIhGir
2017-05-02 09:45:11 -04:00
peter chang
320e68f0dd Bug 1357320 - Deal with the lifetime of compositor animations, r?kats
First, hook the Layer's ClearAnimation API to delete unnecessary
animations in next layer transaction. Second, add another async
DeleteCompositorAnimations API to delete animations on the compositor,
especially calling this API before WebRenderLayerManager got destroyed.

MozReview-Commit-ID: 4mbj5IgsXYa
2017-05-02 10:26:13 +08:00
Kartikaya Gupta
b21511b7c0 Merge m-c to graphics
MozReview-Commit-ID: GdyXEYZsVuX
2017-04-25 08:32:48 -04:00
Kartikaya Gupta
c896803771 Merge m-c to graphics
MozReview-Commit-ID: 3s6ISsQ3jG9
2017-04-24 09:17:28 -04:00
Kartikaya Gupta
2e1380aecf Merge m-c to graphics
MozReview-Commit-ID: 5zsIClrx1FB
2017-04-21 10:01:47 -04:00
Markus Stange
2a35142b62 Bug 1349418 - Remove checkerboarding code and just use an opaque background color behind root scroll frames. r=kats 2017-04-21 14:02:15 +12:00
Kartikaya Gupta
1be864c6ad Merge m-c to graphics
MozReview-Commit-ID: 8Oqr9Nbqsn0
2017-04-19 07:02:32 -04:00
peter chang
e238a80556 Bug 1345017 - Add animation sampling for WR, r=kats
MozReview-Commit-ID: AR2vajUf2o0
2017-04-12 16:40:48 +08:00
Morris Tseng
7eb27c99ad Bug 1358961 - IsPartOfOpaqueLayer should consider ColorLayer as well. r=mattwoodrow
MozReview-Commit-ID: 9PUKdz7m1uJ
2017-04-25 11:02:48 +08:00
Sebastian Hengst
6e1c138a06 Backed out changeset 435e638babd1 (bug 1349418) for failing checkerboard-{1,2,3}.html on Android 4.3. r=backout a=backout
MozReview-Commit-ID: Au7FbypQNvf
2017-04-21 18:01:24 +02:00
Kartikaya Gupta
a1ccf6bbaa Bug 1357390 - Consistently use uint64_t for the referent id, because that's what it really is. r=mattwoodrow
MozReview-Commit-ID: LPxcElOVrU3

--HG--
extra : rebase_source : 7b5e27fcfd8b13fbe8ed1e34abc98cc43c7e8ae1
2017-04-18 08:43:08 -04:00
Wes Kocher
514e230373 Merge inbound to central, a=merge 2017-04-13 17:24:01 -07:00
sotaro
292e80ffe3 Bug 1354474 - Add FlushRendering() and Composite() support to WebRenderLayerManager r=mattwoodrow 2017-04-10 15:58:29 +09:00
Ehsan Akhgari
3b93e5ad89 Bug 1354412 - Remove nsIDOMWindowUtils.beginTabSwitch(); r=jrmuizel 2017-04-12 23:31:39 -04:00
Markus Stange
853d16cc7d Bug 1349418 - Remove checkerboarding code and just use an opaque background color behind root scroll frames. r=kats
--HG--
extra : rebase_source : d6b27d8b36eb8329cead0bd184c7ec6fd983ba53
2017-04-21 14:02:15 +12:00
Iris Hsiao
22dd380d12 Backed out changeset 3910de7acce3 (bug 1349418)
--HG--
extra : rebase_source : e0ddc3d0c48256acd0996f16d3198560041f9c3e
2017-04-10 14:42:38 +08:00
Markus Stange
650ae288f5 Bug 1349418 - Remove checkerboarding code and just use an opaque background color behind root scroll frames. r=kats 2017-04-10 17:01:53 +12:00
Mason Chang
e08bd7cbdb Bug 1351114 Properly track display item layers in layer managers. r=mattwoodrow 2017-03-28 22:37:11 -07:00
peter chang
29adc38bc8 Bug 1337889 - Add CompositorAnimationsId for layer animations, r=hiro
MozReview-Commit-ID: 4r9VhF4Vp2l

--HG--
extra : rebase_source : 0af2185ab037bbe7e300876797f1cba824a381f2
2017-02-08 14:31:45 -05:00
Botond Ballo
0a1ee23556 Bug 1328065 - Record the target scroll id of scrollbar containers in the layer tree. r=mstange
MozReview-Commit-ID: DoyM64JJ4N8

--HG--
extra : rebase_source : 4c31d9ce488670bb2aab32fcba8e53bba8eaa7cf
2017-02-15 17:40:03 -05:00
Kartikaya Gupta
f62b8b3b3f Merge m-c to graphics
MozReview-Commit-ID: IN2hMCjMHLL

--HG--
rename : browser/components/extensions/test/browser/browser_ext_url_overrides.js => browser/components/extensions/test/browser/browser_ext_url_overrides_newtab.js
rename : browser/extensions/formautofill/content/FormAutofillContent.js => browser/extensions/formautofill/FormAutofillContent.jsm
rename : browser/extensions/formautofill/content/FormAutofillContent.js => browser/extensions/formautofill/FormAutofillHandler.jsm
rename : browser/extensions/formautofill/content/FormAutofillContent.js => browser/extensions/formautofill/FormAutofillHeuristics.jsm
rename : browser/extensions/formautofill/content/FormAutofillContent.js => browser/extensions/formautofill/content/FormAutofillFrameScript.js
rename : browser/themes/shared/devedition/urlbar-history-dropmarker.svg => browser/themes/shared/compacttheme/urlbar-history-dropmarker.svg
rename : config/tests/makefiles/autodeps/check_mkdir.tpy => config/tests/makefiles/autodeps/check_mkdir.py
rename : dom/bindings/MozMap.h => dom/bindings/Record.h
rename : dom/bindings/parser/tests/test_mozmap.py => dom/bindings/parser/tests/test_record.py
rename : dom/file/File.cpp => dom/file/BaseBlobImpl.cpp
rename : dom/file/File.h => dom/file/BaseBlobImpl.h
rename : dom/file/File.cpp => dom/file/Blob.cpp
rename : dom/file/File.h => dom/file/Blob.h
rename : dom/file/File.cpp => dom/file/BlobImpl.cpp
rename : dom/file/File.h => dom/file/BlobImpl.h
rename : dom/file/File.cpp => dom/file/EmptyBlobImpl.cpp
rename : dom/file/File.h => dom/file/EmptyBlobImpl.h
rename : dom/file/File.cpp => dom/file/FileBlobImpl.cpp
rename : dom/file/File.h => dom/file/FileBlobImpl.h
rename : dom/file/File.cpp => dom/file/MemoryBlobImpl.cpp
rename : dom/file/File.h => dom/file/MemoryBlobImpl.h
rename : dom/file/File.cpp => dom/file/StreamBlobImpl.cpp
rename : dom/file/File.h => dom/file/StreamBlobImpl.h
rename : dom/file/File.h => dom/file/StringBlobImpl.h
rename : dom/file/File.h => dom/file/TemporaryBlobImpl.h
rename : dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.cpp => dom/media/platforms/wrappers/MediaDataDecoderProxy.cpp
rename : dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.h => dom/media/platforms/wrappers/MediaDataDecoderProxy.h
rename : dom/tests/mochitest/general/test_interfaces.html => dom/tests/mochitest/general/test_interfaces.js
rename : dom/workers/test/test_navigator.html => dom/workers/test/test_navigator.js
rename : js/src/jsautokw.py => js/src/frontend/GenerateReservedWords.py
rename : js/src/vm/Keywords.h => js/src/frontend/ReservedWords.h
rename : layout/base/RestyleManager.cpp => layout/base/GeckoRestyleManager.cpp
rename : layout/base/RestyleManager.h => layout/base/GeckoRestyleManager.h
rename : layout/reftests/w3c-css/submitted/ui3/box-sizing-replaced-002-ref.xht => layout/reftests/bugs/1313772-ref.xhtml
rename : layout/reftests/w3c-css/submitted/ui3/box-sizing-replaced-002.xht => layout/reftests/bugs/1313772.xhtml
rename : servo/components/jstraceable_derive/Cargo.toml => servo/components/deny_public_fields/Cargo.toml
rename : servo/components/jstraceable_derive/Cargo.toml => servo/components/domobject_derive/Cargo.toml
rename : servo/components/plugins/lints/ban.rs => servo/components/script_plugins/ban.rs
rename : servo/components/plugins/jstraceable.rs => servo/components/script_plugins/jstraceable.rs
rename : servo/components/plugins/lib.rs => servo/components/script_plugins/lib.rs
rename : servo/components/plugins/lints/unrooted_must_root.rs => servo/components/script_plugins/unrooted_must_root.rs
rename : servo/components/plugins/utils.rs => servo/components/script_plugins/utils.rs
rename : testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_autocomplete.html => testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_autocomplete-manual.html
rename : testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_list.html => testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_list-manual.html
rename : testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasdate.html => testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasdate-manual.html
rename : testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasnumber.html => testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasnumber-manual.html
rename : testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_length.html => testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_length-manual.html
rename : testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_selectedindex.html => testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_selectedindex-manual.html
rename : testing/web-platform/tests/preload/link_header_preload_delay_onload.html.headers => testing/web-platform/tests/preload/link-header-preload-delay-onload.html.headers
rename : testing/web-platform/tests/preload/link_header_preload.html.headers => testing/web-platform/tests/preload/link-header-preload.html.headers
rename : services/sync/tests/unit/test_extension_storage_crypto.js => toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_crypto.js
rename : toolkit/components/telemetry/TelemetryComms.h => toolkit/components/telemetry/ipc/TelemetryComms.h
rename : toolkit/components/telemetry/TelemetryIPCAccumulator.cpp => toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.cpp
rename : toolkit/components/telemetry/TelemetryIPCAccumulator.h => toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.h
extra : amend_source : 7411c39541f0b530b4b94cf359dc73e385abea4d
2017-02-17 23:33:24 -05:00
Mason Chang
ef3d9a921c Bug 1337130 - Create a DisplayItemLayer type. r=mattwoodrow 2017-02-14 13:49:27 -08:00
Kartikaya Gupta
61bc491994 Merge m-c to graphics
MozReview-Commit-ID: Ejcj1CD87t3
2017-02-09 10:12:03 -05:00
Ryan Hunt
5e2990dc18 Merge m-c to graphics 2017-02-07 09:05:18 +00:00
Ethan Lin
896d26ef75 Bug 1337291 - Part1. Pass the border style to BorderLayer. r=mattwoodrow
MozReview-Commit-ID: 59rB9sDilYW
2017-02-08 23:20:29 -05:00
sotaro
21834aa96f Bug 1335336 - Add LayerManager::GetCompositorBridgeChild() r=nical 2017-02-01 16:12:37 +09:00
Ryan Hunt
434ca7039f Merge m-c to graphics 2017-01-26 08:59:21 -06:00