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

86 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ryan Hunt c272b03256 Bug 1440937 - Change PaintTask to be a UniquePtr. r=mattwoodrow
Now that we have C++14 support we can capture a move only object in a lambda expression.

--HG--
extra : rebase_source : 232639ba334520cf9d38d68190af8fdcd4aa454d
2018-09-12 10:28:59 -05:00
Ryan Hunt b2e21ec958 Bug 1482956 - Standardize method names and add comments to PaintThread. r=nical
These method names and ordering have gotten out of sync because of
the recent churn.

Differential Revision: https://phabricator.services.mozilla.com/D3288

--HG--
extra : rebase_source : 42bceaeb66a0df4808981b8c9cb0ed70b23f5a30
extra : histedit_source : 228024efe8de4e149f7e7ca66a2bb078bba820ce
2018-08-13 12:58:25 -05:00
Ryan Hunt a3a666772d Bug 1482956 - Don't dispatch extra runnable for ending layer transaction. r=nical
This may have been needed at some point, but all the important code for
EndLayerTransaction is in CompositorBridgeChild behind a lock, so this
should be safe.

--HG--
extra : rebase_source : bda4080bc04afa95954732050df7bd25c8177752
extra : histedit_source : 9386583dd923bf0ae44ff783d3ef1c6692944c77
2018-08-13 12:57:15 -05:00
Ryan Hunt 92823fa25e Bug 1482956 - Use an AutoTArray in PaintTask to reduce heap allocations. r=nical
There should only ever be at most four TextureClients here, so
allocated a vector seems wasteful.

--HG--
extra : rebase_source : 6b0f9f7749461eb39cd3c6c6bf7917152ffc9aab
extra : histedit_source : b5539d02c294596a5147dc55b417ef7970f8c0cd
2018-08-13 12:22:18 -05:00
Ryan Hunt 2c62e46a50 Bug 1482956 - Remove templates for FinishedAsyncPaint methods in CompositorBridgeChild. r=nical
This was needed when there were multiple types of CapturedPaintStates but
is not anymore.

--HG--
extra : rebase_source : 3648edccca7c73e3e3aa7a5c3e0d48d12d6324c5
extra : histedit_source : 021814c10b6578970c3a6d234c1e6641ad26b095
2018-08-13 12:10:14 -05:00
Ryan Hunt 2dd7814423 Bug 1478815 part 8 - Remove buffer operations for ContentClient. r=nical
This commit moves ContentClient from creating a CapturedBufferState for
buffer operations, to performing all of those operations on the
DrawTarget(Capture). Creating a DrawTargetCapture is now performed
by the RotatedBuffer when we BeginPaint, all operations are performed
on this capture, and then it's returned to the ClientPaintedLayer
as a PaintTask.

This commit is an involved refactoring of ContentClient and RotatedBuffer
to get this all to work. Here are the major parts:

1. RotatedBuffer is refactored to always perform operations on a single
   DrawTarget, which may be a single DT, dual DT, or capture.
2. RotatedBuffer adds BeginCapture and EndCapture methods to switch
   which DT is used in operations
3. ContentClient uses the RB capture methods when we are async painting
4. CC::BeginPaint is refactored to only perform capturing on a single
   RotatedBuffer. This is because we can't have the output of one
   PaintTask be the input of a different PaintTask due to the design
   of the Snapshot API.
      a. This can occur, today, by doing a FinalizeFrame only to later
         fail to Unrotate the buffer, causing a new RB to be created
         and painted into
      b. The previous PaintThread code worked because it used the
         buffer operations which didn't use Snapshot's
      c. This is fixed by not doing FinalizeFrame on a buffer if we
         realize we cannot unrotate it, and switching to initializing
         a buffer using the front buffer which should be up to date.
      d. I don't like touching this code, but it passes reftests,
         might be a performance improvement, and I've tested it on
         known regressions from the last time I messed up this code.
5. CC::PrepareForPaint is inlined into BeginPaint because dual draw
   targets can be cleared correctly from a previous commit
6. The code paths in ClientPaintedLayer are unified because we no
   longer need to special case this beyond setting the correct
   ContentClient flag.
7. CapturedPaintState and CapturedBufferState are removed in favor
   of PaintTask. Additionally EndLayer is no longer needed as all
   quadrants of a rotated buffer are in the same capture, so we
   don't need special case flushing code.

MozReview-Commit-ID: 9UI40dwran

--HG--
extra : rebase_source : 809d9816970648468de972c30b0c230c2f21e27b
extra : source : 405ad351821813333c0e989b93e2aeb49ba8552c
2018-07-26 11:23:26 -05:00
Ryan Hunt ce8baf18ae Bug 1478815 part 5 - Rename CapturedTiledPaintState to PaintTask. r=nical
This commit renames CapturedTiledPaintState to PaintTask as in a future
commit I will fold CapturedPaintState into it.

MozReview-Commit-ID: 8py7SrK4s29

--HG--
extra : rebase_source : 7abdf127351cdc82ee4c40112dce7150bdb67243
extra : source : 01110727f2e9e0846fc06997653e04860efb23dc
2018-07-24 15:39:35 -05:00
Ryan Hunt 7e8f465799 Bug 1478815 part 4 - Remove buffer operations for TiledContentClient. r=nical
This commit refactors TiledContentClient to not create PaintThread
buffer operations, but to instead perform all of these operations
on the DrawTarget(Capture). This simplifies the code dramatically
and allows us to add flushing behavior to DrawTargetCapture in a
future commit.

With this change, CapturedTiledPaintState is simply a container
for a DrawTarget, DrawTargetCapture, and keep-alive TextureClients.

Part of this commit is moving the logic of locking the texture
clients, constructing a dual draw target, and constructing a capture
into TiledContentClient so it can be shared.

MozReview-Commit-ID: 2rwz9aDI737

--HG--
extra : rebase_source : 4ac317f632c0a2c21480bc88e6246f4dc0daf0be
extra : source : 56d967e03ee225e032034ffd193b6f42b343226b
2018-07-24 14:29:44 -05:00
Ryan Hunt 53537230f9 Bug 1478815 part 1 - Add a PadEdges operation to DrawTarget. r=bas
This commit adds an operation to perform 'edge padding' on a draw
target. By default this is performed using LockBits, but it's
overriden in DrawTargetTiled and DrawTargetCapture to propagate
the call so it functions correctly.

This helps TiledContentClient move from applying this operation
on a per texture client basis, to being able to do it on the
DrawTargetTiled after painting. This in turn helps move all
paint thread operations into DrawTargetCapture.

MozReview-Commit-ID: 2ncOTxGXQfk

--HG--
rename : gfx/layers/BufferEdgePad.cpp => gfx/2d/BufferEdgePad.cpp
rename : gfx/layers/BufferEdgePad.h => gfx/2d/BufferEdgePad.h
extra : rebase_source : a3315644fe31f2a432935dcbfdb9969c58b691e1
extra : source : 699c954992f87db7fc792f5562090de42a8162cb
2018-08-01 12:44:33 -05:00
Jan Beich 5677cde33a Bug 1473732 - Base default number of OMTP workers on the number of logical CPU cores. r=rhunt
system-info is a stub on Tier3 platforms while physical vs. logical
difference only matters for hyper-threading. As hyper-threading
is usually available on CPUs with more than 2 physical cores this
change has no impact there as the default is clamped to [1, 4].
However, on Intel i3-* CPUs with 2 physical and 4 logical cores this
bumps the default from 1 to 3.

MozReview-Commit-ID: 1Yh8rJL2JcN

--HG--
extra : rebase_source : 5c563ec8e388a3fd05a0650e8d4c330d48675332
2018-06-30 22:41:59 +00:00
Brindusan Cristian 181d4f159b Backed out 10 changesets (bug 1478815) for reftest failures on /reftests/layers/forced-bg-color-outside-visible-region.html. CLOSED TREE
Backed out changeset 7ae4c893867a (bug 1478815)
Backed out changeset b865a866fe5a (bug 1478815)
Backed out changeset 405ad3518218 (bug 1478815)
Backed out changeset 64cb50b227e0 (bug 1478815)
Backed out changeset 392a724d5acd (bug 1478815)
Backed out changeset 01110727f2e9 (bug 1478815)
Backed out changeset 56d967e03ee2 (bug 1478815)
Backed out changeset 082638a5c643 (bug 1478815)
Backed out changeset 3dc47f17fa44 (bug 1478815)
Backed out changeset 699c954992f8 (bug 1478815)

--HG--
rename : gfx/2d/BufferEdgePad.cpp => gfx/layers/BufferEdgePad.cpp
rename : gfx/2d/BufferEdgePad.h => gfx/layers/BufferEdgePad.h
rename : gfx/2d/BufferUnrotate.cpp => gfx/layers/BufferUnrotate.cpp
rename : gfx/2d/BufferUnrotate.h => gfx/layers/BufferUnrotate.h
2018-08-07 20:57:27 +03:00
Ryan Hunt af49011c30 Bug 1478815 part 8 - Remove buffer operations for ContentClient. r=nical
This commit moves ContentClient from creating a CapturedBufferState for
buffer operations, to performing all of those operations on the
DrawTarget(Capture). Creating a DrawTargetCapture is now performed
by the RotatedBuffer when we BeginPaint, all operations are performed
on this capture, and then it's returned to the ClientPaintedLayer
as a PaintTask.

This commit is an involved refactoring of ContentClient and RotatedBuffer
to get this all to work. Here are the major parts:

1. RotatedBuffer is refactored to always perform operations on a single
   DrawTarget, which may be a single DT, dual DT, or capture.
2. RotatedBuffer adds BeginCapture and EndCapture methods to switch
   which DT is used in operations
3. ContentClient uses the RB capture methods when we are async painting
4. CC::BeginPaint is refactored to only perform capturing on a single
   RotatedBuffer. This is because we can't have the output of one
   PaintTask be the input of a different PaintTask due to the design
   of the Snapshot API.
      a. This can occur, today, by doing a FinalizeFrame only to later
         fail to Unrotate the buffer, causing a new RB to be created
         and painted into
      b. The previous PaintThread code worked because it used the
         buffer operations which didn't use Snapshot's
      c. This is fixed by not doing FinalizeFrame on a buffer if we
         realize we cannot unrotate it, and switching to initializing
         a buffer using the front buffer which should be up to date.
      d. I don't like touching this code, but it passes reftests,
         might be a performance improvement, and I've tested it on
         known regressions from the last time I messed up this code.
5. CC::PrepareForPaint is inlined into BeginPaint because dual draw
   targets can be cleared correctly from a previous commit
6. The code paths in ClientPaintedLayer are unified because we no
   longer need to special case this beyond setting the correct
   ContentClient flag.
7. CapturedPaintState and CapturedBufferState are removed in favor
   of PaintTask. Additionally EndLayer is no longer needed as all
   quadrants of a rotated buffer are in the same capture, so we
   don't need special case flushing code.

MozReview-Commit-ID: 9UI40dwran

--HG--
extra : rebase_source : 2f63464c1f8ca03992700b33838c4aa56608f872
2018-07-26 11:23:26 -05:00
Ryan Hunt dfb4539ae9 Bug 1478815 part 5 - Rename CapturedTiledPaintState to PaintTask. r=nical
This commit renames CapturedTiledPaintState to PaintTask as in a future
commit I will fold CapturedPaintState into it.

MozReview-Commit-ID: 8py7SrK4s29

--HG--
extra : rebase_source : 1b5259cca6520761ae99e64157d047441b90b563
2018-07-24 15:39:35 -05:00
Ryan Hunt af1087297b Bug 1478815 part 4 - Remove buffer operations for TiledContentClient. r=nical
This commit refactors TiledContentClient to not create PaintThread
buffer operations, but to instead perform all of these operations
on the DrawTarget(Capture). This simplifies the code dramatically
and allows us to add flushing behavior to DrawTargetCapture in a
future commit.

With this change, CapturedTiledPaintState is simply a container
for a DrawTarget, DrawTargetCapture, and keep-alive TextureClients.

Part of this commit is moving the logic of locking the texture
clients, constructing a dual draw target, and constructing a capture
into TiledContentClient so it can be shared.

MozReview-Commit-ID: 2rwz9aDI737

--HG--
extra : rebase_source : 16a4b87263f28b32f5bcb5fd6d9756548f137e11
2018-07-24 14:29:44 -05:00
Ryan Hunt 748ab5ad0f Bug 1478815 part 1 - Add a PadEdges operation to DrawTarget. r=bas
This commit adds an operation to perform 'edge padding' on a draw
target. By default this is performed using LockBits, but it's
overriden in DrawTargetTiled and DrawTargetCapture to propagate
the call so it functions correctly.

This helps TiledContentClient move from applying this operation
on a per texture client basis, to being able to do it on the
DrawTargetTiled after painting. This in turn helps move all
paint thread operations into DrawTargetCapture.

MozReview-Commit-ID: 2ncOTxGXQfk

--HG--
rename : gfx/layers/BufferEdgePad.cpp => gfx/2d/BufferEdgePad.cpp
rename : gfx/layers/BufferEdgePad.h => gfx/2d/BufferEdgePad.h
extra : rebase_source : ab850358a763853d50d1f374f28e67a197740443
2018-08-01 12:44:33 -05:00
Ryan Hunt d50993e6a4 Bug 1477799 - Use the paint thread instead of workers when we only have one worker. r=jrmuizel
MozReview-Commit-ID: 3mR4KrS924N

--HG--
extra : rebase_source : 3075243361b7f1772854c85336e7d75a207b8cb6
extra : source : ccf97cb6779fafeb54f30b251487ae24c630e08b
2018-07-19 12:41:34 -05:00
Cosmin Sabou acd8ea2c75 Backed out changeset e354029775b8 (bug 1473732) for causing leaks at gfxFT2FontBase::GetGlyph, GetCharWidth. CLOSED TREE 2018-07-26 04:40:00 +03:00
Jan Beich 061b467f45 Bug 1473732 - Base default number of OMTP workers on the number of logical CPU cores. r=rhunt
system-info is a stub on Tier3 platforms while physical vs. logical
difference only matters for hyper-threading. As hyper-threading
is usually available on CPUs with more than 2 physical cores this
change has no impact there as the default is clamped to [1, 4].
However, on Intel i3-* CPUs with 2 physical and 4 logical cores this
bumps the default from 1 to 3.

MozReview-Commit-ID: 1Yh8rJL2JcN

--HG--
extra : rebase_source : 77613cbb99c14f19217592080bfd51ea2194422b
2018-06-30 22:41:59 +00:00
Ryan Hunt 41f7f579b7 Bug 1471639 - Move edge padding to the paint thread. r=nical
This commit ports over the last remaining operation for tiling that doesn't work
on the paint thread.

The difficult part for edge padding is that it is done outside of ValidateTile
so it doesn't have an associated CapturedTilePaintState to be added to as an
operation. We need it to be in the same paint state so that it's guaranteed
to be run after painting has finished.

This commit changes edge padding to instead be decided inside of ValidateTile
and either sent to the paint thread if there is OMTP or executed right away.

MozReview-Commit-ID: JDD4rH1fVwW

--HG--
extra : source : 9b0a54842d3169960a606fa1dd335acf6aa70dbe
extra : intermediate-source : bcbab66c16c5cc2b917f12b4481bbbb8fe3eb097
2018-06-26 17:12:56 -05:00
Csoregi Natalia 2f779be8d9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-02 01:03:45 +03:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Markus Stange 7cdcd735ca Bug 1464909 - Add GRAPHICS category annotations to async-paint-related methods. r=rhunt
MozReview-Commit-ID: HM2Gp85pCJa

--HG--
extra : rebase_source : 13d91a58f66b26cd869b438acfde517228d91491
2018-05-31 14:07:57 -04:00
Noemi Erli 7bfa96a42b Backed out 4 changesets (bug 1464909) for failures in devtools/client/performance/test/unit/test_tree-model-08.js r=mstange on a CLOSED TREE
Backed out changeset 119c2055e002 (bug 1464909)
Backed out changeset 562aeeced55b (bug 1464909)
Backed out changeset c1e1d74ad27e (bug 1464909)
Backed out changeset 11670c51f572 (bug 1464909)
2018-06-01 01:23:49 +03:00
Markus Stange c721a2c6da Bug 1464909 - Add GRAPHICS category annotations to async-paint-related methods. r=rhunt
MozReview-Commit-ID: HM2Gp85pCJa

--HG--
extra : rebase_source : a90a78869b5002cd5f726dea8b0f3b4cacdc80a6
2018-05-31 14:07:57 -04:00
Ryan Hunt 95f916f190 Bug 1461775 - Create paint worker threads in response to a device reset instead of preemptively. r=bas
--HG--
extra : rebase_source : 83f98d01b416c8ac52c36809416be92d94120463
2018-05-15 13:36:11 -05:00
Ryan Hunt c2b8279a9f Bug 1458462 - Create paint workers if it's possible we could switch to tiling in the future. r=nical
On windows it's possible for us to fallback from D2D to Skia rendering at any time due to a device reset.
If this happens with `enable-tiles-if-skia-pomtp` enabled we could begin to use tiling. This can cause a
crash if we never created the worker threads because at initialization time we weren't using tiling.

Another way to fix this would be to dynamically create the worker threads in UpdateRenderMode if we
have switched to skia. That's a larger change and more might be required, so I'd rather just fix the
crash for now.

This commit also fixes a pref that should be `Once` instead of `Live`.

MozReview-Commit-ID: JQidXPjI7ER

--HG--
extra : amend_source : ba9a3746faea3a7355251b7e97e3f7c5dc1ba06b
2018-05-02 09:21:13 -05:00
Ryan Hunt 77c38b12c0 Bug 1454978 - Make OMTP feature detection not depend on tiling. r=bas
There's a circular dependency between `UsesTiling` and `InitOMTPConfig` because
we try to disable OMTP if we will be using tiling and edge padding is enabled.
Now that edge padding is disabled everywhere except android it should be safe
to assume that if edge padding is enabled then we'll be using tiling as well
and should disable OMTP.

This commit also removes a check on `UsesTiling` from CalculateWorkerCount
as it is redundant.

MozReview-Commit-ID: 1ruWPwXfLwO

--HG--
extra : rebase_source : d489c52c728d2ff356d2413b9b1044dfa3f63135
2018-04-25 16:27:02 -05:00
Ryan Hunt b796b12ab7 Add 'layers.omtp.dump-capture' for logging DrawTargetCapture (bug 1435938, r=bas)
MozReview-Commit-ID: GCyHRg8Dn6c

--HG--
extra : histedit_source : 297fbbc9defda0accc894fabdc30256a8484b4c4
2018-02-05 22:03:49 -06:00
Ryan Hunt 43118373ed Enable parallel painting on OSX and cap the amount of paint workers to 4. (bug 1430793, r=milan)
--HG--
extra : rebase_source : 9d5c853f84b160819540cc062fb84f4bea8fcb02
2018-01-25 14:12:39 -06:00
Ryan Hunt 27c33e0bdf Add tiling and paint worker count information to about:support. (bug 1432516, r=milan)
--HG--
extra : rebase_source : f2ce10a284f53b21ce5eb94f039808ec92f40685
extra : histedit_source : d3bbb62e946fe32f601cc7753513d2d30f2aa294
2018-01-23 15:52:13 -06:00
Ryan Hunt fff3bf05d6 Create a PaintWorker thread pool and dispatch tiles to it (bug 1425056, r=bas)
This commit adds a paint worker thread pool to PaintThread, and dispatches
tiled paints to it. The thread pool is only created if tiling is enabled,
and its size is set by 'layers.omtp.paint-workers' and defaults to 1. If
-1 is specified, it will be sized to 'max((cpu_cores * 3) / 4, 1)'.

The one tricky part of dispatching tiled paints to a thread pool is the
AsyncEndLayerTransaction message that must execute once all paints are
finished. Previously, this runnable would be queued after all the paints
had been queued, ensuring it would be run after they had all completed.

With a thread pool, there is no guarantee. Instead this commit, uses
a flag on CompositorBridgeChild to signify whether all of the paints
have been queued ('mOutstandingAsyncEndLayerTransaction'), and after
every tiled paint it is examined to see if that paint was the last
paint, and if it is to run AsyncEndLayerTransaction. In addition,
if the async paints complete before we even mark the end of the
layer transaction, we queue it like normal.

The profiler markers are also complicated by using a thread pool.
I don't know of a great way to keep them working as they are per
thread, so for now I've removed them. I may have been the only
one using them anyway.

MozReview-Commit-ID: 5LIJ9GWSfCn

--HG--
extra : rebase_source : 0c26806f337a1b4b1511945f9c72e787b426c5ba
2017-12-08 01:18:05 -06:00
Ryan Hunt 7834357a92 Make a CaptureTiledPaintState for each tile (bug 1425056, r=bas)
This makes it so that each tile of a paint gets a DrawTargetCapture and
its own buffer operations. Once this is done, each CaptureTiledPaintState
will be isolated from each other and able to be done in parallel.

MozReview-Commit-ID: BuBDXgjma4z

--HG--
extra : rebase_source : 6ae3dc439ebc19bcaada9486894d542d138a460d
2017-12-07 23:45:47 -06:00
Andrew McCreight ab7fa64021 Bug 1410209, part 4 - Add names to some IPC runnables. r=kanru
This patch requires that each instance of IPC's RunnableFunction is
passed in a name, like the non-IPC RunnableFunction.

MozReview-Commit-ID: Atu1W3Rl66S

--HG--
extra : rebase_source : f932d7597a26a3f0c4246b3a95df638860d3d32d
2017-10-27 13:39:28 -07: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
Ryan Hunt 52aacbca78 Don't append to mDrawTargetsToFlush in Tiled OMTP (bug 1424172, r=bas)
MozReview-Commit-ID: GhlE3DXwKJi

--HG--
extra : rebase_source : 41a178a2cdce32e954841024f1075ee33081f475
extra : source : 0863e916742e8f4986db3b38b75b0b6ee2099d8f
2017-12-08 01:31:16 -06:00
Ryan Hunt 14e019993c Refactor NotifyBeginAsyncPaint logic to not be repeated (bug 1422392, r=dvander)
MozReview-Commit-ID: B8BZCxYErjv

--HG--
extra : rebase_source : 17f022a10b484f5ae9ac6de9d376075c894f7226
2017-12-04 21:23:50 -05:00
Ryan Hunt 98e347bbf9 Implement buffer copying and clearing on the paint thread for single tiled layers (bug 1422392, r=nical)
MozReview-Commit-ID: d6XPUYCz18

--HG--
extra : rebase_source : dc59658bb31345275ac904cc94576588999c929f
2017-12-01 16:35:30 -05:00
Ryan Hunt c9bf8e0aa9 Implement buffer copying and clearing on the paint thread for multi tiled layers (bug 1422392, r=nical)
This implements recording of buffer preparing commands for MultiTiledContentClient
and replaying it on the paint thread.

The order of locking for tiling is important and for buffer copying the front
buffer needs to be attempted to be locked before the back buffer. This means
we can't do this on the paint thread like we do for ContentClient, so instead
I've changed the OpenMode::ASYNC to be a flag that can be applied to
OpenMode::OPEN_READ as well as WRITE, as it looks like we can apply the same
logic for READ as WRITE.

MozReview-Commit-ID: ED6eeYx8dUV

--HG--
extra : rebase_source : dd8d14f469f2a7d4f43c0a41373a6848f57f4b39
2017-11-29 19:00:50 -05:00
Ryan Hunt 8ec4f38aa3 Implement record and replay painting for multi tiled layers (bug 1422392, r=nical)
This commit modifies MultiTiledContentClient to record drawing commands and
replay them to the tiled draw target on the paint thread when OMTP is enabled.

MozReview-Commit-ID: 22zL3c4NZvu

--HG--
extra : rebase_source : f8256b678da683da76edc02769dd4d0ebe234e09
2017-11-21 19:12:14 -05:00
Bas Schouten d3659cd140 Bug 1422169: Have the D3D11TextureData destructor defer releasing the last reference to its DrawTarget to the paint thread. r=dvander
MozReview-Commit-ID: Dmzu5Nnpx9g
2017-12-01 17:04:46 +01:00
Ryan Hunt a7d27ab55d Revert to using EnsureBackBufferIfFrontBuffer (bug 1416921, r=bas)
This commit reverts DoubleBufferedContentClient to creating a back buffer
if there is an existing front buffer. This reverts back to a sequence of a
finalize frame, unrotate, and initialize new back buffer. When we are
not async painting we do each buffer operation immediately. If we are
async painting, then we collect all of the buffer operations and perform
them on the paint thread.

Note on locking: The destination for buffer copies must always be opened
with the async write flag, and the source must be unlocked.

MozReview-Commit-ID: Gu4EcblY7Sg

--HG--
extra : rebase_source : ddbd85202aaa1e79ab56c76a055561f0d37d775a
2017-11-17 01:37:01 -05:00
Ryan Hunt ab27b063e3 Remove `layers.omtp.force-sync` preference (bug 1416941, r=dvander)
This commit removes the `layers.omtp.force-sync` preference and replaces
it with a preprocessor define that is commented out. This commit also
changes the behavior of force-sync so that it also does synchronization
with CompositorBridgeChild like normal OMTP. This simplifies the code
and makes using a preprocessor define easier.

MozReview-Commit-ID: 6RfuFTFBdMh

--HG--
extra : rebase_source : 0778a3087324b9e87f44587efbb49c71edf47f23
2017-11-14 14:05:55 -05:00
Ryan Hunt f881288e3b Don't use CompositorBridgeChild in PrepareBuffer if sync OMTP is enabled (bug 1416782, r=dvander)
MozReview-Commit-ID: DMbKcDEkkeP

--HG--
extra : rebase_source : 20608d09f18549816b10fd63d0879cfb409e8219
2017-11-13 12:51:19 -05: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 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
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
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