Commit Graph

11638 Commits

Author SHA1 Message Date
sotaro
636448ae4d Bug 1465319 - Clean up IMFYCbCrImage r=nical 2018-06-01 19:12:10 +09: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
sotaro
dba97baec3 Bug 1465008 - Drop ImageClients of ImageBridgeChild when device reset happens r=nical 2018-06-01 07:52:06 +09:00
Ryan Hunt
c9fcf05c4a Bug 1465590 - Clean up code for copying between an old tile buffer and a new one. r=nical
Another cleanup patch.

MozReview-Commit-ID: Ak0TTcbFePt

--HG--
extra : rebase_source : 511ea28e5e95bbc949414303a7885985f0fec910
extra : histedit_source : d38c6073f1775e901af3ddee0858bbd291b99cf2
2018-05-29 16:21:32 -05:00
Ryan Hunt
d9dda42436 Bug 1465590 - Kill the nesting in ValidateBackBufferFromFront. r=nical
Just a cleanup patch, this function would be cleaner without the
nesting.

MozReview-Commit-ID: DD48E2HSQOL

--HG--
extra : rebase_source : 79cf6b3eee00149fa5993c10bd69649633307fee
extra : histedit_source : 1fde6b0291acddcf73569b2e43757030c38d9e69
2018-05-29 15:01:54 -05:00
Ryan Hunt
bd906e49c6 Bug 1465590 - Don't clear a tile if we are painting opaque content. r=nical
MozReview-Commit-ID: IKayyoo19eG

--HG--
extra : rebase_source : 20d765fd3d72bf7c741f6a4ccf20fe5cf7defbb4
extra : histedit_source : 00a95df5678dbf106fb704b47cb54ccc746a53f7
2018-05-29 14:50:36 -05:00
Andreea Pavel
38bcf897f1 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-31 13:04:21 +03:00
sotaro
b0fbe12bd3 Bug 1465306 - Make D3D11YCbCrRecycleAllocator handle device reset r=nical 2018-05-31 09:35:24 +09:00
Kartikaya Gupta
659df77837 Bug 1452845 - Fix up snapshotting implementation with async-scene-building enabled. r=botond,jrmuizel
This updates the not-really-correct code to flush the WR pipeline before
doing a readback. It now uses the flushing functions introduced in bug
1417784 to ensure things are flushed properly.

MozReview-Commit-ID: 90BZuLKcjUi

--HG--
extra : rebase_source : 2180aa0ac7ff7b46467e0c24094fcc99479120f7
2018-05-24 16:16:00 -04:00
Kartikaya Gupta
61f3a20ced Bug 1457590 - Use the HitTestingTreeNodeAutoLock. r=botond
This updates the GetTargetAPZC function to produce a
HitTestingTreeNodeAutoLock out-param instead of a
RefPtr<HitTestingTreeNode>, to ensure that the node can be used safely
in calling functions. It then propagates that change outward as needed,
which covers all the scrollbar dragging code.

MozReview-Commit-ID: 43K4eSECb4E

--HG--
extra : rebase_source : b34a880c6fd60069f7a4fa0527cbb5e903085356
2018-05-30 15:54:51 -04:00
Kartikaya Gupta
6acdee2bb0 Bug 1457590 - Add the HitTestingTreeNodeAutoLock class. r=botond
This adds the HitTestingTreeNodeAutoLock RAII class that allows using
a HitTestingTreeNode safely outside a tree lock, and ensures that the
node won't get destroyed or recycled concurrently.

MozReview-Commit-ID: 8Tb3vdIeUgr

--HG--
extra : rebase_source : 6eed3e733edcaa4088da52882a9b3dc8c2355c2e
2018-05-30 15:54:50 -04:00
Kartikaya Gupta
46df7cfee3 Bug 1457590 - Strengthen the contract around recycling HitTestingTreeNodes. r=botond
This patch makes three related changes:
- A non-functional change that factors a IsRecyclable function on
  HitTestingTreeNode.
- A non-functional change that sprinkles proof-of-tree-lock arguments to
  a few HitTestingTreeNode functions, to ensure at compile-time that they
  can only be called while holding the tree lock.
- A functional change that stops clearing mLayersId in
  HitTestingTreeNode::Destroy, so that if a node is non-recyclable, and
  it gets Destroy()'d while other code still has a RefPtr to it, that
  other code can still read the layers id off in a safe manner.

These changes provide a stronger set of checks around node recycling,
and allows for a safe mechanism to use a HitTestingTreeNode on the
controller thread without having to lock the entire APZ tree. The
mechanism is effectively a per-node lock, which will be added in the
next patch.

MozReview-Commit-ID: DBIjFDZJwhE

--HG--
extra : rebase_source : 318c27c4473e54b30a0393fca6c2fc76083036b2
2018-05-30 15:54:50 -04:00
shindli
ee44448835 Merge inbound to mozilla-central. a=merge 2018-05-29 12:52:25 +03:00
jmuizelaar@mozilla.com
fc530ca316 Bug 1452375 - ssse3-scaler: handle init failure r=sotaro 2018-05-29 14:26:38 +09:00
Kartikaya Gupta
1832f1798c Bug 1417784 - Properly implement SyncWithCompositor for WebRender. r=froydnj,sotaro
This defines three flushing functions that flush different parts of the
WR pipeline. Using all three guarantees that everything sent to WR will
have been flushed. This is what we need to do in SyncWithCompositor to
ensure that it meets the API contract.

In addition, this patch updates the existing FlushRendering function to
use the new functions (no functional changes intended here).

MozReview-Commit-ID: GzxwpF4JT04

--HG--
extra : rebase_source : 1a8cf434d1280902906da257ae63751da7ffd114
2018-05-28 11:29:52 -04:00
Kartikaya Gupta
d807b18531 Bug 1417784 - Shift how the AsyncImagePipelineManager is notified of updates. r=sotaro
Instead of notifying the AsyncImagePipelineManager on the compositor
thread via the CompositorBridgeParent, we can send it the new pipeline
info directly from the RenderThread after the update happens. This
effectively splits the AsyncImagePipelineManager update-processing into
two parts: one that takes in the new pipeline info and one that process
it. This allows us to invoke the processing step from other code running
on the compositor thread, which we will need to do in the next patch.

MozReview-Commit-ID: 7xhm8I7bY4C

--HG--
extra : rebase_source : bfa62e326fd830bc2ef771138e5008fb2bc0d6b8
2018-05-28 11:29:41 -04:00
Kartikaya Gupta
af64629a66 Bug 1417784 - Use a CompositorBridgeParent* instead of a base class pointer. r=sotaro
We do a silent upcast from CompositorBridgeParent* to the base class and
pass it around as a CompositorBridgeParentBase* for no reason. Avoiding
this simplifies the code slightly and avoids virtual function overhead.
We do need to move a couple of functions in CompositorBridgeParent from
protected scope to public scope.

MozReview-Commit-ID: 9Zq3GwxEXpr

--HG--
extra : rebase_source : 67346159e7d99ca7fc2fe0052e85aa6618b50d27
2018-05-28 11:29:41 -04:00
Martin Stransky
b887819c71 Bug 1464037 - Replace GL_PROVIDER_GLX by MOZ_X11 to build X11 dependent code, r=lsalzman
In order to have useful Wayland builds we need ability to switch
between GL backends run-time - to use EGL backend for Wayland and GLX backend for X11.

GL_PROVIDER_GLX is used exclusively for GLX GL backend, so let's replace GL_PROVIDER_GLX
build-time check by more general MOZ_X11 check which determines X11 dependent code
and it's valid for both X11 and Wayland builds.

MozReview-Commit-ID: HYobrHveoaP

--HG--
extra : rebase_source : 2d359355ee747f5898d27d8a28d66114f4135f5b
2018-05-24 14:06:31 +02:00
Daniel Zielas
6e81464d99 Bug 1455182 - Additional cleanup to nsDisplayOwnLayer and ScrollbarData. r=botond
--HG--
extra : rebase_source : d0dd9840dab41e6a2dbd3427fafbf03b741441a1
2018-05-25 07:20:39 +02:00
Kartikaya Gupta
017058da2f Bug 1240708 - Follow-up to repair indentation damage. r=me and DONTBUILD 2018-05-25 16:04:09 -04:00
Kartikaya Gupta
ed86544f35 Bug 1462903 - Always send a display list for a new async image pipeline so WR doesn't complain. r=sotaro
MozReview-Commit-ID: IXM8EhkcdjE

--HG--
extra : rebase_source : 171e399dd506b65261f7bc8296e9bc806152eef1
2018-05-24 09:59:28 -04:00
Ryan Hunt
8a29e10e3e Bug 1462411 - Move FlushAsyncPaints to ClientLayerManager::EndTransactionInternal. r=mattwoodrow
This commit moves FlushAsyncPaints to EndTransactionInternal, which allows
us to continue async painting during DLB and FLB. We still flush async paints
before rasterizing into layers as we aren't triple buffered.

--HG--
extra : amend_source : 6ee4f511008c60fe1f52f7a260ef7d5b5e3c0c92
2018-05-16 15:42:46 -05:00
Andreea Pavel
2c92aa2095 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-05-24 01:03:40 +03:00
Jonathan Kew
71787557ea Bug 1392147 - Test/expectation adjustments for the change in default font on Android. r=xidorn 2018-05-23 13:52:08 +01:00
Kartikaya Gupta
a04df563ee Bug 1462961 - Ensure the WebRenderLayerScrollData structure matches the APZ requirements. r=jrmuizel
In cases where we were carrying down a transform from a
nsDisplayTransform and then applying it to a child item's WRLSD, we
could get incorrect behaviour when that child item had a different ASR
(and therefore had a different APZ instance). This patch corrects that
behaviour by ensuring that when we run into this case we fall back to
creating two WRLSD items instead of one, where the new WRLSD is the
parent of the other one, and holds the transform. The child WRLSD has
the data from the child item's ASR.

MozReview-Commit-ID: BE6HuZjwc8v

--HG--
extra : rebase_source : 436e81d1b6b1fcda44ef77b21eb893075d294f41
2018-05-23 16:08:18 -04:00
Kartikaya Gupta
2e785a4671 Bug 1462961 - Refactor to save a nsDisplayTransform* instead of just the transform matrix. r=jrmuizel
Instead of just storing the gfx::Matrix from the nsDisplayTransform on
the stacking context for scrolldata use, we now store a pointer to the
entire nsDisplayTransform item. We will need this in the next patch.
This patch should not have any functional changes.

MozReview-Commit-ID: 7qsZpL3Ka0X

--HG--
extra : rebase_source : b42957c83ef0591e72fa5b58ceb6650fda96e0b2
2018-05-23 16:08:18 -04:00
Kartikaya Gupta
327db9db3c Bug 1462961 - Dump the WebRenderScrollData as well when DUMP_LISTS is defined. r=jrmuizel
MozReview-Commit-ID: 181OoWNkWBs

--HG--
extra : rebase_source : 67bbf53060a042bc45f0292c10700cbff0608196
2018-05-23 16:08:18 -04:00
Andrew Osmond
1f74824f6b Bug 1451297. r=nical 2018-05-22 11:25:49 -04:00
Kartikaya Gupta
8e7e2dbdb4 Bug 1454042 - Allow missing pipeline information for cross-process iframes. r=sotaro
We should always have the pipeline information for in-process things like
async images, but for cross-process iframes we might not have the information
right away if the content process doesn't get around to sending it for a while.

MozReview-Commit-ID: 18F5nqilXoV

--HG--
extra : rebase_source : 610046cbaaefb38b8e11bda857fd64a00722df27
2018-05-18 10:31:18 -04:00
Jeff Muizelaar
83228f30bd Bug 1461849. Include a residual offset for blob images. r=mstange
This lets us improve the illuision that there's not an intermediate surface
being used when drawing SVG. i.e. if content is transformed by 0.5px
the 0.5px transform is included when drawing the SVG content.

MozReview-Commit-ID: ChfbTFblVdR

--HG--
extra : rebase_source : 24144fe05b73ceeaa8499218fdae82035f674e39
2018-05-16 10:31:27 -04:00
Jeff Muizelaar
d142ce9731 Bug 1461849. Snapping surface transform. r=mstange
Capture a snapping surface transform. This is used
by svg/blob code to compute an fractional offset
to the nearest intermediate surface.

MozReview-Commit-ID: 6EFNvluvzvA

--HG--
extra : rebase_source : f26e7fa823883e93742970c2e8d687319a7eaf5b
2018-05-16 18:14:46 -04:00
Jeff Muizelaar
dc69cd9e79 Bug 1461849. Don't reset the invalid rect. r=mstange
I believe this was a left-over from an old strategy where we didn't clear the
items, tried to reuse them but kept made an invalid rect for the old size. Now
that we clear the items this shouldn't be needed. I added the assert to make
sure things are what we expect.

MozReview-Commit-ID: 9btmmSmkl8S

--HG--
extra : rebase_source : 698f4a7e0fb802698f3e86b9fa8e654c5d604ec4
2018-05-17 18:16:10 -04:00
Kartikaya Gupta
63feb7051a Bug 1425565 - Use the container ASR for sticky items when building WebRender clips. r=mstange
Even if the sticky item has a fixed descendant, we want to use the
sticky container item's "real" ASR when computing the WR clips because
otherwise the WR item doesn't get attached to the correct scrolling
layer.

MozReview-Commit-ID: JVnzEIBeLKp

--HG--
extra : rebase_source : 806e43eb65d46eb5151e21b0a5eb09168b2df82d
2018-05-18 15:19:47 -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
7f81c73bae Bug 1461786 - Rename references to tile positions to tile coords. r=nical
This is the other half of the commit renaming the TileUnit to TileCoordUnit. It
also includes some small style cleanups.

--HG--
extra : rebase_source : ebf7a275bed518d1419a2e3c23b67f36601a1089
2018-04-20 09:42:35 -05:00
Ryan Hunt
29301de2b0 Bug 1461786 - Move MultiTiledContentClient to its own file. r=nical
SingleTiledContentClient has it's own file and this helps make ContentClient slimmer.

--HG--
rename : gfx/layers/client/TiledContentClient.cpp => gfx/layers/client/MultiTiledContentClient.cpp
rename : gfx/layers/client/TiledContentClient.h => gfx/layers/client/MultiTiledContentClient.h
extra : rebase_source : 7c70cfa04f9faa840b2aa8a81680486e4ed0245e
2018-04-19 16:20:42 -05:00
Ryan Hunt
981575402e Bug 1461786 - Rename TilePoint and TileSize to refer to tile coord space. r=nical
TileCoord is a (very slightly) better name for this unit in my opinion, and I'd
like to add a TileBuffer unit in the future which might get confused if there
is an unprefixed Tile unit.

--HG--
extra : rebase_source : 968f508f2195c12fd4840e2415130b1b36fd3e29
2018-04-19 16:03:24 -05:00
Margareta Eliza Balazs
d4b9e50875 Merge inbound to mozilla-central. a=merge 2018-05-16 13:00:51 +03:00
Matt Woodrow
33d829994f Bug 1460491 - Part 2: Only recompute visibility for items if they are newly added to this layer, or intersect one that changed. r=jnicol
MozReview-Commit-ID: EAgvVQGsSPE

--HG--
extra : rebase_source : 44bc132a95d6d1b7e9cc3c22adcd4166a099237c
2018-05-16 16:02:37 +12:00
Matt Woodrow
0d65266918 Bug 1460491 - Part 1: Split nsDisplayItem::mVisibleRect into two members, one for each stated purpose. Gets rid of the save/restore since we no longer modify the building rect. r=jnicol
MozReview-Commit-ID: 5wcsSoZRN44

--HG--
extra : rebase_source : 1bf7d655b048a972e392514542aee171e20afe82
2018-05-16 15:56:32 +12:00
Hiroyuki Ikezoe
b63fbaf5f6 Bug 1460389 - Constify arguments for StackingContextHelper ctor. r=kats
MozReview-Commit-ID: 14fu7EYESwu

--HG--
extra : rebase_source : 48dd25d7ad42abde9643d4fec50bff9aa08c41ef
2018-05-15 08:59:33 +09:00
Kartikaya Gupta
8186c1e30a Bug 1461122 - Ensure we recomposite when getting a main-thread scroll offset update. r=botond
With non-WebRender, the composite is triggered unconditionally when we receive
the transaction from the content side, so we never needed this. The previous
patch adds the composite for the equivalent WebRender codepath, but it's better
to do it explicitly in NotifyLayersUpdated as well. The reason for this is that
with WebRender, this code runs on the updater thread which is not the same as
the compositor thread - so the composition that is scheduled from
WebRenderBridgeParent upon receiving the transaction might happen before the
scroll offset update is actually applied. Triggering a composition from
NotifyLayersUpdated should be a no-op in the cases where a composition is already
scheduled, but in cases where it has not been scheduled, it will schedule one
to ensure the scroll offset update gets composited properly.

MozReview-Commit-ID: Luf76J6QDkr

--HG--
extra : rebase_source : a130f1cf22973910767e96c69962d8b621c0d368
2018-05-15 08:49:36 -04:00
Kartikaya Gupta
d07e6d261b Bug 1461122 - Clean up the composition flow for empty transactions. r=sotaro
This is mostly just refactoring to make the code more understandable. However,
there are a couple of functional changes:
- If we have scroll offset updates we now schedule a composite instead of
  sending the DidComposite right away. This is needed because we want to
  actually composite the scroll offset change.
- If there are WebRenderParentCommands provided, we process them and update the
  epoch in a single transaction, instead of splitting it across two transactions
  for no good reason.

MozReview-Commit-ID: 2HCa19EGxUD

--HG--
extra : rebase_source : f7cdc1b46fbca96b2124582f29c791f8944c1fc9
2018-05-15 08:49:34 -04:00
Kartikaya Gupta
26d10c1120 Bug 1461122 - Implement DidComposite(LayersId,...) for CompositorBridgeParent. r=sotaro
MozReview-Commit-ID: 5glDqCdvkQG

--HG--
extra : rebase_source : e7bcf7d338b79002e30a7647c15669f1958409e2
2018-05-15 08:49:29 -04:00
Bogdan Tara
fbf34d5681 Backed out 3 changesets (bug 1461122) for build bustages on workspace/build/src/obj-firefox/dist/include/mozilla/layers/CompositorBridgeParent.h CLOSED TREE
Backed out changeset 90445f7b62cd (bug 1461122)
Backed out changeset 9f87280ba566 (bug 1461122)
Backed out changeset 0efbd05857c2 (bug 1461122)
2018-05-15 15:13:08 +03:00
Kartikaya Gupta
4faa5a5649 Bug 1461122 - Ensure we recomposite when getting a main-thread scroll offset update. r=botond
With non-WebRender, the composite is triggered unconditionally when we receive
the transaction from the content side, so we never needed this. The previous
patch adds the composite for the equivalent WebRender codepath, but it's better
to do it explicitly in NotifyLayersUpdated as well. The reason for this is that
with WebRender, this code runs on the updater thread which is not the same as
the compositor thread - so the composition that is scheduled from
WebRenderBridgeParent upon receiving the transaction might happen before the
scroll offset update is actually applied. Triggering a composition from
NotifyLayersUpdated should be a no-op in the cases where a composition is already
scheduled, but in cases where it has not been scheduled, it will schedule one
to ensure the scroll offset update gets composited properly.

MozReview-Commit-ID: Luf76J6QDkr

--HG--
extra : rebase_source : 3e8cc6c9cd6fb79ab1f7ec3d1e38a34a2c7f6011
2018-05-14 13:19:14 -04:00
Kartikaya Gupta
8677ec2d23 Bug 1461122 - Clean up the composition flow for empty transactions. r=sotaro
This is mostly just refactoring to make the code more understandable. However,
there are a couple of functional changes:
- If we have scroll offset updates we now schedule a composite instead of
  sending the DidComposite right away. This is needed because we want to
  actually composite the scroll offset change.
- If there are WebRenderParentCommands provided, we process them and update the
  epoch in a single transaction, instead of splitting it across two transactions
  for no good reason.

MozReview-Commit-ID: 2HCa19EGxUD

--HG--
extra : rebase_source : e5643b83914b47889e4bde6c0f8658fedb3d54fc
2018-05-14 13:19:13 -04:00
Kartikaya Gupta
976a28d5ae Bug 1461122 - Implement DidComposite(LayersId,...) for CompositorBridgeParent. r=sotaro
MozReview-Commit-ID: 5glDqCdvkQG

--HG--
extra : rebase_source : b3d50c9ffaa1b829b8a23fc5e16d15d1509eb080
2018-05-14 13:19:13 -04:00
Margareta Eliza Balazs
17675612bf Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-14 19:49:50 +03:00
Kartikaya Gupta
56f43bc35b Bug 1437036 - Implement GetLastTransactionId in WebRenderLayerManager. r=hiro
MozReview-Commit-ID: CLymsb5w3pk

--HG--
extra : rebase_source : e2c5ee70c637305d6057953bf5fb135d1ccf3831
2018-05-14 08:53:52 -04:00