Commit Graph

91 Commits

Author SHA1 Message Date
Kartikaya Gupta
c4fd192cd9 Bug 1376215 - Stop exposing the WrClipRegionToken in WebRenderAPI.h APIs. r=jrmuizel
No functional changes intended in this patch. It merely simplifies the
additional patch that we'll need to update gecko past WR cset 0bf6655,
and saves some potential manual rebasing work.

MozReview-Commit-ID: Km8dBotP3NQ
2017-06-26 07:49:52 -04:00
Carsten "Tomcat" Book
050bc3b644 Backed out changeset 504e5b1de987 (bug 1376215) for bustage 2017-06-26 13:07:09 +02:00
Kartikaya Gupta
44a6c1a913 Bug 1376215 - Stop exposing the WrClipRegionToken in WebRenderAPI.h APIs. r=jrmuizel
No functional changes intended in this patch. It merely simplifies the
additional patch that we'll need to update gecko past WR cset 0bf6655,
and saves some potential manual rebasing work.

MozReview-Commit-ID: AgMyNapY2Og
2017-06-25 14:45:54 -04:00
Kartikaya Gupta
54c871714b Bug 1372603 - Move the clip rect for async images outside the iframe item. r=jrmuizel,sotaro
The async images codepath is a bit different in that it pushes an iframe
item to the WR display list and updates it asynchronously. However in
this case it still makes sense to push the layer's local clip
outside the iframe, and just populate the iframe with the image and not
worry about clips inside the iframe. As mentioned in part 1 of this
patchset, this will be needed to properly handle async scrolling.

This patch makes the necessary changes to push the clip outside the
iframe and simplifies what happens in WebRenderCompositableHolder to
generate the display list for the iframe itself.

MozReview-Commit-ID: DeZElH4p4rc
2017-06-14 15:43:16 -04:00
Kartikaya Gupta
0f55c95b56 Bug 1372603 - Make sure the mask rect is relative to the enclosing stacking context. r=jrmuizel
This ensures that for layers with both transforms and mask layers, the
mask layer is properly positioned outside of the transform and relative
to the proper stacking context.

MozReview-Commit-ID: 79yvhxQCykW
2017-06-14 15:43:16 -04:00
Kartikaya Gupta
9ad40e6fb9 Bug 1372603 - Push the layer's local clip rect outside the stacking context. r=jrmuizel
For various reasons, we want to be pushing the layer's local clip rect
outside of the stacking context rather than inside it. Not only is this
more correct with respect to the semantics of the layer tree, we also
need it in order to properly handle fixed-positioning of layers with
async scrolling.

This patch does the bulk of the work to make this happen. Most of the code
in the individual layer classes to process the layer's local clip rect
is removed, and instead a function in ScrollingLayersHelper is added to
deal with it. There are a couple of places that individual layer classes
still handle this but those will be removed in future patches. Note that
the individual layer classes still need to provide a clip rect of some
sort in order to push their display items, and now they simply use their
visible region bounds for this purpose.

MozReview-Commit-ID: IBmfUdJwYx1
2017-06-14 15:43:16 -04:00
JerryShih
4789437eb4 Bug 1366502 - Rename mImageClientTypeContainer into mImageClientContainerType. r=sotaro
MozReview-Commit-ID: LcSHVkBbM6G
2017-06-07 23:44:03 +08:00
sotaro
551d6c6ee1 Bug 1359993 - Reduce invalidation of video r=nical 2017-06-05 20:55:14 +09:00
sotaro
971c53525d Bug 1345054 part 1 - Allocate pipleline for each video r=nical 2017-06-02 16:11:34 +09:00
Kartikaya Gupta
66b57574e1 Bug 1367734 - Update webrender to cset a54cc729259588dd1ff52c86d0c62cb2a1767137. r=jrmuizel,jerry
In addition to updating webrender and webrender_traits, this patch:
- bumps the euclid dependency in webrender_bindings to match webrender
- updates the Cargo.lock files and re-vendors third-party rust packages
- updates the push_yuv_image callers due to an API change in WR cset a4b9e25.
2017-06-01 08:57:10 -04:00
sotaro
2e1dd2b3e1 Bug 1366915 part 2 - Make CompositorBridgeChild allocate pipeline id for async image pipeline r=nical 2017-05-30 09:59:44 +09:00
sotaro
8e3655563c Bug 1366915 part 1 - Remove pipeline id allocation with IPC MozPromise r=nical 2017-05-30 09:59:29 +09:00
Kartikaya Gupta
4cb59d6ee9 Merge m-c to graphics
MozReview-Commit-ID: HvsAeMjJAIA
2017-05-19 09:30:48 -04:00
JerryShih
7da00c0549 Bug 1364922 - Create individual imageKey for each channel in the textureClient. v2. r=nical
WebRenderImageLayer will create the proper number of imageKey for different video format. Then, send the imageKey to The WebRenderBridgeParent.

MozReview-Commit-ID: HMp4KWCCFqU
2017-05-19 00:25:42 +08:00
JerryShih
5144a865eb Bug 1362049 - Use the MacIOSurface texture directly for video playback. r=nical
Use the MacIOSurface with APPLE_rgb_422 format directly in WR.

MozReview-Commit-ID: 19GLtuJLiPv
2017-05-18 22:59:08 +08:00
Kartikaya Gupta
cc1457011b Bug 1361497 - Push scrolling clips for scrollable layers in the layer tree. r=jrmuizel
This adds an RAII helper and uses it in RenderLayer functions. When APZ
is enabled, the RAII helper pushes a scrolling clip for each scrollable
metrics on the layer. It also pops off the scrolling clips on
destruction. Note that this should happen before any other things are
pushed into the WR display list for the rendering of a layer, since
those things should be subjected to the enclosing scrolling clips.
If APZ is disabled, this skips pushing the scrolling clips.

MozReview-Commit-ID: 1qv9egKbbok
2017-05-12 13:58:15 -04:00
Alexis Beingessner
6ec49a9792 Bug 1361751 - Update gecko bindings to webrender to reflect changes in PR 1181. r=kats
MozReview-Commit-ID: Fxt4sNm4vxa
2017-05-08 13:52:16 -04:00
Kartikaya Gupta
41854dac48 Bug 1361356 - Properly unapply the stacking context transform and origin translation when building mask layers. r=ethlin
MozReview-Commit-ID: B5XzX6Tq4PZ
2017-05-05 11:44:49 -04:00
Kartikaya Gupta
f26d6d162e Bug 1360246 - Remove the RelativeToParent functions by propagating StackingContextHelper chains. r=nical
The only remaining callers of RelativeToParent() are in
StackingContextHelper itself, which we can remove now by having the SCH
take a parent SCH and use it instead of RelativeToParent(). This patch
implements this change.

This makes a failing test pass, because of how preserve-3d container
layers work. Specifically, preserve-3d container layers render their
descendants in z-order, not in tree order. If those children were assuming
that their parent had already pushed a stacking context, that assumption
may have been false because the parent might have not yet been rendered
because of z-ordering. By using the StackingContextHelper chain instead
of the layer tree ancestry, we fix the stacking-context-relative coordinates
being used in the descendant subtree of preserve-3d container layers.

MozReview-Commit-ID: HzZvBuAlMdB
2017-05-03 08:48:08 -04:00
Kartikaya Gupta
b87a58caed Bug 1360246 - Propagate a StackingContextHelper all the way through the RenderLayer traversal. r=nical
This is needed in part 3 to update WebRenderTextLayer::RenderLayer, so
that it no longer assumes the parent container layer has pushed a
stacking context, and instead explicitly uses the StackingContextHelper.

MozReview-Commit-ID: 9twUmDgUipX
2017-05-03 08:48:06 -04:00
JW Wang
215c52a63a Bug 1365516 - Remove the call to AbstractThread::GetCurrent() in WebRenderImageLayer.cpp. r=sotaro
MozReview-Commit-ID: 5UMQuqEMZCu
2017-05-18 14:23:09 +08:00
Ethan Lin
77f467b84f Bug 1360449 - Remove duplicate WrManager functions. r=kats 2017-05-01 00:59:26 +08: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
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
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
23a6b280d3 Bug 1359748 - Remove commented-out code. r=jrmuizel
MozReview-Commit-ID: 2f67oNaa8Tk
2017-04-27 11:28:23 -04:00
sotaro
d55898f8b9 Bug 1358014 - Allocate PipelineId with IPC MozPromise r=nical 2017-04-26 19:18:06 -07: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
sotaro
2f88c289f9 Bug 1357644 - Use wr::ExternalImageId instead of uint64_t for external image id r=nical 2017-04-19 18:59:53 +09:00
sotaro
90e4a10adb Bug 1355702 - Reduce WrImageKey allocation for ExternalImages on sync ImageContainer 2017-04-19 11:08:35 +09:00
Ethan Lin
ea8636c2c0 Bug 1349500 - Add webrender support for BulletFrame path type. r=mchang 2017-04-18 14:26:41 +08:00
sotaro
51d8d19e56 Bug 1356088 - Fix ImageKey removals of ExternalImages r=jrmuizel 2017-04-13 20:53:21 +09:00
Ethan Lin
637a373447 Bug 1355012 - Add mask layer support for WebRenderDisplayItemLayer. r=kats 2017-04-13 15:13:51 +08:00
Jeff Muizelaar
57f7b86df9 Bug 1345142. Move Image discard back to child. r=nical
This gets rid of the implicit discard that happens on the parent side
when using external images.
2017-04-12 15:26:23 -04:00
Kartikaya Gupta
d0c75fa3fc Bug 1355791 - Instead of pushing a scroll layer, put the clip mask into the existing item clip. r=jrmuizel
MozReview-Commit-ID: jdKEkamSs4
2017-04-12 11:08:39 -04:00
sotaro
28fa9720e0 Bug 1355678 - Remove unused code from WebRenderImageLayer::RenderMaskLayer() r=ethlin 2017-04-12 16:51:13 +09:00
Kartikaya Gupta
3cd9ae859b Bug 1355602 - Decouple pushing scroll layers from pushing stacking contexts. r=jrmuizel
This removes the call to push_scroll_layer in wr_push_stacking_context, so that
it's now possible to push a stacking context without necessarily pushing a
scroll layer. There is already a separate function to push a scroll layer so the
call sites can do that. This patch just changes all the call sites that were
pushing a stacking context to also push a scroll layer, so there should be no
functional change. Future patches can remove the spurious scroll layers.

MozReview-Commit-ID: FtCkc9JQd8l
2017-04-11 17:04:59 -04:00
Ethan Lin
4d4150d87a Bug 1354464 - Fix the size of webrender mask layer. r=mchang 2017-04-10 17:10:37 +08:00
sotaro
367523413a Bug 1345712 - Fix rebasing failure part 2 r=jrmuizel 2017-03-13 23:55:39 +09:00
sotaro
750f246eae Bug 1345712 - Fix rebasing failure r=jrmuizel 2017-03-13 15:46:05 +09:00
Ethan Lin
2cbaf58fd5 Bug 1341565 - Use external image to handle mask layer. r=jrmuizel 2017-03-10 17:51:47 +08:00
sotaro
e5f7eb5db9 Bug 1345712 - Add ScaleMode handling to WebRenderImageLaye r=jrmuizel 2017-03-10 17:48:22 +09:00
sotaro
fdb17273f3 Backout Bug 1345712 2017-03-10 15:56:26 +09:00
sotaro
4cac95a8b2 Bug 1345712 - Add ScaleMode handling to WebRenderImageLayer r=jrmuizel 2017-03-10 14:14:43 +09:00
Ryan Hunt
6ecc4704b8 Bug 1345975 - Clean up WebRenderLayer code r=kats
MozReview-Commit-ID: DWlAaJwuxlD
2017-03-09 12:35:33 -05:00
sotaro
83b7253222 Bug 1345749 - Apply RelativeToVisible r=jrmuizel 2017-03-10 07:49:53 +09:00
Ryan Hunt
d7f00f1fa2 Bug 1345907 - Use clip region instead of clip rect r=kats 2017-03-09 11:57:06 -05:00
Mason Chang
01aeb6725a Bug 1345523 - Clean up duplicated WebRenderLayer code. r=kats 2017-03-08 10:32:53 -08:00
Jeff Muizelaar
677ccdea94 Bug 1344396. Build the display lists directly. r=kats
This is a largely uninteresting patch that just uses the DisplayListBuilder
directly. A wonderful cleanup patch will come after this. One of the more
interesting pieces is the use of PushBuiltDisplayList. This is needed for
handling empty transactions. See https://github.com/servo/webrender/pull/934
for more info.
2017-03-06 23:16:30 -05:00