Commit Graph

9403 Commits

Author SHA1 Message Date
Kartikaya Gupta
4fbf750c6a Merge m-c to graphics
MozReview-Commit-ID: EdvTPLc8PCy
2017-04-27 13:03:06 -04:00
sotaro
11ec0449d5 Bug 1359206 - Fix CompositionTime and CompositeUntil handling of WebRenderImageHost r=nical 2017-04-27 09:34:54 -07:00
Kartikaya Gupta
917cbc416f Bug 1359842 - Remove a bunch of now unused functions. r=nical
MozReview-Commit-ID: HeIXvHl41IZ
2017-04-27 12:04:26 -04:00
Kartikaya Gupta
3928dd684f Bug 1359842 - Use the StackingContextHelper for WebRenderContainerLayer as well. r=nical
MozReview-Commit-ID: DXhhBB3qdzX
2017-04-27 12:04:25 -04:00
Kartikaya Gupta
84a2895fe0 Bug 1359842 - Remove if/else branch in WebRenderContainerLayer so it goes through a single PushStackingContext call. r=nical
This is functionally equivalent since one variant of the
PushStackingContext was already delegating to the other (in
DisplayListBuilder).

MozReview-Commit-ID: 8PfMm3bHeSZ
2017-04-27 12:04:25 -04:00
Kartikaya Gupta
ed6e5a8d25 Bug 1359842 - Add a StackingContextHelper to reduce duplicated code. r=nical
This class is a RAII class that can be used to push a stacking context
with properties from a WebRenderLayer. It can also then be used to
convert rects in the layer coordinate system to be relative to the
stacking context, which is what we want for passing to WR.

MozReview-Commit-ID: 1WVrfRYqLqc
2017-04-27 12:04:25 -04:00
Kartikaya Gupta
342f3e9393 Bug 1359842 - Rename ParentStackingContextBounds to ParentBounds. r=nical
MozReview-Commit-ID: HmvRnzvgRML
2017-04-27 12:04:13 -04:00
Kartikaya Gupta
2ca75cca15 Bug 1359842 - Remove unused function. r=nical
MozReview-Commit-ID: GJxowTIOyCT
2017-04-27 12:04:13 -04:00
Kartikaya Gupta
52f3a8a0d9 Bug 1359842 - Convert RelativeToParent to deal with typed units. r=nical
As we are often converting from LayoutDevicePixel to LayerPixel types
in WebRenderDisplayItem code, I added a convenience overload of
RelativeToParent that takes a LayoutDeviceRect and returns a LayerRect,
even though this is a potential footgun if abused.

MozReview-Commit-ID: DABAWdOBsbV
2017-04-27 12:04:13 -04:00
Kartikaya Gupta
2ad1749b23 Bug 1359842 - Replace use of NSRectToRect in WebRender-related code with proper LayoutDevicePixel types. r=nical
MozReview-Commit-ID: 7MXFubPtLoD
2017-04-27 12:04:12 -04:00
Kartikaya Gupta
6af3a99399 Bug 1359842 - Convert some functions to deal in LayerRect instead of gfx::Rect. r=nical
MozReview-Commit-ID: LRXgYseBRzR
2017-04-27 12:04:12 -04:00
Kartikaya Gupta
53d559cbd5 Bug 1359842 - Do some cleanup of GetWrClipRect. r=nical
This extracts a strongly-typed ClipRect() function from GetWrClipRect.
GetWrClipRect is left as a weakly-typed wrapper for existing call sites,
and also does the necessary reference point conversions.

MozReview-Commit-ID: EuyzYIYLR6S
2017-04-27 12:04:12 -04:00
Kartikaya Gupta
59ee4ab32a Bug 1359842 - Do some cleanup of GetWrRelBounds. r=nical
This moves the bulk of the meaningful work done by GetWrRelBounds into
strongly-typed helper functions. GetWrRelBounds is left as a wrapper so
call sites don't need to be updated yet. Note also that the
strongly-typed functions do not do any conversions from one reference
point from another (e.g. by calling the RelativeToXXX functions).

MozReview-Commit-ID: B3nPbOJOf9o
2017-04-27 12:04:12 -04:00
Kartikaya Gupta
6de178fbc1 Bug 1359748 - Extract a WebRenderLayer.{h,cpp} from WebRenderLayerManager.{h,cpp}. r=jrmuizel
Other than moving the code into new files, this just cleans up includes
in the modified and dependent files.

MozReview-Commit-ID: JpJ8rwOkfOO
2017-04-27 11:28:31 -04:00
Kartikaya Gupta
23a6b280d3 Bug 1359748 - Remove commented-out code. r=jrmuizel
MozReview-Commit-ID: 2f67oNaa8Tk
2017-04-27 11:28:23 -04:00
Kartikaya Gupta
73a014cd3e Merge m-c to graphics
MozReview-Commit-ID: 6UBB4TW6an5
2017-04-27 09:31:17 -04:00
sotaro
d55898f8b9 Bug 1358014 - Allocate PipelineId with IPC MozPromise r=nical 2017-04-26 19:18:06 -07:00
Kartikaya Gupta
a1274c6309 Bug 1358156 - Update webrender to 1437cc124696ecc95b726dffa17f918bb6ea5af1. r=jrmuizel
In addition to updating the Cargo.toml/Cargo.lock files and generated FFI header,
this patch also:
- Updates a couple of field names in the IPC serialization code as a result
  of webrender cset 8ca10a8
- Removes z-index related goop, since it's no longer needed as of webrender
  cset c872232
2017-04-26 10:33:14 -04:00
Ethan Lin
7e585b9063 Bug 1359314 - Apply mask layer transform when building webrender mask layer. r=mchang 2017-04-26 15:34:14 +08:00
Sotaro Ikeda
db5728f564 Backout Bug 1358014 2017-04-25 12:13:32 -07:00
Sotaro Ikeda
771c5a7696 Bug 1358014 - Add a capability to allocate PipelineId with IPC MozPromise r=nical 2017-04-25 10:39:56 -07:00
Kartikaya Gupta
961e3cdbf2 Merge m-c to graphics
MozReview-Commit-ID: GdyXEYZsVuX
2017-04-25 08:32:48 -04:00
Carsten "Tomcat" Book
5b0ec70e2e merge autoland to mozilla-central a=merge 2017-04-25 11:23:43 +02:00
Kartikaya Gupta
f8bacc7c52 Merge m-c to graphics
MozReview-Commit-ID: 3s6ISsQ3jG9
2017-04-24 09:17:28 -04:00
Lee Salzman
cc97aeac73 Bug 1357952 - update WebRenderAPI to allow index in add_raw_font. r=jrmuizel 2017-04-21 11:50:21 -04:00
Kartikaya Gupta
85843c14c6 Bug 1345017 - Fix android build bustage due to missing include. r=bustage
MozReview-Commit-ID: 7l09VoFQlBH
2017-04-21 11:11:19 -04:00
Kartikaya Gupta
3af8d29cef Merge m-c to graphics
MozReview-Commit-ID: 5zsIClrx1FB
2017-04-21 10:01:47 -04:00
Alexis Beingessner
c409cfb1c7 Bug 1357392 - Update IPC code for new fields in struct added in cb0bc28. r=kats
MozReview-Commit-ID: 4wc6wsvxcZQ
2017-04-21 09:59:01 -04:00
sotaro
b2e26d2de6 Bug 1346143 - Forget the widget pointer in WebRenderLayerManager::Destroy() r=nical 2017-04-21 18:31:52 +09:00
Kartikaya Gupta
c966d82171 Bug 1357754 - Trigger the APZ hit-testing tree rebuild. r=jrmuizel
This is the code that takes the incoming WebRender transaction and tells
APZ to rebuild the hit-testing tree from it.

MozReview-Commit-ID: DTuRmp5QZpg
2017-04-20 10:38:06 -04:00
Kartikaya Gupta
b873db8033 Bug 1357754 - Record the isFirstPaint flag in the WebRenderScrollData. r=jrmuizel
MozReview-Commit-ID: KKiRBLRTfEj
2017-04-20 10:38:06 -04:00
Kartikaya Gupta
c24be9245e Bug 1357754 - Hook up chaining layer trees. r=botond,jrmuizel
When APZ traverses a tree using LayerMetricsWrapper, the layer tree
already has its RefLayers connected because of the in-scope
AutoResolveRefLayers. When traversing using the
WebRenderScrollDataWrapper though, this is not the case, and we need to
explicitly jump from one layer tree to another during the walk.
Thankfully we don't require upwards traversal in the tree or this would
be much more complicated.

MozReview-Commit-ID: 8gbvUlzghLx
2017-04-20 10:38:06 -04:00
Kartikaya Gupta
830b3afabf Bug 1357754 - Add more data to the WebRenderScrollData object. r=botond,jrmuizel
This puts all the other things that APZ needs into the
WebRenderScrollData object. The main exception is the scroll clip - I'm
not totally sure how that will be handled yet, so for now we just return
no clip from WebRenderScrollDataWrapper.

MozReview-Commit-ID: 1IhGhSFiPYi
2017-04-20 10:38:05 -04:00
Kartikaya Gupta
c81904537b Bug 1357754 - Add ScrollDirection IPC serialization code. r=botond
In the next patch we'll need to send ScrollDirection over IPDL so we
need to add serialization code for it.

MozReview-Commit-ID: HK8ibuhhnkS
2017-04-20 10:38:05 -04:00
Kartikaya Gupta
652aeccaf3 Bug 1357754 - Implement the traversal functions of WebRenderScrollDataWrapper. r=botond
This mainly implements the GetLastChild and GetPreviousSibling functions
in the WebRenderScrollDataWrapper, and adds helper functions that are
needed to make that possible. This allows the WebRenderScrollDataWrapper
to simulate a full "LayerMetrics" tree using the information in the
underlying WebRenderScrollData object.

MozReview-Commit-ID: K82Ud2gAo8K
2017-04-20 10:38:05 -04:00
Kartikaya Gupta
dc592484af Bug 1357754 - Add WebRenderScrollDataWrapper. r=botond
This adds the WebRenderScrollDataWrapper class which is
template-compatible with LayerMetricsWrapper. While the
LayerMetricsWrapper operates on an underlying layer tree, the
WebRenderScrollDataWrapper will simulate a layer tree based on an
underlying WebRenderScrollData object. The class is stubbed out here,
functions will be implemented in subsequent patches.

MozReview-Commit-ID: 9exnFRI6tOW
2017-04-20 10:38:05 -04:00
Kartikaya Gupta
041cb2ac76 Bug 1357754 - Replace LayerMetricsWrapper::AsRefLayer with GetReferentId. r=botond
This further abstracts away the direct dependence on particular layer
types. This is needed in particular for the APZCTreeManager call site
since it will need to operate on non-layer-tree data which is hard if it
relies specifically on RefLayer.

MozReview-Commit-ID: zbK3oTNHJc
2017-04-20 10:38:05 -04:00
Kartikaya Gupta
df9e1f5cf2 Bug 1357754 - Extract a template function from UpdateHitTestingTree. r=botond
Currently the public UpdateHitTestingTree function takes a Layer* which
assumes there is a layer tree to traverse. However, with WebRender, that
is not the case. This patch has two conceptual changes.

The first change is to extract the innards of UpdateHitTestingTree to take
a LayerMetricsWrapper instead of a Layer* and traverse the layer tree
using that. This was already mostly happening but this makes the
Layer*/LayerMetricsWrapper boundary a little more explicit.

The second change is to make the extracted helper function templated, so
it accepts anything that is template-compatible with
LayerMetricsWrapper. I chose to use a template rather inheritance to
avoid the performance hit of virtual functions, since this code runs
relatively often.

This paves the way for adding a different kind of tree-traversal object
instead of the LayerMetricsWrapper while reusing the same logic to build
the hit-testing tree and APZC nodes.

MozReview-Commit-ID: 6SmnX6Bn2QV
2017-04-20 10:38:04 -04:00
Kartikaya Gupta
e5361ecae8 Bug 1357754 - Add a mechanism to send scroll data to APZ over PWebRenderBridge. r=jrmuizel
This adds a WebRenderScrollData class (which contains a list of
WebRenderLayerScrollData objects, among other things), and adds it to
the DPEnd/DPSyncEnd messages sent across PWebRenderBridge. These classes are
skeletons for now (more stuff will be added to them in future patches).

MozReview-Commit-ID: 9duxwlUpdu7
2017-04-20 10:38:04 -04:00
Kartikaya Gupta
73f3f83950 Merge m-c to graphics
MozReview-Commit-ID: 3l2zmVoMgdl
2017-04-20 08:47:24 -04:00
Iris Hsiao
ee4dc0a75c Merge mozilla-central to autoland 2017-04-25 11:28:40 +08:00
Randall Barker
1789510710 Bug 1358763 - Prevent Android Dynamic Toolbar v3 from trying to send IPC message after shutdown r=kats
MozReview-Commit-ID: LKVZNJy32ot
2017-04-24 13:22:33 -07:00
sotaro
8305f0b97e Bug 1356944 - Fix external image id allocation of WebRenderTextureHost r=nical 2017-04-20 10:24:13 +09:00
Wes Kocher
a76c3859c5 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Cb0b59wJ0vy
2017-04-21 17:35:24 -07:00
Ben Kelly
b0cad64d79 Bug 1358622 Fix unified build bustage in PUiCompositorController.ipdl. r=kats 2017-04-21 19:15:54 -04:00
Mason Chang
4f30424b82 Bug 1337761 - Part 2: Don't send external images to the parent side if a transaction is incomplete. r=nical 2017-04-19 15:39:46 -07:00
Mason Chang
8e86b7e81b Bug 1337761 - Implement WebRenderLayerManager::EndEmptyTransaction. r=mattwoodrow 2017-04-19 15:39:44 -07:00
Randall Barker
92c76d8651 Bug 1358781 - Android Dynamic Toolbar v3 keep the controller toolbar height in sync with the compositor toolbar height while animating r=kats
Android Dynamic Toolbar v3 toolbar height between controller
and compostior threads would get out sync during animation. Added code
to insure they stay in sync while the compositor thread is updating the
toolbar height during an animation. Also, when the controller thread was
canceling an animation, the compositor thread was not checking that it
was still animating before unlocking the toolbar.

MozReview-Commit-ID: 1TSfaRD0lMj
2017-04-24 08:38:52 -07:00
Kartikaya Gupta
52bc8add68 Merge m-c to graphics
MozReview-Commit-ID: 8Oqr9Nbqsn0
2017-04-19 07:02:32 -04:00
Kartikaya Gupta
5da2b0a835 Bug 1357541 - Use the full 64 bit value of the PipelineId when converting to a layers ID. r=nical
MozReview-Commit-ID: 98OOkEML6RF
2017-04-19 06:58:10 -04:00