Commit Graph

178 Commits

Author SHA1 Message Date
Ryan Hunt
676cc7b0d3 Generate webrender_ffi_generated with cbindgen:0.3.3 (bug 1428142, r=nical) 2018-01-04 12:23:34 -06:00
Sebastian Hengst
61716f072e merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-12-01 01:25:54 +02:00
Jeff Muizelaar
32a2e8870b Bug 1379680. Move the displaylist ByteBuf into a Vec instead of copying. r=kats
This eliminates a copy of the displaylist on the compositor thread.
2017-11-30 15:12:14 -05:00
Kartikaya Gupta
f3e4534532 Bug 1389146 - Add code to dump the webrender display list, behind a compile guard. r=jrmuizel
MozReview-Commit-ID: 1tWhE4A7PCa
2017-11-28 15:28:08 -05:00
sotaro
672f1d9cdc Bug 1391159 - Handle WebRender ProgramBinary usage r=nical 2017-11-24 20:58:24 +09:00
sotaro
9af113eac5 Bug 1419307 - Make WebRenderAPI::~WebRenderAPI() fast r=nical 2017-11-24 18:34:50 +09:00
Kartikaya Gupta
da2b3b9560 Bug 1419440 - Update for API change in WR PR 2082. r=mstange
MozReview-Commit-ID: LA846SceCWX
2017-11-23 09:40:00 -05:00
Kartikaya Gupta
ce42bd531f Bug 1389149 - Add WR bindings for setting hit-test info and doing hit-tests. r=mstange
This exposes some functions on wr::DisplayListBuilder to set hit-test
info and to do hit-tests.

The mechanism to set hit-test info is made a little more generic than is
actually used in this patchset, because doing it this way allows for
more optimization possibilities.
Specifically, the API allows setting some hit-testing state which is then
applied to all display items that are created until that state is
updated or cleared. An alternative would be to specify the hit-testing
state explicitly when creating particular display items; however doing
that would force the call sites that create the display items to compute
or obtain the hit-testing state, which would make the code less
encapsulated and harder to refactor/optimize.

MozReview-Commit-ID: EJoCFv83iu8
2017-11-15 11:39:44 -05:00
peter chang
0bdce96f26 Bug 1410334 - Create correct animation properties based on WrAnimationProperty info, r=kats
MozReview-Commit-ID: 6LNbwQd9IfX
2017-11-15 16:09:21 +08:00
Morris Tseng
ddd8709a25 Bug 1342762 - Remove pipeline in RemovePipelineIdForCompositable. r=nical
MozReview-Commit-ID: 29NrWHCGR5V
2017-11-13 17:32:23 +08:00
JerryShih
8ca769d733 Bug 1415816 - integrate gfxCriticalNote/gfxCriticalError for WebRender in gpu process. r=kats
MozReview-Commit-ID: 3Mey7XRYRn6
2017-11-10 07:30:53 -05:00
Kartikaya Gupta
c8c2a5b86e Bug 1411627 - Send the applied offset for sticky frames to WR. r=mstange
There are cases where we do a main-thread paint at a scroll position
where sticky offsets have been applied in order to keep sticky items
visually unmoving. From that paint, it's possible to do an async-scroll
in the direction that reduces the sticky offset. In order for WR to
handle this case properly we need to tell WR how much of a sticky offset
was already applied on the main thread.

MozReview-Commit-ID: 79DsfPpsIfA
2017-11-07 10:16:48 -05:00
Lee Salzman
86623ac36d Bug 1403198 - send font descriptors to WR instead of raw fonts where possible. r=jrmuizel
MozReview-Commit-ID: DYcaO3fE1fc
2017-11-06 20:19:46 -05:00
Markus Stange
e03d56d92c Bug 1386162 - Implement nsDisplayClearBackground using push_clear_rect. r=kats
MozReview-Commit-ID: DlGA7KuZzm0
2017-10-31 11:31:00 -04:00
Kartikaya Gupta
6d8dec3d32 Bug 1412280 - Update sticky code for API change in WR PR 1940. r=jrmuizel
MozReview-Commit-ID: 2I8wpe3Bt1y
2017-10-31 09:17:22 -04:00
Daniel Holbert
bb0a8b6602 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl
2017-10-27 16:10:06 -07:00
Kartikaya Gupta
15eb856122 Bug 1409508 - Handle another clip edge case. r=mstange
This edge case happens when:
- we have a display item A nested inside another display item B
- B has pushed an out-of-band clip, and
- A's clip chain doesn't connect directly to the end of B's clip chain
  but instead connects somewhere farther up the clip chain
See comments in the patch for more details.

MozReview-Commit-ID: 4mCCaVUQuvH
2017-10-25 15:05:20 -04:00
Alexis Beingessner
57cefc4a44 Bug 1401653 - fixup webrender text-decoration bindings. r=jrmuizel
This does 3 things that were all a bit too intermixed to split out cleanly:

1. Teaches TextDrawTarget to handle rectangular clips (while also completely
forbidding other ones). This is necessary to handle how gecko "overdraws"
decorations with clips to create the illusion of continuous lines when they're
actually made out of multiple lines, possibly from different display items
with different lines. Previously gecko *was* handing these clips to
TextDrawTarget to use these clips, but we were just ignoring them.

This is also necessary work to support partial glyphs natively (which apply
rectangular clips to glyphs). Also note that this currently causes a bug
in webrender if combined with zero-blur shadows, but it's not a regression
since we already mishandle clipped decorations. I will work on fixing this
upstream.

2. Changes the intermediate representation of lines from the old webrender
format to a rect-based one. This is in preperation for webrender adopting
that format in a future update.

3. Changes the way wavy lines are processed, correcting some errors in the
old wavy line bindings that lead to them being positioned incorrectly. Also
introduces a wavyLineThickness property that the will be required in a
future webrender update. Wavy lines are unlike any other line, so it's
ultimately desirable to distinguish them.

The net result of these changes is that a companion upstream change (webrender#1923)
will make decoration rendering nearly identical to gecko, and much nicer.
However the clipped shadows issue will need to be seperately resolved before
actually closing this issue.

MozReview-Commit-ID: 6O2wLA6bU3C
2017-10-24 12:44:38 -04:00
Attila Craciun
3db7806c83 Backed out 1 changesets (bug 1401653) for failing no matching function for call in src/layout/generic/TextDrawTarget.h:143:43 r=backout on a CLOSED TREE.
Backed out changeset 5055d2703f2f (bug 1401653)
2017-10-25 16:32:17 +03:00
Alexis Beingessner
65191c5dfb Bug 1401653 - fixup webrender text-decoration bindings. r=jrmuizel
This does 3 things that were all a bit too intermixed to split out cleanly:

1. Teaches TextDrawTarget to handle rectangular clips (while also completely
forbidding other ones). This is necessary to handle how gecko "overdraws"
decorations with clips to create the illusion of continuous lines when they're
actually made out of multiple lines, possibly from different display items
with different lines. Previously gecko *was* handing these clips to
TextDrawTarget to use these clips, but we were just ignoring them.

This is also necessary work to support partial glyphs natively (which apply
rectangular clips to glyphs). Also note that this currently causes a bug
in webrender if combined with zero-blur shadows, but it's not a regression
since we already mishandle clipped decorations. I will work on fixing this
upstream.

2. Changes the intermediate representation of lines from the old webrender
format to a rect-based one. This is in preperation for webrender adopting
that format in a future update.

3. Changes the way wavy lines are processed, correcting some errors in the
old wavy line bindings that lead to them being positioned incorrectly. Also
introduces a wavyLineThickness property that the will be required in a
future webrender update. Wavy lines are unlike any other line, so it's
ultimately desirable to distinguish them.

The net result of these changes is that a companion upstream change (webrender#1923)
will make decoration rendering nearly identical to gecko, and much nicer.
However the clipped shadows issue will need to be seperately resolved before
actually closing this issue.

MozReview-Commit-ID: 6O2wLA6bU3C
2017-10-24 12:44:38 -04:00
Attila Craciun
3285ac9374 Merge inbound to mozilla-central r=merge a=merge 2017-10-25 12:30:28 +03:00
Jeff Muizelaar
a4cd87436d Bug 1410550. Allow updating a dirty rect of a blob image. r=kats 2017-10-24 18:11:04 -04:00
Kartikaya Gupta
3cca2663f5 Bug 1409446 - Treat sticky clips as out-of-band clips. r=ethlin,mstange
MozReview-Commit-ID: C0KEuSrCPEQ
2017-10-24 15:46:00 -04:00
Kartikaya Gupta
edbec34171 Bug 1409446 - Handle nested display item scenarios. r=mstange
This handles some cases where a nested display item's clip chain
implicitly extends from the wrapper item's clip chain.

MozReview-Commit-ID: DmghxOWi81K
2017-10-24 15:46:00 -04:00
Kartikaya Gupta
01510dec8a Bug 1409446 - Modify the extra-clip flag to instead track more useful information. r=ethlin,mstange
Instead of just keeping a count of how many "extra clips" (aka
out-of-band clips) we have pushed, track more complex information for
each clip. In particular, track the display item's normal clip chain, as
well as the clip id of the extra clip that was pushed. This will be
needed to override clip cache information in the next patch.

MozReview-Commit-ID: AWKDTkelhyL
2017-10-24 15:45:59 -04:00
Kartikaya Gupta
979dbf8ee8 Bug 1409446 - Unify the clip stack in WebRenderAPI. r=jrmuizel
By using a variant we can keep a single stack of both clips and
scrollframes, rather than two separate stacks. This is important because
we will want to know how the things are interleaved (e.g. if the last
thing that was pushed was a clip or a scrollframe).

MozReview-Commit-ID: DbhDj2tTq64
2017-10-24 15:45:58 -04:00
Kartikaya Gupta
5cd98ffb08 Bug 1409446 - Remove unused function. r=jrmuizel
We don't use the code to track the parents of each scroll id, so we can
dump it and just keep a set of scroll ids that we've defined to avoid
redefining them.

MozReview-Commit-ID: HY8y7xt9AJ6
2017-10-24 15:45:58 -04:00
Kartikaya Gupta
315891fa60 Bug 1409446 - Wire up the DefineClip and DefineScrollLayer APIs to allow specifying ancestry. r=jrmuizel
The APIs now allow providing the parent clip or scroll info explicitly
instead of having to push it on the stack. For now we just pass
Nothing() to preserve the existing behaviour, so this change is a
functinoal no-op.

MozReview-Commit-ID: dtNamN595
2017-10-24 15:45:57 -04:00
Chih-Yi Leu
e839c8be0b Bug 1393383 - Update webrender binding code to support non-uniform border radius r=kats
MozReview-Commit-ID: 9YIPRJ9Mzfi
2017-10-24 14:44:29 +08:00
Nicolas Silva
2d4b0e9b5b Bug 1407069 - Associate epochs to async image updates. r=sotaro 2017-10-20 16:42:53 +02:00
Alexis Beingessner
53161391fe Bug 1407213 - Update bindings for changes in WR PR 1853. r=jrmuizel
MozReview-Commit-ID: KjSQkZXXIaX
2017-10-13 12:58:32 -04:00
Sebastian Hengst
756ca5872c merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-13 00:55:27 +02:00
Alexis Beingessner
f365063fa9 Bug 1406510 - rewrite TextDrawTarget to push directly into display list. r=jrmuizel
MozReview-Commit-ID: 7rPGlYmmgeg
2017-10-12 17:17:41 -04:00
Ethan Lin
188ceaa501 Bug 1394309 - Part4. Take the border clip as an extra clip. r=kats
MozReview-Commit-ID: 8I5NTxk538c
2017-10-11 17:33:35 +08:00
Sebastian Hengst
5a50c5cb42 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 7Ez95T2ivfR
2017-10-07 10:37:39 +02:00
Alexis Beingessner
41c8b961e6 Bug 1405927 - Change PushGlyphs to take webrender formats. r=jrmuizel
Also cleans up a bunch of TextDrawTarget code as fallout.

This is a significant perf win for textFrames.

MozReview-Commit-ID: J1BDkXZdvnc
2017-10-04 13:49:51 -04:00
Sebastian Hengst
5b7a860a66 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CsjtXJM2vcs
2017-10-05 10:55:31 +02:00
Jeff Muizelaar
2f52a8dfc6 Bug 1405445. Preallocate the display list buffer to a reasonable size. r=kats
This exposes the capacity of the underlying vec and sets it to the capacity of
the previous display list (mLastDisplayListSize). Doing so helps us avoid
reallocing up to the desired size every frame.

Note: the rebased version doesn't actually use a reasonable size. That will happen
in bug 1405819.
2017-10-04 22:31:51 -04:00
Jeff Muizelaar
053d27cea7 Bug 1404955 - Use ComplexClipRegion instead of WrComplexClipRegion. r=kats
cbindgen will let us do this now.
2017-10-03 18:11:14 -04:00
Kartikaya Gupta
d42b152e67 Bug 1405399 - Update due to API change in WR cset 75216e5. r=Gankro
MozReview-Commit-ID: GM8qA0MKaHv
2017-10-04 14:54:37 -04:00
Jeff Muizelaar
2d6111e51a Bug 1405916. Remove unused bindings to push_nested_display_list. r=kats
Bug 1405819 removed the last usage, and this will be needed for
https://github.com/servo/webrender/pull/1806
2017-10-05 14:21:13 -04:00
Jeff Muizelaar
3e09f48086 Bug 1405094. Get rid of wr_dp_begin/end. r=kats
These are unused.
2017-10-02 16:24:30 -04:00
Lee Salzman
424af0fb64 Bug 1397458 - part 4 - supply font variations to WebRender AddFontInstance r=kats
MozReview-Commit-ID: 6JSMMVK0GZm
2017-09-20 23:18:23 -04:00
Ethan Lin
5df9c4ed5d Bug 1398706 - Always create new clip ids in ScrollingLayersHelper if it's inside a mask. r=kats
MozReview-Commit-ID: Hhsbgpqddo1
2017-09-19 17:05:22 +08:00
Kartikaya Gupta
6141081988 Bug 1399505 - Expose the API to add sticky frames to the WR display list. r=mstange
MozReview-Commit-ID: 1SEz6bqMoME
2017-09-21 10:11:39 -04:00
Morris Tseng
bf5537e1ca Bug 1392200 - Update interfaces for backface-visibility support. r=kats
MozReview-Commit-ID: 6ctGRSUI3pB
2017-09-21 14:41:38 +08:00
Nicolas Silva
7100d343f6 Bug 1393031 - Use shared memory to pass resource update data. r=jrmuizel 2017-09-14 18:48:55 +02:00
Nicolas Silva
14647f1316 Bug 1393031 - Separate WebRenderAPI and ResourceUpdateQueue. r=sotaro 2017-09-04 13:59:42 +02:00
Nicolas Silva
a68790f976 Bug 1393031 - Use the ResourceUpdateQueue API on the content side. r=jrmuizel 2017-09-04 13:59:36 +02:00
Nicolas Silva
947168818a Bug 1393031 - Expose webrender transactions at the ipc boundary. r=jrmuizel, r=kanru 2017-09-04 13:59:26 +02:00