Граф коммитов

10902 Коммитов

Автор SHA1 Сообщение Дата
sotaro a15823ac76 Bug 1416614 - Add checks to ImageBridgeParent::NotifyImageComposites r=nical 2017-11-15 09:08:18 +09:00
Kartikaya Gupta 0b55cc54f3 Bug 1416073 - Avoid calling the expensive ComputeScrollMetadata function if we already computed that metadata before. r=jrmuizel
MozReview-Commit-ID: 5SwAEA4Wpqw

--HG--
extra : rebase_source : 1c717c3f0cfb1c5a94970d5d7cc267ee9570c0ad
2017-11-09 23:18:39 -05:00
sotaro 56c2f9bf58 Bug 1412249 - Fix DidComposite timing for EmptyTransaction r=nical 2017-11-15 08:00:57 +09:00
Ryan Hunt ac638de2f4 Don't do PaintThebes after PaintOffMainThread. (bug 1399692 part 10, r=dvander)
MozReview-Commit-ID: J0IOzqIGRtz

--HG--
extra : rebase_source : d20a570de201dc46ceb3605db20af40f2f2fed8e
extra : source : eab96d73c39df98c888a491f54fbb963069c5f6b
2017-11-09 15:44:21 -05:00
Ryan Hunt 84c229fe9d Don't reuse a back buffer after a swap if the content or surface changed (bug 1399692 part 9, r=bas)
MozReview-Commit-ID: HGAxkeyESbc

--HG--
extra : rebase_source : 7c09e853a3feeb1d1d9d7cc93d77242265ec590b
extra : source : 7d9324e2ab34946539be9f17d74f639aae5ba7e5
2017-11-05 10:38:47 -05:00
Ryan Hunt 9dc07b61c4 Don't copy over regions that will be painted in this frame (bug 1399692 part 8, r=bas)
We do the same in FinalizeFrame, so we should do it here.

MozReview-Commit-ID: JTKDj8yrtI2

--HG--
extra : rebase_source : 6ba114c6734990dcb62e361889d1b2cf2b5ad7dc
extra : intermediate-source : 76bf99decf0906f0a6a4ad99539fd40f97c4539f
extra : source : fb9b0524428307c4ee097894e37879339df47579
2017-11-04 14:52:31 -04:00
Ryan Hunt c34dc7e2af Replay buffer commands on paint thread when OMTP is enabled (bug 1399692 part 7, r=bas)
This commit does the work of actually dispatching the recorded buffer operations
to the paint thread, and removing some main thread asserts from TextureClient.

MozReview-Commit-ID: CN3RoQPz9fP

--HG--
extra : rebase_source : 08ae6cf8445ef0a757efc54175768c2fa9bb1685
extra : intermediate-source : 0fc2414f146d8f5d08c97e5b7eedb25c5632ab2d
extra : source : e9349ad2f1f8fec862b1d2271d0d8f25ad0814d4
2017-10-26 00:47:17 -04:00
Ryan Hunt cc9ba81109 Record buffer operations to a struct for replaying on paint thread (bug 1399692 part 6, r=bas)
This commit adds a CapturedBufferState which is used to record all the operations
that are necessary for preparing the buffers. The commands are then instantly
executed to preserve the same behavior, but in the following commit they will
be dispatched to the paint thread.

Note: RotatedBuffer's aren't thread safe and so a shallow copy needs to be made
for sending to the paint thread. This complicates the code for AdjustTo as it can
fail naturally and the buffer parameter changes are needed later in BeginPaint.
So the code for AdjustTo is split up a bit to accomodate that.

MozReview-Commit-ID: FwSwFay887o

--HG--
extra : rebase_source : 70dd8a055aaa13586810030978409d1a89c39081
extra : intermediate-source : f235b12eda6efe0bdec8e6590d813738f53ffe82
extra : source : cb6507b560aaad188fc83a47b664aaa5692a0acd
2017-10-25 10:20:49 -04:00
Ryan Hunt 1c5e585bd6 Simplify copying the front buffer to the back buffer (bug 1399692 part 5, r=bas)
To sync the back buffer with the front buffer, we set the back buffer rect and
rotation to the front buffer's, and then copy over the pixels that different.

We used to do the updating of the rect and rotation before BeginPaint, but that
isn't necessary and we can move it to be with the copying of pixels.

MozReview-Commit-ID: HzBKvMZkn1

--HG--
extra : rebase_source : 053e55df273d0d89327b80bc599ee05a020f6fef
extra : intermediate-source : 467532fd5b7a2385ba0dbdb9201e28e8f2b4a583
extra : source : 3d0da65640964e5a0565b5e7b7646cf719ce1449
2017-10-23 18:27:53 -04:00
Ryan Hunt 8348d444d0 Don't create back buffer for front buffer until we know what type to create. (bug 1399692 part 4, r=bas)
This commit is an optimization for double buffering that delays the creation of
a back buffer until we know what kind of content type it needs to be.

Before this commit, we would EnsureBackBufferIfFrontBuffer before BeginPaint,
then in BeginPaint we could determine that we actually needed a different kind
of buffer because the content changed type, and recreate it.

This was needed because BeginPaint would copy the old front buffer to the buffer
created by EnsureBackBufferIfFrontBuffer, and then if anything failed or we had
determined we couldn't reuse the buffer, we would create a new one and copy that
"temporary" back buffer over, and use the new one.

This is unnecessary because we only need read access on that "temporary" back
buffer, and so we can just use the current front buffer instead.

This optimization only affects the double buffered case, and the single buffered
or basic cases should remain the same.

Note: Because we now need the front buffer for copying into the new back buffer,
we cannot Clear() it away in some error cases.

Note: The code in FinalizeFrame assumes that the back and front buffer have the
same size. This was implicitly enforced before, and now needs to be explicitly
enforced. This commit tries to preserve the exact same behavior, although the
restriction should be removed as long as the back buffer is large enough for
the visible region.

MozReview-Commit-ID: 2hyrrUhA4zO

--HG--
extra : rebase_source : 5db62a4d24383c7d64e127880a3bee7ff76dada1
extra : intermediate-source : dce585be0737f3c9b6b241afb0851d85fb9453c9
extra : source : 926af2eca400cf8a16777813ceb586b1d3be7d68
2017-10-23 15:33:40 -04:00
Ryan Hunt 56b43edede Remove BufferContentType and add ValidBufferSize (bug 1399692 part 3, r=bas)
BufferContentType and BufferSizeOkFor make more sense as general functions for
any RotatedBuffer, and this helps out in a later patch.

MozReview-Commit-ID: EAVodvl4WTu

--HG--
extra : rebase_source : 122b6466ef0194d6ff682d677db01312c9e27a2a
extra : intermediate-source : b971c1aa5a78c17d49d1d64389516437024be72a
extra : source : b57a3f0d08478f094328b5a50c57eed35798fdf0
2017-10-23 14:56:13 -04:00
Ryan Hunt 37f9020f14 Simplify the code for creating a new back buffer (bug 1399692 part 2, r=bas)
MozReview-Commit-ID: D28JNYWD9Uc

--HG--
extra : rebase_source : 089014bebbf97af2eeb5b940cf468411b753c428
extra : intermediate-source : 8ba8bda8521a6460b1213d2d0f14ebefc0a3e14a
extra : source : 9fcb661df79e51c80f5ffb24717dba655dc97d73
2017-10-23 12:40:01 -04:00
Ryan Hunt c6550ebd1e Remove unneeded lambda capture in paint thread (bug 1399692 part 1, r=bas)
MozReview-Commit-ID: 71X22PHRTRz

--HG--
extra : rebase_source : 1d1016e48054c39a615c31880e4aa8a38f426bf0
extra : intermediate-source : 2c41a712dff22de4fb2bbfd7c5a418fbc3a26f11
extra : source : 744c8fabaa1c3e6b7322cd2b4c6672b8509c643c
2017-10-31 01:55:24 -04:00
sotaro a8b71fcd72 Bug 1415763 - Fix DXGIYCbCrTextureData as to deliver YUVColorSpace r=mattwoodrow 2017-11-10 18:15:54 +09:00
Andreea Pavel e1c8aba28f Merge mozilla-central to mozilla-inbound r=merge a=merge on a CLOSED TREE 2017-11-09 22:17:00 +02:00
Andreea Pavel 5e4025c975 Backed out 9 changesets (bug 1399692) for failing reftest/tests/layout/reftests/svg/dynamic-text-06.svg Windows 10 x64 Stylo Disabled debug R-e10s2 r=backout on a CLOSED TREE
Backed out changeset 7d9324e2ab34 (bug 1399692)
Backed out changeset 76bf99decf09 (bug 1399692)
Backed out changeset 0fc2414f146d (bug 1399692)
Backed out changeset f235b12eda6e (bug 1399692)
Backed out changeset 467532fd5b7a (bug 1399692)
Backed out changeset dce585be0737 (bug 1399692)
Backed out changeset b971c1aa5a78 (bug 1399692)
Backed out changeset 8ba8bda8521a (bug 1399692)
Backed out changeset 2c41a712dff2 (bug 1399692)
2017-11-09 21:55:32 +02:00
Kartikaya Gupta 54431ae212 Bug 1415225 - Add a couple of mochitests for event-regions overrides. r=botond
These two tests exercise the codepaths where an event regions override
is set on (a) the root layer of a layer tree and (b) on an in-process
subdocument. I verified that case (b) was failing with webrender enabled
without the patchset and passes now.

MozReview-Commit-ID: Kw6TQjNupSa

--HG--
extra : rebase_source : ce54c46c7d0470b693e82ae3e477b3702155e59d
2017-11-09 09:03:53 -05: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
Kartikaya Gupta 93ca1a3bc5 Bug 1415225 - Stop setting the EventRegionsOverride flag on root layers. r=botond,mattwoodrow
As with the previous patch, instead of setting the override on the root
layer, we set the flag on the nsDisplayListBuilder before building the
display list, and the flag automatically forces all event regions
display items to use their dispatch-to-content region instead of any
other regions.

Both the WebRender and non-WebRender codepaths were setting the override
flag on their root layers and don't need to any more.

MozReview-Commit-ID: 1cz0ahqwkOm

--HG--
extra : rebase_source : 3292951aca97fd1a355c2fae5b0ab42d2064c548
2017-11-09 09:03:52 -05:00
Kartikaya Gupta d5cf7941e2 Bug 1415225 - Remove dead code. r=jrmuizel
This code has been unused since the removal of layers-full WR codepaths.

MozReview-Commit-ID: JQn55Kbz5rr

--HG--
extra : rebase_source : af6995265c02a1ddfccbc37adb633bc2b240ec8b
2017-11-09 09:03:51 -05:00
Mats Palmgren 1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
David Anderson d3b572527a Don't fallback to DrawTargetCairo in TextureClient. (bug 1413862, r=mattwoodrow) 2017-11-08 16:57:25 -08:00
Ryan Hunt 6e900ce0c3 Don't reuse a back buffer after a swap if the content or surface changed (bug 1399692 part 9, r=bas)
MozReview-Commit-ID: HGAxkeyESbc

--HG--
extra : rebase_source : df5c404aaf3a613affadf4bfd77ca1fc3765f332
2017-11-05 10:38:47 -05:00
Ryan Hunt 4eab1ce94d Don't copy over regions that will be painted in this frame (bug 1399692 part 8, r=bas)
We do the same in FinalizeFrame, so we should do it here.

MozReview-Commit-ID: JTKDj8yrtI2

--HG--
extra : rebase_source : 9f900a4641df71a8da79a406cc89407a3553221f
extra : intermediate-source : de3aa5583481a3680e3d0cfdbe6b55916f0ef58a
extra : source : fb9b0524428307c4ee097894e37879339df47579
2017-11-04 14:52:31 -04:00
Ryan Hunt bd171d4d4c Replay buffer commands on paint thread when OMTP is enabled (bug 1399692 part 7, r=bas)
This commit does the work of actually dispatching the recorded buffer operations
to the paint thread, and removing some main thread asserts from TextureClient.

MozReview-Commit-ID: CN3RoQPz9fP

--HG--
extra : rebase_source : 9aeb3a727a930638aeb47a45a358769f1338d844
extra : source : e9349ad2f1f8fec862b1d2271d0d8f25ad0814d4
2017-10-26 00:47:17 -04:00
Ryan Hunt ae7878997b Record buffer operations to a struct for replaying on paint thread (bug 1399692 part 6, r=bas)
This commit adds a CapturedBufferState which is used to record all the operations
that are necessary for preparing the buffers. The commands are then instantly
executed to preserve the same behavior, but in the following commit they will
be dispatched to the paint thread.

Note: RotatedBuffer's aren't thread safe and so a shallow copy needs to be made
for sending to the paint thread. This complicates the code for AdjustTo as it can
fail naturally and the buffer parameter changes are needed later in BeginPaint.
So the code for AdjustTo is split up a bit to accomodate that.

MozReview-Commit-ID: FwSwFay887o

--HG--
extra : rebase_source : 376f9a7184bdce2cc405e4608d38b8505aafc2d6
extra : source : cb6507b560aaad188fc83a47b664aaa5692a0acd
2017-10-25 10:20:49 -04:00
Ryan Hunt fed0927bfd Simplify copying the front buffer to the back buffer (bug 1399692 part 5, r=bas)
To sync the back buffer with the front buffer, we set the back buffer rect and
rotation to the front buffer's, and then copy over the pixels that different.

We used to do the updating of the rect and rotation before BeginPaint, but that
isn't necessary and we can move it to be with the copying of pixels.

MozReview-Commit-ID: HzBKvMZkn1

--HG--
extra : rebase_source : a34e50a4d7664e3134f9da06b10f1908aa0d9d60
extra : source : 3d0da65640964e5a0565b5e7b7646cf719ce1449
2017-10-23 18:27:53 -04:00
Ryan Hunt 8a4c400778 Don't create back buffer for front buffer until we know what type to create. (bug 1399692 part 4, r=bas)
This commit is an optimization for double buffering that delays the creation of
a back buffer until we know what kind of content type it needs to be.

Before this commit, we would EnsureBackBufferIfFrontBuffer before BeginPaint,
then in BeginPaint we could determine that we actually needed a different kind
of buffer because the content changed type, and recreate it.

This was needed because BeginPaint would copy the old front buffer to the buffer
created by EnsureBackBufferIfFrontBuffer, and then if anything failed or we had
determined we couldn't reuse the buffer, we would create a new one and copy that
"temporary" back buffer over, and use the new one.

This is unnecessary because we only need read access on that "temporary" back
buffer, and so we can just use the current front buffer instead.

This optimization only affects the double buffered case, and the single buffered
or basic cases should remain the same.

Note: Because we now need the front buffer for copying into the new back buffer,
we cannot Clear() it away in some error cases.

Note: The code in FinalizeFrame assumes that the back and front buffer have the
same size. This was implicitly enforced before, and now needs to be explicitly
enforced. This commit tries to preserve the exact same behavior, although the
restriction should be removed as long as the back buffer is large enough for
the visible region.

MozReview-Commit-ID: 2hyrrUhA4zO

--HG--
extra : rebase_source : 2ddaa7d7d250475cf68524ad2151d8bcc7101013
extra : source : 926af2eca400cf8a16777813ceb586b1d3be7d68
2017-10-23 15:33:40 -04:00
Ryan Hunt acf6bf600e Remove BufferContentType and add ValidBufferSize (bug 1399692 part 3, r=bas)
BufferContentType and BufferSizeOkFor make more sense as general functions for
any RotatedBuffer, and this helps out in a later patch.

MozReview-Commit-ID: EAVodvl4WTu

--HG--
extra : rebase_source : 6b3406713414a5fe5c1ace6cd0db86c811557323
extra : source : b57a3f0d08478f094328b5a50c57eed35798fdf0
2017-10-23 14:56:13 -04:00
Ryan Hunt 94edce8cf6 Simplify the code for creating a new back buffer (bug 1399692 part 2, r=bas)
MozReview-Commit-ID: D28JNYWD9Uc

--HG--
extra : rebase_source : 96468353c813a9fa9b82f1ffe98ad87f70367a8b
extra : source : 9fcb661df79e51c80f5ffb24717dba655dc97d73
2017-10-23 12:40:01 -04:00
Ryan Hunt e325148fa6 Remove unneeded lambda capture in paint thread (bug 1399692 part 1, r=bas)
MozReview-Commit-ID: 71X22PHRTRz

--HG--
extra : rebase_source : e5fa03c7754b3e2a64ae2c6e2a4125bc1ba65303
extra : source : 744c8fabaa1c3e6b7322cd2b4c6672b8509c643c
2017-10-31 01:55:24 -04:00
David Anderson 7cac78cb17 Fix DataSourceSurface mapping in PaintCounter. (bug 1405390 part 4, r=bas)
--HG--
extra : rebase_source : c4bc6e8642f21098ce35a9a91dba5ca9d9369597
2017-11-09 00:43:31 -08:00
David Anderson 9575a22267 Remove trivial calls to DataSourceSurface::Stride. (bug 1405390 part 3, r=bas)
--HG--
extra : rebase_source : 7700599ef497a2abadc7970af5ea26b48061966e
2017-11-09 00:43:30 -08:00
David Anderson 32e1584385 Remove easily-removed cases of DataSourceSurface::GetData(). (bug 1405390 part 1, r=bas)
--HG--
extra : rebase_source : cc0d8001240efb530daa9845bc126e5026682340
2017-11-09 00:43:29 -08:00
Kartikaya Gupta c832839650 Bug 1411627 - Send the applied offset for sticky frames to WR. r=mstange
There are cases where we do a main-thread paint at a scroll position
where sticky offsets have been applied in order to keep sticky items
visually unmoving. From that paint, it's possible to do an async-scroll
in the direction that reduces the sticky offset. In order for WR to
handle this case properly we need to tell WR how much of a sticky offset
was already applied on the main thread.

MozReview-Commit-ID: 79DsfPpsIfA

--HG--
extra : rebase_source : e39316702cff3bd4ee6721c7503a1a9267734cd8
2017-11-07 10:16:48 -05:00
vincentliu a900bb5807 Bug 1413651 - Correct the chunk range to dealloc shmem when AllocChunk() fails to return. r=nical 2017-11-07 15:49:46 +08:00
sotaro e1d5eb970c Bug 1411472 - Backout because of test failures 2017-11-07 11:34:13 +09:00
Lee Salzman f11218633f Bug 1403198 - send font descriptors to WR instead of raw fonts where possible. r=jrmuizel
MozReview-Commit-ID: DYcaO3fE1fc
2017-11-06 20:19:46 -05:00
sotaro 4243be10df Bug 1411472 - Add support of PersistentBufferProviderShared r=nical 2017-11-07 09:31:58 +09:00
Andrew Osmond bda9d3294a Bug 1413011 - Allow the UI/chrome process to shutdown if the compositor thread failed to start. r=dvander
There are up to two compositor threads spawned - one in the GPU process
and one in the UI/chrome process. If the GPU process is used, then
failing to start the UI compositor thread is not fatal -- unless the GPU
process crashes too much and we fallback to the UI/chrome process. If
the GPU process compositor thread failed to start, then the GPU process
will crash and either restart, or fallback to the UI/chrome process
thread. If both fail, then Firefox crashes as expected.

Before we would not setup a content process properly unless the
UI compositor thread was active, even when using the GPU process. Now we
do, which allows the browser to be fully functional. Additionally when
shutting down, we ignore the lack of a compositor thread to permit a
graceful shutdown. In a future patch we will ideally we would not spawn
the compositor thread in a process until we actually need it, and
release assert on its failing to start.
2017-11-06 17:51:48 -05:00
David Anderson 32a0c40657 Don't treat resampled layers as entirely opaque. (bug 1412078, r=mattwoodrow) 2017-11-06 12:18:01 -08:00
James Willcox bc001da86a Bug 1413230 - Ensure we are attached to the GL context in SurfaceTextureHostOGL::PrepareTextureSource() r=jnicol,nical
MozReview-Commit-ID: BxDng9OG3RF
2017-11-06 09:30:13 -06:00
Ethan Lin 0d2b959f9f Bug 1410583 - Make sure we paint the whole item for blob image. r=jrmuizel
MozReview-Commit-ID: 84LiyRA2WFC

--HG--
extra : rebase_source : 769128dff81e4610decf2fbe53196a94e7857773
2017-11-06 16:51:16 +08:00
JerryShih ff87dafa78 Bug 1409176 - make SyncObjectD3D11Client become fallible. r=dvander
Currently, the device-reset flow doesn't notify the decoder for device change
immediately. The decoder might use an invalid sync-object for synchronization.
Then, we will hit some assertions.
This patch try to make the synchronization flow become fallible, then we could
pass the error to the media framework for error handling.

MozReview-Commit-ID: BFY32MmOdt0
2017-11-06 16:07:22 +08:00
Chris Peterson 84d577e4a4 Bug 1412048 - Remove NS_RUNTIMEABORT. r=froydnj
Use MOZ_CRASH, MOZ_CRASH_UNSAFE_OOL, or MOZ_CRASH_UNSAFE_PRINTF instead.

MozReview-Commit-ID: 1kCCHMlgbGP

--HG--
extra : rebase_source : 2f07ced16bccebf30cd3b2b5fea35e9868d32dad
extra : source : 0bf2c8425b828e71de55dd175fd0dad635b4e67d
2017-10-24 23:41:15 -07:00
NARCIS BELEUZU 582e5ff6cf Merge mozilla-central to inbound. r=merge a=merge on CLOSED TREE 2017-11-03 15:23:15 +02:00
NARCIS BELEUZU 3543cada7e Backed out 7 changesets (bug 1399692) failing on browser chrome browser/base/content/test/performance/browser_urlbar_search_reflows.js
Backed out changeset e9349ad2f1f8 (bug 1399692)
Backed out changeset cb6507b560aa (bug 1399692)
Backed out changeset 3d0da6564096 (bug 1399692)
Backed out changeset 926af2eca400 (bug 1399692)
Backed out changeset b57a3f0d0847 (bug 1399692)
Backed out changeset 9fcb661df79e (bug 1399692)
Backed out changeset 744c8fabaa1c (bug 1399692)
2017-11-03 14:32:46 +02:00
NARCIS BELEUZU ca445d6992 Backed out changeset fac6f595967b (bug 1399692) 2017-11-03 14:29:10 +02:00
Andrew Osmond 919f128d84 Bug 1408532 - Ensure ImageBridgeParent cleans up old actors if the process ID is reused. r=dvander 2017-11-03 07:49:18 -04:00
NARCIS BELEUZU 2e3654a915 Merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-11-03 12:04:55 +02:00
sotaro 9bdbc201fd Bug 1408421 - Improving throttling GenerateFrame() r=jrmuizel 2017-11-03 11:22:28 +09:00
NARCIS BELEUZU a6cf88a4bf Merge mozilla-central to inbound. r=merge a=merge on CLOSED TREE 2017-11-03 12:22:35 +02:00
sotaro 551a052a4a Bug 1410766 - Re-acquireDevices in gpu process when SimulateDeviceReset() is called r=dvander 2017-11-03 17:06:37 +09:00
sotaro bce40231ea Bug 1390741 - Use BasicCompositor if widget type does not support acceleration r=aosmond,kats 2017-11-03 16:38:34 +09:00
Francois Marier 7821a2719e Bug 1411450 - Add the protobuf version to LayerScopePacket.proto. r=mattwoodrow
This is essentially a no-op but it does silence the following warning
whenever the *.pb.* files are re-generated:

[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: LayerScopePacket.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)

MozReview-Commit-ID: 6L1TXHLcjsj

--HG--
extra : rebase_source : c88211414242c921eeefec27476c4a52e6c0974a
2017-10-26 16:15:30 -07:00
Jamie Nicol cc72c8cff9 Bug 1413693 - Ensure data copied from discarded front buffer isn't also painted. r=mstange
Bug 1092294 introduced a regression in to the code to copy from
the discarded front buffers to the new backbuffers in
SingleTiledContentClient. The aim was to ensure that if locking the
the frontbuffers failed, meaning the region could not be copied, that it
would be painted instead. However due to incorrect logic the
region would both be copied and painted in cases where
there was no onWhite buffers.

To fix this we take both locks (frontLock, and frontOnWhiteLock if
required) up front, so that we either copy both buffers or neither.

MozReview-Commit-ID: 3iepOuweruk

--HG--
extra : rebase_source : 2e2f951c3315f2809191f43a9d5ec4a939c82724
2017-11-02 11:46:08 +00:00
Phil Ringnalda e0e1cf4354 Backed out 4 changesets (bug 1406327) for crashing other tests, crashing itself, and assertion failures
Backed out changeset 471c710b19b1 (bug 1406327)
Backed out changeset 5890bb3a0d97 (bug 1406327)
Backed out changeset 63c8ee57e38c (bug 1406327)
Backed out changeset 345972733daa (bug 1406327)

MozReview-Commit-ID: IwWx11QSuS4
2017-11-01 21:44:12 -07:00
Daosheng Mu a04c759f89 Bug 1406327 - Part 1: Shutdown VR listener thread when no VR content in seconds; r=dvander,kip
MozReview-Commit-ID: AnYJT8WBkI7

--HG--
extra : rebase_source : fff277f9801760fa00261283fbc1ca42b59a8fd8
2017-10-26 16:51:14 +08:00
Andrew Osmond 2e03149cc0 Backed out changeset d84ea38d6fd0 (bug 1399453) because the annotations are no longer needed. 2017-11-01 13:34:43 -04:00
Ryan Hunt c6d2561056 Mark ShallowCopy as override to fix bustage (bug 1399692, r=me)
MozReview-Commit-ID: 2LIxzNFrcA3

--HG--
extra : rebase_source : dab0937161a2ffa15e48cf0273a714cf10b35443
extra : amend_source : bc6b97ea306b5351535f9b0e7e399fa6f545683b
2017-11-02 17:43:52 -04:00
Ryan Hunt 153dbb56d7 Replay buffer commands on paint thread when OMTP is enabled (bug 1399692 part 7, r=bas)
This commit does the work of actually dispatching the recorded buffer operations
to the paint thread, and removing some main thread asserts from TextureClient.

MozReview-Commit-ID: CN3RoQPz9fP

--HG--
extra : rebase_source : c14b9da390e88907e184409404c5c21b5fe23dff
2017-10-26 00:47:17 -04:00
Ryan Hunt 37542c54f7 Record buffer operations to a struct for replaying on paint thread (bug 1399692 part 6, r=bas)
This commit adds a CapturedBufferState which is used to record all the operations
that are necessary for preparing the buffers. The commands are then instantly
executed to preserve the same behavior, but in the following commit they will
be dispatched to the paint thread.

Note: RotatedBuffer's aren't thread safe and so a shallow copy needs to be made
for sending to the paint thread. This complicates the code for AdjustTo as it can
fail naturally and the buffer parameter changes are needed later in BeginPaint.
So the code for AdjustTo is split up a bit to accomodate that.

MozReview-Commit-ID: FwSwFay887o

--HG--
extra : rebase_source : 3e8b49d5931d853857dd1b2eeff914465251f613
2017-10-25 10:20:49 -04:00
Ryan Hunt 12cec070ad Simplify copying the front buffer to the back buffer (bug 1399692 part 5, r=bas)
To sync the back buffer with the front buffer, we set the back buffer rect and
rotation to the front buffer's, and then copy over the pixels that different.

We used to do the updating of the rect and rotation before BeginPaint, but that
isn't necessary and we can move it to be with the copying of pixels.

MozReview-Commit-ID: HzBKvMZkn1

--HG--
extra : rebase_source : b5f5a0c46c225b8d2fbdd1891a16f3c0812382eb
2017-10-23 18:27:53 -04:00
Ryan Hunt cf8f4842ac Don't create back buffer for front buffer until we know what type to create. (bug 1399692 part 4, r=bas)
This commit is an optimization for double buffering that delays the creation of
a back buffer until we know what kind of content type it needs to be.

Before this commit, we would EnsureBackBufferIfFrontBuffer before BeginPaint,
then in BeginPaint we could determine that we actually needed a different kind
of buffer because the content changed type, and recreate it.

This was needed because BeginPaint would copy the old front buffer to the buffer
created by EnsureBackBufferIfFrontBuffer, and then if anything failed or we had
determined we couldn't reuse the buffer, we would create a new one and copy that
"temporary" back buffer over, and use the new one.

This is unnecessary because we only need read access on that "temporary" back
buffer, and so we can just use the current front buffer instead.

This optimization only affects the double buffered case, and the single buffered
or basic cases should remain the same.

Note: Because we now need the front buffer for copying into the new back buffer,
we cannot Clear() it away in some error cases.

MozReview-Commit-ID: 2hyrrUhA4zO

--HG--
extra : rebase_source : 8eb7f992758d2e1db47eb88fe8d31651b335be6d
2017-10-23 15:33:40 -04:00
Ryan Hunt f7fab34fd0 Remove BufferContentType and add ValidBufferSize (bug 1399692 part 3, r=bas)
BufferContentType and BufferSizeOkFor make more sense as general functions for
any RotatedBuffer, and this helps out in a later patch.

MozReview-Commit-ID: EAVodvl4WTu

--HG--
extra : rebase_source : 22c004e81257bf2d31438972c17b7b4f61532b23
2017-10-23 14:56:13 -04:00
Ryan Hunt f3f6dc6284 Simplify the code for creating a new back buffer (bug 1399692 part 2, r=bas)
MozReview-Commit-ID: D28JNYWD9Uc

--HG--
extra : rebase_source : e494a32dcef12baac681f2140eea81339392d333
2017-10-23 12:40:01 -04:00
Ryan Hunt 44b97f79ca Remove unneeded lambda capture in paint thread (bug 1399692 part 1, r=bas)
MozReview-Commit-ID: 71X22PHRTRz

--HG--
extra : rebase_source : c31d3ad296359af32d528e03a65d744211aac7be
2017-10-31 01:55:24 -04:00
Csoregi Natalia 423b2522c4 Merge inbound to mozilla-central r=merge a=merge 2017-11-01 12:14:00 +02:00
sotaro 3aac464b5a Bug 1408490 - Fix reinitRendering for deviceReset r=dvander 2017-11-01 11:58:10 +09:00
Sebastian Hengst 7a0f790c30 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4CDH6A5NT2U
2017-11-01 00:36:12 +01:00
Ryan Hunt 4371a10ca6 Add profiler markers for painting on the paint thread. (bug 1412951, r=mstange)
The following commits added the necessary tracking to ensure we always end
a profiler marker when we start one, and this just plugs them in.

MozReview-Commit-ID: C5VXpnlH2QA

--HG--
extra : rebase_source : 832c8abdef45e0a9bbb71bbf105fe4a76d0eb60d
2017-10-30 14:48:16 -04:00
Ryan Hunt 27d35624ce Track when we start and finish painting a layer transaction. (bug 1412951, r=dvander)
This commit adds instrumentation and some asserting to track a "paint group",
which is essentially the first PaintThread::AsyncPaintContents until
PaintThread::AsyncEndLayerTransaction.

I didn't add an AsyncBeginLayerTransaction and use that to start a "paint group"
as I think it makes sense to not have a paint marker if we don't do
any painting.

MozReview-Commit-ID: AlSsUUF5ZOH

--HG--
extra : rebase_source : 84d9feaf5aac39fb9ce32984efda704fa2a68838
2017-10-30 14:49:58 -04:00
Ryan Hunt 71996a3966 Be sure to call EndLayerTransaction if there are queued paints. (bug 1412951, r=dvander)
I believe this is the only case where we miss calling EndLayerTransaction,
but still had queued async paints. This wasn't an issue before, because
the following transaction would then do the synchronization. But I'd
like to use EndLayerTransaction for a profiler mark, so we should call
it unconditionally.

MozReview-Commit-ID: 9rUXBzCZaLO

--HG--
extra : rebase_source : ba360f2451190cf38745121d4dc32f4ed8d1bfe2
2017-10-30 13:44:59 -04:00
Kartikaya Gupta 3a399cf5e5 Bug 1412280 - Update sticky code for API change in WR PR 1940. r=jrmuizel
MozReview-Commit-ID: 2I8wpe3Bt1y

--HG--
extra : rebase_source : 5056aee8978c9bd5c51724ec909125de318f04ad
2017-10-31 09:17:22 -04:00
Chris Peterson 73037a0f6a Bug 1412048 - Replace NS_RUNTIMEABORT(var) with MOZ_CRASH_UNSAFE_OOL(var). r=froydnj data-review=francois
And remove unreachable code after MOZ_CRASH_UNSAFE_OOL().

MOZ_CRASH_UNSAFE_OOL causes data collection because crash strings are annotated to crash-stats and are publicly visible. Firefox data stewards must do data review on usages of this macro. However, all the crash strings this patch collects with MOZ_CRASH_UNSAFE_OOL are already collected with NS_RUNTIMEABORT.

MozReview-Commit-ID: IHmJfuxXSqw

--HG--
extra : rebase_source : 031f30934b58a7b87f960e57179641d44aefe5c5
extra : source : fe9f638a56a53c8721eecc4273dcc074c988546e
2017-10-24 23:38:38 -07:00
Chris Peterson 1df202b177 Bug 1412048 - Replace NS_RUNTIMEABORT("...") with MOZ_CRASH("..."). r=froydnj
And remove unreachable code after MOZ_CRASH().

MozReview-Commit-ID: 6ShBtPRKYlF

--HG--
extra : rebase_source : 0fe45a59411bda663828336e2686707b550144ae
extra : source : 8473fd7333d2abe1ea1cc176510c292a5b34df45
2017-10-24 23:30:31 -07:00
Attila Craciun 2ae920762e Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-10-31 12:53:23 +02:00
Sebastian Hengst 2470a9a87b merge mozilla-central to autoland. r=merge a=merge 2017-11-01 00:38:25 +01:00
Sebastian Hengst f07fc93141 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4PW6ESqLL73
2017-10-30 23:52:23 +01:00
Andrew Osmond 95ee90ca7f Bug 1331944 - Part 8. Add plumbing to use shared surfaces if available in WebRenderImageData. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond c505acd7e7 Bug 1331944 - Part 7. Handle shared surfaces in WebRenderBridgeParent::AddExternalImage. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond 74f4713f93 Bug 1331944 - Part 6. Expand SharedSurfacesChild to support sharing ImageContainers directly. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond c38ef911b1 Bug 1331944 - Part 5. Integrate SharedSurfacesParent with the WebRender texture cache. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond d9e413fa5a Bug 1331944 - Part 2. Add SharedSurfacesParent/Child to manage shared surfaces. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond b8f42d8fa2 Bug 1331944 - Part 1. Add SourceSurfaceSharedDataWrapper and SourceSurfaceSharedData::HandleLock. r=jrmuizel 2017-10-30 13:10:28 -04:00
Jeff Gilbert 4f2cae0384 Bug 1395497 - Add AndroidSurfaceTexture support to GLBlitHelper. - r=snorp
MozReview-Commit-ID: JttqOoDCE4O
2017-10-30 10:58:56 -05:00
James Willcox 1ee57ae7a7 Bug 1395497 - Create SurfaceTexture in detached state, attach on first use r=jgilbert
MozReview-Commit-ID: HfkEUH9aiBo
2017-10-30 10:58:56 -05:00
Ryan Hunt 32261e72c6 Be sure to invalidate the buffer when content changes and we cannot reuse the buffer. (bug 1412150, r=nical)
Even if we cannot reuse the back buffer, we still use it to initialize the new back buffer.
The correct condition for detecting changes to buffer mode should only care if there is a
buffer, not if we decided to reuse it.

If the buffer mode has changed to component alpha, we need to invalidate and repaint everything
because we won't be able to copy over content to the new buffer correctly.

I believe this is a regression from the refactoring that created this function from
RotatedContentBuffer::BeginPaint.

MozReview-Commit-ID: H9G7GxqekLt

--HG--
extra : rebase_source : afb3321694ce3f1b54ad4dce28b4a7c7c7b47904
extra : amend_source : fdef1994514fcc9b9f2e952767a785841e9ddda0
extra : histedit_source : 3e8324255f516094c242ab3ec0688d2285c85a99
2017-10-28 15:21:13 -05:00
Jamie Nicol 21b5b6db95 Bug 1092294 - Use SurfaceTextures for painted content on android (preffed off). r=nical,snorp
Add a new TextureClientData type, AndroidNativeWindowTextureData,
backed by a SurfaceTexture in single-buffer mode. It uses the
NativeWindow API, which provides producer-side access to the buffer.
This provides a DrawTarget which can be used to paint directly in to
the SurfaceTexture, which can then be composited using a SurfaceTextureHost.

Due to API restrictions it is not possible to read from a NativeWindow
while the corresponding SurfaceTexture has ownership of the
buffer. TiledContentClient now handles that by painting the additional
region that it cannot copy from the front buffer, if required.

MozReview-Commit-ID: 1NZq6MQqwFq

--HG--
extra : rebase_source : 9d1db721d4892f3df033d43127489a85421e8863
2017-10-28 11:59:58 +01:00
Ethan Lin a20e5ebfaa Bug 1407938 - Part2. Extract paint function for filter and svg wrapper. r=jrmuizel
MozReview-Commit-ID: CQpBdZapFH2

--HG--
extra : rebase_source : 1741e12c9f09596c27219ca2b3ce5c3923145593
2017-10-16 16:26:15 +08:00
Ethan Lin 1da48a5cc4 Bug 1407938 - Part1. Add nsDisplaySVGWrapper for webrender as a fallback display item. r=jrmuizel
MozReview-Commit-ID: LBjrqvPziCJ

--HG--
extra : rebase_source : 4f48e0c57a7170bd1d6e97cc6b426aa0cf81be4b
2017-10-16 15:47:46 +08: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
Daniel Holbert de4b2b1c8b Bug 1412427 part 7: Manually fix up a few non-standard quirks in mode lines & MPL text, in gfx source files. r=jrmuizel
MozReview-Commit-ID: JgK3UhG20kn

--HG--
extra : rebase_source : 2677c73948463f84eeafc4895697dbdcd5fccae4
2017-10-27 15:55:40 -07:00
Daniel Holbert 3b352c7239 Bug 1412427 part 6: Remove stray "//" prefix before first line of MPL boilerplate comment, in some gfx source files. r=jrmuizel
This patch was automatically generated. I found the files to be fixed in this
patch with the following command:
grep -r "//  \* This Source Code" gfx

...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
####
old="//  \* This Source Code Form is subject to the terms of the Mozilla Public"
new=" \* This Source Code Form is subject to the terms of the Mozilla Public"
sed -i s%"^$old"%"$new"% $1
####

MozReview-Commit-ID: Ihx0EAOkT2g

--HG--
extra : rebase_source : 4dc97f234495e3ec1f4904e91d43d00fd3810626
2017-10-27 15:55:38 -07:00
Daniel Holbert ecf5ee687e Bug 1412427 part 4: Indent under-indented MPL boilerplate comments by 1 space, for consistency & alignment. (whitespace-only) r=jrmuizel
This patch was automatically generated. I found the files to be fixed in this
patch with the following command:
grep -r "^\* This Source Code" gfx

...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
###
line1="\* This Source Code Form is subject to the terms of the Mozilla Public"
line2="\* License, v\. 2\.0\. If a copy of the MPL was not distributed with this"
line3="\* file, You can obtain one at http://mozilla\.org/MPL/2\.0/\. \*/"

# Insert 1 space at beginning:
sed -i s%"^$line1"%" $line1"% $1
sed -i s%"^$line2"%" $line2"% $1
sed -i s%"^$line3"%" $line3"% $1
###

MozReview-Commit-ID: HXBMrfnhlVr

--HG--
extra : rebase_source : de4c78563711f8366e2978c5199a5041875fbe38
2017-10-27 15:55:37 -07:00
Daniel Holbert 0aa7ac8984 Bug 1412427 part 2: Move vim mode line below emacs mode line in a few gfx files, for consistency. r=jrmuizel
This patch doesn't modify the mode lines at all -- it just swaps their order,
and makes each one its own C++ comment, separate from the MPL boilerplate
comment.

MozReview-Commit-ID: BEZJVj2sMuK

--HG--
extra : rebase_source : 9e0946c8a8d0b67c11b5932b9d1e51e0e6e8ebef
2017-10-27 15:55:37 -07:00
Daniel Holbert 976e9f7e7f Bug 1412427 part 1: Add standard mode line & MPL boilerplate to a few gfx C++ files that are missing it entirely. r=jrmuizel
I copied the boilerplate comment directly from the Coding Style MDN page:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

MozReview-Commit-ID: 8rO6SfBIaRl

--HG--
extra : rebase_source : 90093621cbaa2a62b19e22b0eacad600fc586560
2017-10-27 15:55:37 -07:00
Coroiu Cristina 9ca76dcb7a Backed out changeset b7a07167905c::2932c914e223 (bug 1406327) for failing in dom/vr/test/mochitest/test_vrController_displayId.html r=backout a=backout on a CLOSED TREE
Backed out changeset 2932c914e223 (bug 1406327)
Backed out changeset cfbc6262a064 (bug 1406327)
Backed out changeset b7a07167905c (bug 1406327)
2017-10-30 14:51:52 +02:00
Coroiu Cristina de62a69e14 Merge inbound to mozilla-central r=merge a=merge 2017-10-30 12:16:47 +02:00
JerryShih 5b15c33523 Bug 1399389 - redirect the warn/error message to gfx_critical_error/note in WR. r=kvark
MozReview-Commit-ID: Fxkz3Fq96Tb
2017-10-30 11:31:38 +08:00
Kartikaya Gupta e943be52e0 Bug 1413229 - Stop calling CreateWebRenderCommands for event regions types. r=jrmuizel
These items don't paint anything and are handled separately, so we don't need
to call CreateWebRenderCommands for them. We could just implement
CreateWebRenderCommands for the item and have it return true unconditionally,
but it's still an extra virtual call. Plus there's existing code in
WebRenderCommandBuilder that's conditioned specifically for event regions so
I prefer keeping all the conditioned code together.

MozReview-Commit-ID: 5kTuv7qgiKU

--HG--
extra : rebase_source : 8bd1a3fdf6711d06ff7523a25324da3a170215a3
2017-10-31 12:07:23 -04:00
sotaro 23069babc9 Bug 1401609 - Add UpdateWebRenderCanvasData() to handle CanvasRenderer re-creation r=jrmuizel,mstange 2017-10-28 19:07:27 +09:00
Sebastian Hengst 831f2ed98f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: oIdBL7fmlE
2017-10-28 10:31:58 +02:00
sotaro 4461b5e90f Bug 1408573 - Change buffer allocation to fallible r=nical 2017-10-28 07:30:13 +09:00
Jeff Muizelaar ed62b1d4a1 Bug 1380014. Share fonts with WebRender. r=lsalzman
This changes the serialization format a little bit.
We now have an index at the end of the blob. This
is currently used to store a list of the used font keys.
In the future we'll add rects and can use it for invalidation.
2017-10-27 18:21:27 -04:00
Jeff Muizelaar 2922532654 Bug 1380014. Expose GetFontKeyForUnscaledFont. r=lsalzman
We'll use this to share fonts with BlobImages
2017-10-27 18:21:25 -04:00
sotaro 9ddfb11820 Bug 1412246 - Fix memory leak with WebRenderLayerManager::EndEmptyTransaction() r=nical 2017-10-28 06:54:56 +09:00
Kartikaya Gupta e7b42ecace Bug 1411249 - Handle yet more clipping cases. r=mstange
This extends the fix in bug 1373802 to account for extra levels of
display item nesting. If those extra intermediate display items don't
push any clips we still want to pick up the ClipAndScroll from the
enclosing ancestor that has it.

MozReview-Commit-ID: AmxRz4fBKnX

--HG--
extra : rebase_source : ae12a9f797ab201169ff199d0d42a29df51ee1cb
2017-10-27 13:22:16 -04:00
Kartikaya Gupta 3d6ab7288b Bug 1373802 - Handle more clipping cases. r=mstange
We already support cases where we have scrolling clips applied to fixed
items. However if we had to build nested clips inside those items, then
those nested clips would not properly inherit from the scrolling clips.
This patch addresses that case.

MozReview-Commit-ID: CWp1x0EsyaP

--HG--
extra : rebase_source : f8c80ace2da39edebaabd5339670a68038a18489
2017-10-27 11:41:37 -04:00
Kartikaya Gupta b7e231bc45 Bug 1410777 - Force a full transaction for WR when the window overlay changes. r=mstange
The window buttons are drawn as part of the AddWindowOverlayWebRenderCommands
function which is invoked in the full-transaction codepath. It should be possible
to have the empty transaction codepath simply update the image (without building
a full WR display list) and do a recomposite. That would be more performant but
it requires some plumbing to build and ship across a IpcResourceUpdateQueue on
empty transactions.

MozReview-Commit-ID: 2Mrb0wELD6E

--HG--
extra : rebase_source : 9a94c32f94403050835bf3445176f4fe2c1579fa
2017-10-26 14:17:19 -04:00
Kartikaya Gupta 75717cb048 Bug 1410777 - Remove unused function and dead code left over from the layers-full WR days. r=mstange
This is functionally unrelated to the bug but I noticed it while fiddling with
the code, and the lines affected are kind of intertwined with the next patch so
I'm just doing the code removal as part of this bug.

MozReview-Commit-ID: CwmluhyCdbR

--HG--
extra : rebase_source : 0a86ba7299f63587b77c44fadc804e34ada5a474
2017-10-26 14:17:18 -04:00
Boris Chiou 0576efed8c Bug 1340005 - Part 7: Switch compositor animations to Servo backend for desktop. r=birtles,hiro,nical
We want to always use Servo animation backend on the compositor.
However, Android doesn't support Stylo now, so add a defined flag for it.

MozReview-Commit-ID: 63MnTBnq6yv

--HG--
extra : rebase_source : dce46737f81e4e217e9fd67b6bec722994dca6a2
2017-10-27 21:13:27 +02:00
Boris Chiou 3788926119 Bug 1340005 - Part 6: Move AppendTransformFunction into AnimationValue struct. r=birtles
MozReview-Commit-ID: KhjKXxkllEF

--HG--
extra : rebase_source : 6f22a5f0a90f3f3d160f64c67e6fd6d04a2c1441
2017-10-17 13:11:19 +08:00
Boris Chiou 387cd4d8a1 Bug 1340005 - Part 5: Implement SampleValue for Servo backend. r=birtles
Use the new added FFI, Servo_ComposeAnimationSegment, to compose an
animation segment from Servo backend on the compositor.

MozReview-Commit-ID: LNgpCSIlDl9

--HG--
extra : rebase_source : 5b5c145fae877b4f4b01ea54259737dc9dad2951
2017-10-27 21:09:11 +02:00
Boris Chiou 0129bb4f52 Bug 1340005 - Part 4: Retrieve transform list from AnimationValue. r=birtles
MozReview-Commit-ID: 82NAOBV2rEl

--HG--
extra : rebase_source : 073ff742dcea4573febeec3b57c60b0f1f5736e2
2017-09-25 14:25:43 +08: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
Boris Chiou 7086921688 Bug 1340005 - Part 2: Implement AnimationValue::Transform. r=birtles
MozReview-Commit-ID: BDKcpDIM9nb

--HG--
extra : rebase_source : 43a5e7f053d746198f422487f7e19f535ccd9dc5
2017-10-27 21:06:30 +02:00
Boris Chiou 701609334e Bug 1340005 - Part 1: Implement AnimationValue::Opacity. r=birtles
We will use Servo backend on the compositor, so implement this for opacity.

MozReview-Commit-ID: BeWR2nBSbjb

--HG--
extra : rebase_source : eb5db3cf04640a83f13857984e792a949f26bcc7
2017-10-27 21:04:52 +02:00
Sebastian Hengst 443416f881 Merge mozilla-central to autoland. r=merge a=merge 2017-10-26 00:39:55 +02:00
Kartikaya Gupta cf3b87c06e Bug 1410527 - Update how we tell WR about position:sticky elements. r=mstange
My original understanding of the API was flawed, and so while I had
position:sticky working in some cases it didn't work properly in a lot
of other cases. This patch corrects the usage of the API to match what
WR is expecting and fixes a lot of test cases.

MozReview-Commit-ID: AdMux19Fk9U

--HG--
extra : rebase_source : e7f970a710b2079501a91eeeac8c292b603210dc
2017-10-25 15:21:32 -04:00
Kartikaya Gupta bec5f23434 Bug 1411238 - Make APZ test logging work in layers-free WR mode. r=botond
Most of this change is just fiddling with function signatures so that they take
a LayerManager* instead of a Layer* (or in some cases, both). This allows
the WebRender codepaths to pass a WebRenderLayerManager* instead of having to
produce a Layer* which it doesn't have.

MozReview-Commit-ID: Fb0C8OUVDin

--HG--
extra : rebase_source : e4c3324cfa20c295db85d5c09df8d8d77865bb6a
2017-10-25 13:22:04 -04:00
Kartikaya Gupta 4c7c7873e4 Bug 1411238 - Make OMTA queries work with layers-free webrender. r=mtseng
MozReview-Commit-ID: Jq57GtjNO3E

--HG--
extra : rebase_source : 15c2e3a4acbc61c60827bf1748ef691f2275fb66
2017-10-25 11:14:41 -04:00
Attila Craciun 7bcf901c3b Merge inbound to mozilla-central r=merge a=merge 2017-10-25 12:30:28 +03:00
Jeff Muizelaar faa4cd1783 Bug 1410550. Allow updating a dirty rect of a blob image. r=kats 2017-10-24 18:11:04 -04:00
Kartikaya Gupta d37fe26642 Bug 1405359 - Add some logging code in ScrollingLayersHelper. r=jrmuizel
MozReview-Commit-ID: Lb4UeUxO5HL

--HG--
extra : rebase_source : e5e8c58380055693664bb1a5241bab4d803dfdab
2017-10-24 18:47:24 -04:00
Kartikaya Gupta 4891a7a56f Bug 1405359 - Avoid pushing and popping identical clip stacks for adjacent display items. r=jrmuizel
Instead of unconditionally pushing and popping clips per display item,
this patch changes things so that for each recursive display list, we
create an ItemClips struct. We push this onto the stack when we enter
the display list, and pop it off at the end. For each display item, we
check to see if the clips would actually change compared to the previous
display item, and only do the pop/repush in that case.

MozReview-Commit-ID: J0MCc2V9hWT

--HG--
extra : rebase_source : 8617cfaa7391457867f01c1b619cb871a21bf3f5
2017-10-24 18:47:17 -04:00
Kartikaya Gupta 746bb09454 Bug 1405359 - Make ScrollingLayersHelper a more stateful class. r=jrmuizel
This makes ScrollingLayersHelper a non-RAII type class, and instead adds
methods to notify it of when we start processing a new transaction or a
new display item within the transaction. This patch has no functional
changes, it's non-obvious refactoring.

MozReview-Commit-ID: GEZzCGbVqB1

--HG--
extra : rebase_source : dd4fab7f34da7c5465ba474db670cf583e8dadf4
2017-10-24 18:46:44 -04:00
Kartikaya Gupta 4aa9c4885f Bug 1405359 - Replace the mPushed* variables with a more encapsulated struct. r=jrmuizel
Storing the per-item clip state in a struct like this will allow us to
easily compare the desired clip state across items, so we can avoid
doing unnecessary work when going from one item to the next. This patch
has no functional changes, it's just refactoring.

MozReview-Commit-ID: GX2FX4YDusO

--HG--
extra : rebase_source : 06d7bae5cbae99d2987881f26f7ebd26965c1799
2017-10-24 18:45:28 -04:00
Kartikaya Gupta ead1f0c769 Bug 1405359 - Stop passing around the clip id cache in all the functions. r=jrmuizel
Instead just keep a ref to it as a member variable. No functional
change.

MozReview-Commit-ID: 9jSBdZRIGuV

--HG--
extra : rebase_source : cd1b2f500e9a833f7d42bce53bdaec2118e0d4c3
2017-10-24 18:45:04 -04:00
Sebastian Hengst 6231274042 Backed out changeset cb49e178390c (bug 1405359) for Windows build bustage in ScrollingLayersHelper.h. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 81b0a5bd94ad8e5d83e455e5a226a578b7060dc4
2017-10-25 00:17:01 +02:00
Sebastian Hengst 1d775e1d29 Backed out changeset f6ce05f8e699 (bug 1405359) 2017-10-25 00:16:55 +02:00
Sebastian Hengst c10fc4a634 Backed out changeset 154c415885b8 (bug 1405359) 2017-10-25 00:16:49 +02:00
Sebastian Hengst eecd8d4a11 Backed out changeset 988d6a397ea8 (bug 1405359) 2017-10-25 00:16:43 +02:00
Sebastian Hengst 5a6323a88c Backed out changeset 1593dfc4cf04 (bug 1405359) 2017-10-25 00:16:37 +02:00
Kartikaya Gupta 0950c9499b Bug 1405359 - Add some logging code in ScrollingLayersHelper. r=jrmuizel
MozReview-Commit-ID: 3OLNPHlkO9M

--HG--
extra : rebase_source : dcfbae96dc8de0a5d726140a05b5807e2b03412d
2017-10-24 16:15:00 -04:00
Kartikaya Gupta 3bc78496af Bug 1405359 - Avoid pushing and popping identical clip stacks for adjacent display items. r=jrmuizel
Instead of unconditionally pushing and popping clips per display item,
this patch changes things so that for each recursive display list, we
create an ItemClips struct. We push this onto the stack when we enter
the display list, and pop it off at the end. For each display item, we
check to see if the clips would actually change compared to the previous
display item, and only do the pop/repush in that case.

MozReview-Commit-ID: GadIp2J8TrA

--HG--
extra : rebase_source : ba64c6b4659b8e51cab19b807088b9a50d71b85a
2017-10-24 16:15:00 -04:00
Kartikaya Gupta 1ef110fd03 Bug 1405359 - Make ScrollingLayersHelper a more stateful class. r=jrmuizel
This makes ScrollingLayersHelper a non-RAII type class, and instead adds
methods to notify it of when we start processing a new transaction or a
new display item within the transaction. This patch has no functional
changes, it's non-obvious refactoring.

MozReview-Commit-ID: 3yq9sPiHMge

--HG--
extra : rebase_source : 286423f56de59211e320f015cb1004a1e98332b8
2017-10-24 16:15:00 -04:00
Kartikaya Gupta 7feb6820bd Bug 1405359 - Replace the mPushed* variables with a more encapsulated struct. r=jrmuizel
Storing the per-item clip state in a struct like this will allow us to
easily compare the desired clip state across items, so we can avoid
doing unnecessary work when going from one item to the next. This patch
has no functional changes, it's just refactoring.

MozReview-Commit-ID: 49B6hmsWZ4V

--HG--
extra : rebase_source : 8ac4bbf039f81bc2d26e92924ed041fa3d18e5ba
2017-10-24 16:15:00 -04:00
Kartikaya Gupta b43a3f46dc Bug 1405359 - Stop passing around the clip id cache in all the functions. r=jrmuizel
Instead just keep a ref to it as a member variable. No functional
change.

MozReview-Commit-ID: 5fccUlSifsA

--HG--
extra : rebase_source : a14672f926c383354db76e553ae23613fe4a432a
2017-10-24 16:14:59 -04:00
Kartikaya Gupta 54a6b4655a Bug 1409446 - Remove old code that is now unused. r=mstange
MozReview-Commit-ID: KEtcbIGTrn3

--HG--
extra : rebase_source : dd2a435cab15930b7d5277d1764eddefd4cca298
2017-10-24 15:46:00 -04:00
Kartikaya Gupta 1dc275308d Bug 1409446 - Switch over to the new code. r=mstange
One of the sticky-pos tests was only passing because of two wrongs that
cancelled each other out in the old code. Specifically, instead of
defining a nested clip with the sticky clip as an ancestor, the clip was being
defined with the root ASR as an ancestor. Both resulted in the nested
clip not scrolling with the actual scrolling scrollframe and so the test
was passing.

The new code changes things so that the nested clip is defined with the
actual scrolling scrollframe as the ancestor, causing the reftest to fail.
Fixing the clip ancestry is not hard but it reveals other problems so
so I'm deferring that to a follow-up bug.

MozReview-Commit-ID: DldAKi1AP4l

--HG--
extra : rebase_source : a448e06fd26fff21bbc4a6f50e04dbbdb427298c
2017-10-24 15:46:00 -04:00
Kartikaya Gupta 83ac5fdb91 Bug 1409446 - Handle nested display item scenarios. r=mstange
This handles some cases where a nested display item's clip chain
implicitly extends from the wrapper item's clip chain.

MozReview-Commit-ID: DmghxOWi81K

--HG--
extra : rebase_source : 8ec95df64fed247650baf8f5e0c868d1934aa6bc
2017-10-24 15:46:00 -04:00
Kartikaya Gupta 4fcc51960c Bug 1409446 - Work around the dual-ancestor case that WR doesn't handle yet. r=mstange
Bug 1409442 is tracking a change that will allow scroll layers to have
multiple ancestors. Without that, there are cases we cannot properly
handle, and so we need to ignore a clip in those scenarios. This patch
makes sure we do that instead of crashing.

MozReview-Commit-ID: 7AU4uyzT6if

--HG--
extra : rebase_source : d483c2a7ecff5cd488a53fa5e6b6da55cc3a1e29
2017-10-24 15:45:59 -04:00
Kartikaya Gupta 9b3a9d0d62 Bug 1409446 - Deal with scenario of two interchangeable DisplayItemClipChain objects causing a cache miss. r=mstange
MozReview-Commit-ID: 4FQvOmMUUKH

--HG--
extra : rebase_source : 9b497dc5f97345aee55f8dbf25d1db926c93c68f
2017-10-24 15:45:59 -04:00
Kartikaya Gupta fdefb982b7 Bug 1409446 - Properly handle out-of-band clips in the new ScrollingLayersHelper code. r=mstange
When display items (such as mask items) push an out-of-band clip, we
can't use clip ids from, or update clip ids into, the cache. We also
need to ensure we take these out-of-band clips into account when
determining the parent for a new clip we are going to define.

MozReview-Commit-ID: GcUI2Hf6SLB

--HG--
extra : rebase_source : 512be5a6998b9c1d6db9d8c550231f0883d721c9
2017-10-24 15:45:59 -04:00
Kartikaya Gupta 54e570d116 Bug 1409446 - Write the new recursive method to define clip chains. r=mstange
This code is more straightforward in its recursion than the old code,
and provides a relatively clean way to explicitly pass the desired
parent when defining a new clip or scroll layer.

Refer to the documentation in the patch for more details.

Note that this patch provides the basic recursive algorithm to define
the clips and scroll layers, although it omits some of the complicating
edge cases which will be added in later patches. The new code is not
invoked from anywhere until all the edge case handling has been done.

MozReview-Commit-ID: 7z51Kd7LlPU

--HG--
extra : rebase_source : 491efac9282a7379f7977a1bc0205ac70e356c3c
2017-10-24 15:45:58 -04:00
Kartikaya Gupta 2878061467 Bug 1409446 - Wire up the DefineClip and DefineScrollLayer APIs to allow specifying ancestry. r=jrmuizel
The APIs now allow providing the parent clip or scroll info explicitly
instead of having to push it on the stack. For now we just pass
Nothing() to preserve the existing behaviour, so this change is a
functinoal no-op.

MozReview-Commit-ID: dtNamN595

--HG--
extra : rebase_source : 3b6bd03b919bd31cd89e3f82283cb962f8f6abc5
2017-10-24 15:45:57 -04:00
Sebastian Hengst 31bf3a1a42 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4Lk5P5UYmTe
2017-10-24 11:52:35 +02:00
Sebastian Hengst b550a1e851 Backed out changeset 45596e6d2e2f (bug 1409871) on request from rhunt for causing black context menus on Windows. r=backout
--HG--
extra : amend_source : 4258791f4f66808f5faa888b5f5cb4a20ce1ce38
2017-10-23 23:44:15 +02:00
Sebastian Hengst 6eaee8e36d Backed out changeset 0c763c30594d (bug 1409871) 2017-10-23 23:44:09 +02:00