Commit Graph

220 Commits

Author SHA1 Message Date
Sotaro Ikeda
848aa7ecc5 Bug 1461239 - Use InvalidateRenderedFrame() when necessary r=nical 2018-10-09 23:20:23 -04:00
Jeff Muizelaar
d7cb9ac2ef Bug 1494836. Replace NormalizedRect for visible area. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D7189
2018-09-26 10:32:41 -04:00
shindli
a8d55dae12 Merge inbound to mozilla-central. a=merge 2018-09-27 00:52:12 +03:00
Jean-Yves Avenard
a4846efef7 Bug 1493198 - P4. Add support for 10/12 bits YUV image to WebRender (bindings) r=mattwoodrow
Depends on D6663

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

--HG--
extra : moz-landing-system : lando
2018-09-26 14:58:25 +00:00
Nicolas Silva
924db561d6 Bug 1477819 - Expose Transaction::Notify in WebRender's C++ wrapper. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D6515

--HG--
extra : source : 8d58404d71eb944d9dda642c8dc2f53f1d291671
extra : histedit_source : f469b56422dadfe5a5f67faa9e9efddd5839d1ce
2018-09-24 17:53:36 +02:00
Jeff Muizelaar
24fdba412e Bug 1493268. Re-generate FFI header and adjust bindings.
Changes GlyphRasterSpace to RasterSpace.
2018-09-22 21:19:52 -04:00
Jeff Muizelaar
14d863897b Bug 1491395. Replace BorderWidths with LayoutSideOffsets. on a CLOSED TREE
--HG--
extra : source : 432d22af68c825eebd86482c714b3cffcba408c7
extra : amend_source : e38a2ed15ae4a93613244726fbfad2d196876ad8
2018-09-18 09:01:36 -04:00
Andreea Pavel
21be148b05 Backed out 2 changesets (bug 1491395) for failing awsy\test_memory_usage.py TestMemoryUsage.test_open_tabs on a CLOSED TREE
Backed out changeset 432d22af68c8 (bug 1491395)
Backed out changeset 153d6dc38962 (bug 1491395)
2018-09-18 21:23:03 +03:00
Jeff Muizelaar
58ae2188e5 Bug 1491395. Replace BorderWidths with LayoutSideOffsets. 2018-09-18 09:01:36 -04:00
Bobby Holley
f35563781f Bug 1480293 - Basic Memory Reporting for WebRender. r=jrmuizel
Reviewers: jrmuizel, gw

Tags: #secure-revision

Bug #: 1480293

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

MozReview-Commit-ID: 1vGl3890CjR
2018-09-14 15:27:31 -07:00
Gurzau Raul
d4d9bd916d Backed out changeset 9762d76da9b3 (bug 1480293) for failing at aboutmemory/tests/test_memoryReporters.xul 2018-09-14 22:32:18 +03:00
Bobby Holley
42a527b3d1 Bug 1480293 - Basic Memory Reporting for WebRender. r=jrmuizel
Reviewers: jrmuizel, gw

Tags: #secure-revision

Bug #: 1480293

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

MozReview-Commit-ID: 1vGl3890CjR
2018-09-14 10:59:00 -07:00
Andrew Osmond
a2a48940be Bug 1485420 - Part 1. Expose WebRender bindings to merge a clip rect with a display item. r=mstange
This part allows the caller to push a clip rect onto a stack that will
be used with any display items added to DisplayListBuilder. Said rect
will be intersected with the given clip rect for the display item (if
applicable).
2018-09-14 10:42:20 -04:00
Nicolas Silva
f5c8fc210d Bug 1477819 - Use WebRender low priority transactions for web content. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D5531

--HG--
extra : rebase_source : 627738d5f791aa9c243e0174d3d153f5ac8e319f
2018-09-12 15:30:17 +00:00
Emilio Cobos Álvarez
2afc706839 Bug 1487407 - Properly support beveling bc borders in WR. r=Gankro
The previous border-collapse beveling implementation assumed that there would
only be one beveled border per side in the whole table, which is... not true at all.

So a bunch of borders ended up clobbering other values in mBevelBorders and
never getting painted.

I'm actually somewhat scarily surprised that only this reftest seems to fail
without this patch...

Here we reuse most of the existing one-off beveling / border rendering support
in nsCSSRendering, and convert the Gecko bevels into a WebRender display list
using rects and borders. This is only remotely possible thanks to Gecko not
supporting dotted / dashed beveled borders :)

This would slightly easier and presumably also more efficient with a triangle
display item in WR instead of (ab)using the border display item to render the
bevel, but this is probably relatively edge-casey so maybe not worth it... In
any case I've left a TODO comment there, that can be a nice followup if we deem
it worth it.

Anyway, I'm _so_ sorry for the border trick, I was this (||) close to go and
rewrite our border collapsing code, but after a few tries I realized it'd take
me a whole lot of time (instead of the day that this has taken me).

Differential Revision: https://phabricator.services.mozilla.com/D4793
2018-09-26 15:27:59 +02:00
Lee Salzman
daa9f58360 Bug 1479196 - add support to TextDrawTarget for defining and pushing WR images. r=nical 2018-08-21 12:36:48 -04:00
Nicolas Silva
0805d95b99 Bug 1482109 - Hook the memory pressure observer up with WebRender. r=sotaro
--HG--
extra : rebase_source : e23d9db4ffff5d1994f476e660f7f6cbe52e6ad6
2018-08-20 15:23:54 +02:00
Nicolas Silva
3cea37c9c2 Bug 1469496 - Handle video memory purge with WebRender. r=sotaro 2018-08-10 17:14:57 +02:00
Nicolas Silva
6d4507f6ff Bug 1455422 - Implement the new blob image rasterization hooks. r=kats, gankro 2018-07-19 16:33:05 -04:00
sotaro
8b12e2f10c Bug 1476876 - Make FlushRendering async if DComp is used on Windows with WebRender r=nical 2018-07-20 22:58:40 +09:00
Kartikaya Gupta
e750c8c1b4 Bug 1475637 - Add a mechanism for dumping an interleaved display list. r=jrmuizel
The prefs, when enabled, will dump the gecko DL items followed by the
WR DL items that were generated from that gecko item. This allows us to
easily go from a DOM element with known id/class attributes to e.g. an
ImageKey of an image that was generated for that element.

Also, this logging can be enabled in CI builds just like gecko display-list
dumping, instead of the ifdef that we previously had in WebRenderLayerManager.

MozReview-Commit-ID: Eeo4iO62YY1

--HG--
extra : rebase_source : b4a348b2e8bced976489257b966f70b29c56df25
2018-07-19 15:30:30 -04:00
Andrew Osmond
7fb17ddb91 Bug 1469964 - Part 1. Expose WebRender plumbing for partial updates for external images. r=nical 2018-07-12 11:43:09 -04:00
Martin Robinson
34359c5dd9 Bug 1470125 - Update WR bindings for changes in WR PR 2848. r=Gankro
MozReview-Commit-ID: D2hLIqlnfU6

--HG--
extra : rebase_source : 6a0ef8c6d61ab937695c42224eb3acb0a5e531f7
2018-06-13 15:40:13 -07:00
shindli
c83eb1f34f Backed out 3 changesets (bug 1470125) for force-cargo-library-build bustages on a CLOSED TREE
Backed out changeset c6ef35a760ae (bug 1470125)
Backed out changeset cb8bed4a7691 (bug 1470125)
Backed out changeset 82527f62f249 (bug 1470125)
2018-06-28 21:25:33 +03:00
Martin Robinson
be65a0bdb1 Bug 1470125 - Update WR bindings for changes in WR PR 2848. r=Gankro
MozReview-Commit-ID: D2hLIqlnfU6

--HG--
extra : rebase_source : 328d76c6c9f428b55c8116fc447f9e3d6a76371a
2018-06-13 15:40:13 -07:00
Kartikaya Gupta
19dbb3ce5e Bug 1471047 - Ensure the DidComposite start timestamp for WebRender reflects the start of the compositor thread work. r=rhunt
MozReview-Commit-ID: Aya91LtDVZA

--HG--
extra : rebase_source : 3e063e914097b64cbb2fbbb30083a940d0d07190
2018-06-25 17:37:35 -04:00
Kartikaya Gupta
9b664db1ff Bug 1465935 - Fix hit-testing for fixed-pos items inside iframes. r=mstange
Without this patch, the scrollId for display items inside a fixed-pos
item end as the ASR of the item. In the case of fixed-pos items that are
inside iframes, the ASR is the outer document's root scrollframe. This
means that e.g. wheel-scrolling while over a fixed-pos item inside an
iframe ends up scrolling the outer document's root scrollframe instead
of the iframe's root scrollframe.

In the non-WR codepath, there some APZ machinery that walks up in the
HitTestingTreeNode tree from the hit result, looking to see if that node
has a fixed-pos ancestor, and if so, uses the fixed-pos item's target
APZ as the real hit result. This machinery doesn't exist in WR, because
we don't use the HitTestingTreeNode tree for hit-testing in APZ.
Instead, we need to make sure that the item tag for those display items
already has the appropriate scrollid set.

This patch accomplishes this by introducing a new RAII class that is
pushed into the wr::DisplayListBuilder while we are building display
items inside a nsDisplayFixedPosition, and allows the desired scroll id to
be set on the hit-testing display items.

This behaviour is exercised by test_group_wheelevents, which can now be
enabled with this fix.

MozReview-Commit-ID: L2erPVzJeql

--HG--
extra : rebase_source : 1db630513cb1dc16d4e38649812e81f62c8da99c
2018-06-07 13:06:33 -04:00
Martin Robinson
46bd5d1cf4 Bug 1465058 - Update for API change in WR PR 2756. r=kats
MozReview-Commit-ID: 6Vg0bTpBYVh

--HG--
extra : rebase_source : f9b4f5cdb26d268d7804afb827c7710a05bc56d9
2018-05-16 16:47:08 +02:00
Kartikaya Gupta
0e92bc1c16 Bug 1463416 - Update for API changes in WR PR 2718. r=nical
MozReview-Commit-ID: Ct8krYkLfHL

--HG--
extra : rebase_source : ed01919ad38b66d485ae395621167e059f4ec6d8
2018-05-26 11:09:21 -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
Hiroyuki Ikezoe
586992e21b Bug 1460389 - Remove TransactionBuilder::AppendTransformProperties. r=kats
This function is no longer used since we introduced TransactionWrapper class in
bug 1451469.

MozReview-Commit-ID: FGxi6thbxcP

--HG--
extra : rebase_source : ef5628f8bffb5c1fedf6de80056d4ebba41a9edf
2018-05-15 08:59:29 +09:00
Kartikaya Gupta
2b4b8a09ab Bug 1457466 - Make the GenerateFrame transaction bypass the scene builder thread. r=nical
This allows frames to be generated by the render backend thread even
while the scene builder thread is busy with a long scene build. The
GenerateFrame transaction also contains APZ and OMTA information, so
this allows the user to scroll and view OMTAnimations during long scene
builds.

MozReview-Commit-ID: KG5YC2KwIaH

--HG--
extra : rebase_source : 3ba559aa22a3a036a3b3a034ea20caacdc8c864a
2018-05-11 09:09:19 -04:00
Kartikaya Gupta
27baa6b4f2 Bug 1460495 - When sending a transaction, ensure the new transaction that takes its place has the same async-scene-build flag set. r=sotaro
MozReview-Commit-ID: HYwUwqE2P2O

--HG--
extra : rebase_source : 9540a4dc271d51b5d517fb6498d54d0c55eec6c6
2018-05-10 13:05:22 -04:00
Kartikaya Gupta
85e5ccd033 Bug 1458598 - Expose the generated reference frame id for stacking contexts. r=mstange
This is just plumbing, no functional changes yet.

MozReview-Commit-ID: FlmnMVammse

--HG--
extra : rebase_source : edede45a77a829dbd125dc1f18a4c2a4bc8087c1
2018-05-08 09:16:26 -04:00
Martin Robinson
2d70c66a68 Bug 1458870 - Changes necessary to deal with new WebRender nine-patch API from PR 2724. r=jrmuizel
MozReview-Commit-ID: 9217FeM4VJH

--HG--
extra : rebase_source : 72f5ab352a8d70149a2306eed9c7afc87405636e
2018-05-08 10:36:23 -04:00
Kartikaya Gupta
1eb717ccf5 Bug 1377187 - Rewrite the clipping code to use the new clipchain API. r=mstange
The clip chain API in webrender allows us to build the clip state in WR
so that it matches the gecko display list more closely. This patch throws
away ScrollingLayersHelper.* and introduces ClipManager.* which pushes
the clip state to WR using the new method. A quick summary of the new
method is below.

Each display item in gecko has a DisplayItemClipChain which is a chain
of individual clips. The individual clips are defined in WR, and the
clip ids for those clips are put into a WR clip chain using the new
define_clip_chain API. Furthermore, each clip chain can also have a
parent chain, which is used to link a DisplayItemClipChain to the parent
display item's DisplayItemClipChain. This allows the WR clip state to
closely match the structure of the gecko display list clip state,
resulting in more correct behaviour.

There are a few other major changes that are lumped into this patch and
that were tricky to separate into their own patches:
- The collapsing of WrScrollId and WrStickyId into WrClipId. On the WR
  side all the clip ids are treated the same anyway. Trying to preserve
  the arbitrary distinction on the gecko side was resulting in
  increasingly convoluted code, with different kinds of Variant<..>
  types in the method signatures. It was much simpler and resulted in a
  bunch of code deletion to just collapse the types.
- Moving the "override" mechanism from WebRenderAPI to ClipManager. The
  override mechanism (explained in ClipManager.h) was simplified by
  moving it into ClipManager, because it removed the need for tracking
  additional clip stack state in WebRenderAPI.

MozReview-Commit-ID: GGbdFyJGprK

--HG--
extra : rebase_source : baa56ff179e917b0ab5a5c186a3a415761f8050a
2018-05-08 09:08:39 -04:00
Kartikaya Gupta
4cb7167284 Bug 1459714 - Use a single transaction for all things associated with a new display list. r=sotaro
This ensures the commands to delete compositables are received by WR in the same
transaction as the updates to the display list that removes the references to
those compositables. Otherwise, WR can try to do a scene build on the intermediate
state which results in missing pipeline errors.

MozReview-Commit-ID: ByOHCFWSSjt

--HG--
extra : rebase_source : bcc0f129cbd75e3e9e3543236591b22687d39090
2018-05-08 08:49:44 -04:00
Alexis Beingessner
239a528013 Bug 1435094 - wire up GlyphRasterSpace to nsDisplayTransform. r=kats,mstange
When a transform thinks it's animated we should abandon screen rasterization
and instead favour local rasterization. This produces a more visually
pleasant rendering, as pixel-snapping "wobbles" the text between
frames.

The float scale of GlyphRasterSpace::Local is currently unused, but this
PR tries its best to set it to a reasonable value, based on discussion
with glennw about the intended semantics. We agreed it should specify
the scale *relative* to the parent stacking context, which means it's
just whatever scaling the stacking context's transform applies. It's
possible we'll need to clamp this value or make it properly 2-dimensional
later on.

Some book-keeping is added to StackingContextHelper to ensure that
GlyphRasterSpace::Screen is never requested by a descendent
of a stacking context using GlyphRasterSpace::Local.

nsDisplayMask is changed to use a StackingContextHelper to ensure
rasterSpace is properly propagated.

In addition, this is the first commit making use of cbindgen's new support
for bridging Rust enums natively into C++! This bumps our minimum cbindgen
to 6.0.0 (just released).

MozReview-Commit-ID: 9AlsB6nUheB

--HG--
extra : rebase_source : 247e5b197e998682cb4bb74f6f9319a9a4dd3264
2018-05-03 20:38:37 -04:00
sotaro
b482332d39 Bug 1457387 - Remove WrExternalLogHandler r=jrmuizel 2018-05-04 14:31:32 +09:00
Kartikaya Gupta
9d0713c20d Bug 1457448 - Ensure we flush the async scene builder thread before snapshotting. r=nical
MozReview-Commit-ID: 3XTFWiEmk0p

--HG--
extra : rebase_source : 0547263009cfb48bb7f010662d57734ed57f63c7
2018-04-27 10:46:21 -04:00
Noemi Erli
0ec806df24 Backed out changeset f8ad5962fc89 (bug 1435094) bustage in /builds/worker/workspace/build/src/layout/painting/nsDisplayList.cpp on a CLOSED TREE 2018-04-27 04:14:39 +03:00
Alexis Beingessner
4bb2580c85 Bug 1435094 - wire up GlyphRasterSpace to nsDisplayTransform. r=kats,mstange
When a transform thinks it's animated we should abandon screen rasterization
and instead favour local rasterization. This produces a more visually
pleasant rendering, as pixel-snapping "wobbles" the text between
frames.

The float scale of GlyphRasterSpace::Local is currently unused, but this
PR tries its best to set it to a reasonable value, based on discussion
with glennw about the intended semantics. We agreed it should specify
the scale *relative* to the parent stacking context, which means it's
just whatever scaling the stacking context's transform applies. It's
possible we'll need to clamp this value or make it properly 2-dimensional
later on.

Some book-keeping is added to StackingContextHelper to ensure that
GlyphRasterSpace::Screen is never requested by a descendent
of a stacking context using GlyphRasterSpace::Local.

nsDisplayMask is changed to use a StackingContextHelper to ensure
rasterSpace is properly propagated.

In addition, this is the first commit making use of cbindgen's new support
for bridging Rust enums natively into C++! This bumps our minimum cbindgen
to 6.0.0 (just released).

MozReview-Commit-ID: 9AlsB6nUheB

--HG--
extra : rebase_source : 978e51dbedeb1542e0829752b7f828ffeb2872e9
2018-04-25 10:47:34 -04:00
sotaro
1787768767 Bug 1454878 - Update WrExternalLogHandler as to use env_logger r=jrmuizel 2018-04-25 12:05:26 +09:00
Kartikaya Gupta
adaebffdd8 Bug 1451469 - Add a TransactionWrapper class. r=nical
The TransactionBuilder class comes with a bunch of baggage (it
automatically allocates/deallocates a transaction under the hood) which
we will want to avoid for the RB callbacks into APZ. This patch adds a
lightweight TransactionWrapper class that APZ can use to provide the
async transform info and that will be simpler to use in the callback
from rust code.

MozReview-Commit-ID: 1ywhx4TIzGd

--HG--
extra : rebase_source : 0ac4356554db24806d03b44f5384f9b7341d4255
2018-04-16 17:39:26 -04:00
Kartikaya Gupta
cfd585d234 Bug 1453364 - Update scrollbar transforms separately from OMTA transforms. r=nical
Although they still happen in the same transaction, they are done in two
separate frame messages. This results in better encapsulated code on the
C++ side since we don't have to pass around an array of properties, and
will simplify future changes to update these properties at render time
rather than at GenerateFrame time.

MozReview-Commit-ID: 9qUkHX7gmD1

--HG--
extra : rebase_source : 15a319ba270eb1783815c514ae05c6a72e323dac
2018-04-11 15:28:00 -04:00
Alexis Beingessner
faa067542e Bug 1412375 - Create a clipped stacking context for nsDisplayMasks. r=kats,mstange
This was only recently made possible by webrender#2600, which introduced special stacking-context
clips

MozReview-Commit-ID: HQAU7IsfDaz

--HG--
extra : rebase_source : 0ac7f0f3f73abdf5b60ca02b37cfaa7abeecb6a3
2018-04-11 13:00:49 -04:00
Kartikaya Gupta
fde6e769ba Bug 1449982 - Add the plumbing for scene builder thread interaction. r=nical
This is all the (bidirectional) glue that connects the SceneBuilderHooks
to the APZUpdater.

MozReview-Commit-ID: JIqUaClVa57

--HG--
extra : rebase_source : c6da81e63793570f79cdfa153f6d33d2ac05bdf6
2018-04-10 12:29:55 -04:00
Kartikaya Gupta
164909dbed Bug 1449982 - Move the window id allocation to CompositorBridgeParent. r=nical
This includes a signature change from CompositorBridgeParentBase ->
CompositorBridgeParent which is not strictly required, but it makes it less
likely that we'll accidentally create a WebRenderAPI from somewhere else
and pass a nonsense window id. In effect, the signature change makes it
likely that only CompositorBridgeParent will allocate the window ids.

MozReview-Commit-ID: 8AnnmI8RytR

--HG--
extra : rebase_source : 6fd957c4a9e5bb2175bee2cc89f7eb6d27a6bc9e
2018-04-10 12:29:55 -04:00
Martin Roinson
90bbf4505c Bug 1435143 - Properly unwrap Maybe<WrScrollId> for the root scroll frame. r=kats
When comparing a Maybe<WrScrollId> to another WrScrollId we need to properly
handle the case where Nothing() signifies the root scroll frame. This is
equivalent to calling scrollId.valueOr(FrameMetrics::NULL_SCROLL_ID), as was
done before WrScrolLId replaced ViewId in the WebRender ScrollingLayersHelper.
We also have DisplayListBuilder::TopmostScrollId always return a value instead
of a Maybe, since an empty clip stack means that the current scroll id is that
of the root scroll frame.

Previously Nothing() was not equivalent to WrScrollId { 0 }, which caused the
ScrollingLayersHelper to fill the mClipAndScroll value and push another
set of clip and scroll nodes onto the WebRender display list builder.

MozReview-Commit-ID: CeatZlRXtuI
2018-02-07 10:01:56 +01:00
Martin Roinson
e82c2f1d5c Bug 1434288 - Update gecko for API changes in WR PR 2315. r=kats
MozReview-Commit-ID: 7NfZMXOPaDY

--HG--
extra : rebase_source : 782784b5f01fccd7c22286c6fa7e6ee16bf20be0
2018-01-22 19:29:06 +01:00