Граф коммитов

227 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst 7cbd9c3050 merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-12-01 01:25:54 +02:00
Jeff Muizelaar fd288de282 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 a722a826b0 Bug 1389146 - Add code to dump the webrender display list, behind a compile guard. r=jrmuizel
MozReview-Commit-ID: 1tWhE4A7PCa

--HG--
extra : rebase_source : 2f161e7c488832055d8811f94751e3623c16b490
2017-11-28 15:28:08 -05:00
sotaro dff4491cb4 Bug 1391159 - Handle WebRender ProgramBinary usage r=nical 2017-11-24 20:58:24 +09:00
sotaro cfdcc07b34 Bug 1419307 - Make WebRenderAPI::~WebRenderAPI() fast r=nical 2017-11-24 18:34:50 +09:00
Kartikaya Gupta e9fd0f40fe Bug 1419440 - Update for API change in WR PR 2082. r=mstange
MozReview-Commit-ID: LA846SceCWX

--HG--
extra : rebase_source : 897b45d30d374be3df7d6ea025a2d27edad9776f
2017-11-23 09:40:00 -05:00
Kartikaya Gupta a02e29e13b 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

--HG--
extra : rebase_source : d2a117a52144f76dcc312de2a4047298e78135cb
2017-11-15 11:39:44 -05:00
peter chang 8d32c73914 Bug 1410334 - Create correct animation properties based on WrAnimationProperty info, r=kats
MozReview-Commit-ID: 6LNbwQd9IfX

--HG--
extra : rebase_source : 2b53786ae996237bef7bf8100087b3f48667d718
2017-11-15 16:09:21 +08:00
Morris Tseng 78bddf84f9 Bug 1342762 - Remove pipeline in RemovePipelineIdForCompositable. r=nical
MozReview-Commit-ID: 29NrWHCGR5V

--HG--
extra : rebase_source : 25a4fc2f1abef15dbf5515516a45a34079acc8dd
2017-11-13 17:32:23 +08:00
JerryShih 7fa50ff43a 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 c832839650 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

--HG--
extra : rebase_source : e39316702cff3bd4ee6721c7503a1a9267734cd8
2017-11-07 10:16:48 -05:00
Lee Salzman f11218633f 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 e691e26bec Bug 1386162 - Implement nsDisplayClearBackground using push_clear_rect. r=kats
MozReview-Commit-ID: DlGA7KuZzm0

--HG--
extra : rebase_source : 2c2b402c7f9f2df8cc7cc5e80aa591f3aae946ef
extra : source : 4003a8f5c3c8bf0146183eca287c7ee162bd3d57
2017-10-31 11:31:00 -04:00
Kartikaya Gupta 3a399cf5e5 Bug 1412280 - Update sticky code for API change in WR PR 1940. r=jrmuizel
MozReview-Commit-ID: 2I8wpe3Bt1y

--HG--
extra : rebase_source : 5056aee8978c9bd5c51724ec909125de318f04ad
2017-10-31 09:17:22 -04:00
Daniel Holbert 126bd9e1a4 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

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Kartikaya Gupta 8e9c8a8efc 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

--HG--
extra : rebase_source : 1601a8f0c586d618d395b4e20086b9ecd318945b
2017-10-25 15:05:20 -04:00
Alexis Beingessner 168deb7b2b 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

--HG--
extra : rebase_source : 17254c45145229b75f77f87f85874e66e6edd05e
2017-10-24 12:44:38 -04:00
Attila Craciun 1fc19f42dc 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 7d07e76ce2 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

--HG--
extra : rebase_source : 98da45bc7f2eaabd63ae226c505cb1580b5c8500
2017-10-24 12:44:38 -04:00
Attila Craciun 7bcf901c3b Merge inbound to mozilla-central r=merge a=merge 2017-10-25 12:30:28 +03:00
Jeff Muizelaar faa4cd1783 Bug 1410550. Allow updating a dirty rect of a blob image. r=kats 2017-10-24 18:11:04 -04:00
Kartikaya Gupta 08961382de Bug 1409446 - Treat sticky clips as out-of-band clips. r=ethlin,mstange
MozReview-Commit-ID: C0KEuSrCPEQ

--HG--
extra : rebase_source : b4b42282f37ddbdb4b962ec72571bf280c1c47e4
2017-10-24 15:46:00 -04:00
Kartikaya Gupta 83ac5fdb91 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

--HG--
extra : rebase_source : 8ec95df64fed247650baf8f5e0c868d1934aa6bc
2017-10-24 15:46:00 -04:00
Kartikaya Gupta eae58bd759 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

--HG--
extra : rebase_source : 379e38550cf45d54862850f6c4aad0ac488f6ca9
2017-10-24 15:45:59 -04:00
Kartikaya Gupta 26c5991efb 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

--HG--
extra : rebase_source : c591787f31e6ba864178e27197cf6dff42e39a8d
2017-10-24 15:45:58 -04:00
Kartikaya Gupta d3658ef3fb 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

--HG--
extra : rebase_source : 681154ae6494330f74c022243237b50d4921813b
2017-10-24 15:45:58 -04:00
Kartikaya Gupta 2878061467 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

--HG--
extra : rebase_source : 3b6bd03b919bd31cd89e3f82283cb962f8f6abc5
2017-10-24 15:45:57 -04:00
Chih-Yi Leu bee92ecf09 Bug 1393383 - Update webrender binding code to support non-uniform border radius r=kats
MozReview-Commit-ID: 9YIPRJ9Mzfi

--HG--
extra : rebase_source : c4404c2dbd5e6ab6206b170c506ef07306c8e601
2017-10-24 14:44:29 +08:00
Nicolas Silva e620af06b0 Bug 1407069 - Associate epochs to async image updates. r=sotaro 2017-10-20 16:42:53 +02:00
Alexis Beingessner 896f3904ab Bug 1407213 - Update bindings for changes in WR PR 1853. r=jrmuizel
MozReview-Commit-ID: KjSQkZXXIaX

--HG--
extra : rebase_source : b7df3a991ee74e2ee2bbdce58a1b4970fd4ad012
2017-10-13 12:58:32 -04:00
Sebastian Hengst c2f23c4622 merge mozilla-central to mozilla-inbound. r=merge a=merge
--HG--
rename : browser/base/content/test/general/browser_bug585558.js => browser/base/content/test/tabs/browser_positional_attributes.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm_dollar.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_dollar.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-621644-jsterm-dollar.html => devtools/client/webconsole/new-console-output/test/mochitest/test-jsterm-dollar.html
rename : dom/media/doctor/DDLogClass.cpp => dom/media/doctor/DDLogCategory.cpp
rename : dom/media/doctor/DDLogClass.h => dom/media/doctor/DDLogCategory.h
rename : mobile/android/app/src/main/res/drawable-hdpi/find_prev.png => mobile/android/app/src/photon/res/drawable-hdpi/find_prev.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/find_prev.png => mobile/android/app/src/photon/res/drawable-xhdpi/find_prev.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png
extra : rebase_source : 0cff6fa99d9ea3c6ce0bfb1604d4e9533f63ce63
2017-10-13 00:55:27 +02:00
Alexis Beingessner eeaa4695dc 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 c060e4e17c Bug 1394309 - Part4. Take the border clip as an extra clip. r=kats
MozReview-Commit-ID: 8I5NTxk538c

--HG--
extra : rebase_source : 4c2f8d920612ab8420e17cd459ad7f7bb87c6dc6
2017-10-11 17:33:35 +08:00
Sebastian Hengst b834f0d177 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 7Ez95T2ivfR
2017-10-07 10:37:39 +02:00
Alexis Beingessner c0bfb121ad 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

--HG--
extra : rebase_source : 5a0769a53cadb55a074cfe5d718e259401fa7028
2017-10-04 13:49:51 -04:00
Sebastian Hengst cade0f0bf3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CsjtXJM2vcs
2017-10-05 10:55:31 +02:00
Jeff Muizelaar bdc459cc60 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 5baca5e314 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 561b271b7d Bug 1405399 - Update due to API change in WR cset 75216e5. r=Gankro
MozReview-Commit-ID: GM8qA0MKaHv

--HG--
extra : rebase_source : cb8cddeab931e34ad5cc7392308f177970cdabde
2017-10-04 14:54:37 -04:00
Jeff Muizelaar 2d4dd8435c 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 18b234fd09 Bug 1405094. Get rid of wr_dp_begin/end. r=kats
These are unused.
2017-10-02 16:24:30 -04:00
Lee Salzman ee25ad6434 Bug 1397458 - part 4 - supply font variations to WebRender AddFontInstance r=kats
MozReview-Commit-ID: 6JSMMVK0GZm

--HG--
extra : rebase_source : 07c71d838ecae72271386a645e15b342adc36aba
2017-09-20 23:18:23 -04:00
Ethan Lin fb32d577e9 Bug 1398706 - Always create new clip ids in ScrollingLayersHelper if it's inside a mask. r=kats
MozReview-Commit-ID: Hhsbgpqddo1

--HG--
extra : rebase_source : 40507644148da5bfe6ca3dd5f1f438ac9e7e10ff
2017-09-19 17:05:22 +08:00
Kartikaya Gupta 59ea9aa15f Bug 1399505 - Expose the API to add sticky frames to the WR display list. r=mstange
MozReview-Commit-ID: 1SEz6bqMoME

--HG--
extra : rebase_source : 133853e09f8bc5b1e7d725a53ef3d6a0ab1fdc00
2017-09-21 10:11:39 -04:00
Morris Tseng d17dfbe119 Bug 1392200 - Update interfaces for backface-visibility support. r=kats
MozReview-Commit-ID: 6ctGRSUI3pB
2017-09-21 14:41:38 +08:00
Nicolas Silva 59e80c8f7e Bug 1393031 - Use shared memory to pass resource update data. r=jrmuizel 2017-09-14 18:48:55 +02:00
Nicolas Silva 38b33aa593 Bug 1393031 - Separate WebRenderAPI and ResourceUpdateQueue. r=sotaro 2017-09-04 13:59:42 +02:00
Nicolas Silva 4b7b1e5992 Bug 1393031 - Use the ResourceUpdateQueue API on the content side. r=jrmuizel 2017-09-04 13:59:36 +02:00
Nicolas Silva 09e43ac029 Bug 1393031 - Expose webrender transactions at the ipc boundary. r=jrmuizel, r=kanru 2017-09-04 13:59:26 +02:00
Nicolas Silva 2830bb5952 Bug 1393031 - Make ResourceUpdateQueue move-only. r=sotaro 2017-09-04 13:59:17 +02:00
Nicolas Silva b067cea354 Bug 1393031 - Expose webrender resource updates in the C++ wrapper. r=sotaro 2017-09-04 13:59:12 +02:00
Wes Kocher 6472928439 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 77Uz3uceUmk
2017-08-31 16:56:23 -07:00
Lee Salzman 251cd46deb Bug 1393055 - map ScaledFonts to WebRender FontInstanceKeys. r=jrmuizel
MozReview-Commit-ID: AadEI5CnTZ1
2017-08-30 13:45:11 -04:00
Kartikaya Gupta 21ac463b1b Bug 1395212 - Avoid computing the entire ScrollMetadata for cases where we just need the scroll id. r=mstange
MozReview-Commit-ID: BEYfq2EqIel

--HG--
extra : rebase_source : 7315123162b80758be347c243375e28462352e06
2017-08-30 14:51:19 -04:00
Kartikaya Gupta 543988e106 Bug 1395212 - Update wr::DisplayListBuilder to expose separate APIs for defining and pushing scroll layers. r=mstange
This makes the DisplayListBuilder scrolling API more consistent with the
clipping API, and allows for more optimization at the call site (in the next
patch).

MozReview-Commit-ID: LdCA7wkXDwF

--HG--
extra : rebase_source : 1fe934e778c597f6a639ad2ecbda46995f8fd09e
2017-08-30 14:51:19 -04:00
Kartikaya Gupta b8355b02c7 Bug 1395212 - Hoist the scroll layer deduplication code out of bindings.rs into wr::DisplayListBuilder. r=mstange
This also splits the wr_dp_push_scroll_layer function in bindings.rs into two
separate functions. This makes the API consistent with clipping, and also allows
for optimizations in the upcoming patches.

MozReview-Commit-ID: IXnOZK0dZm

--HG--
extra : rebase_source : aa28875433a03ee9d6c388750f022958958d05e9
2017-08-30 14:51:19 -04:00
Kartikaya Gupta 8933bc1c63 Bug 1394518 - Log the mWrState pointer in WRDL_LOG so we can distinguish the output from different pipelines. r=jrmuizel
MozReview-Commit-ID: A3KDJyBmSCX

--HG--
extra : rebase_source : e5f8f4a3e6e16ed88bb8c8acf28f97fd45f02850
2017-08-28 14:20:25 -04:00
Ethan Lin 376639c99a Bug 1392921 - In TopmostScrollId(), return FrameMetrics::NULL_SCROLL_ID when the scroll id stack is empty. r=kats
MozReview-Commit-ID: 3kmgsisMhW5

--HG--
extra : rebase_source : d9e20940fcc5c1790dbf4f3b6b2769b1fd054121
2017-08-23 14:46:38 +08:00
Nicolas Silva 9f6f1a7d88 Bug 1390840 - Add prefs to display the debugging view of webrender's texture cache and intermediate targets. r=jrmuizel 2017-08-23 12:00:37 +02:00
Sebastian Hengst 441fc1a176 Backed out changeset b9c53ad8893b (bug 1390840) 2017-08-21 18:38:22 +02:00
Nicolas Silva 55bbef54aa Bug 1390840 - Add prefs to display the debugging view of webrender's texture cache and intermediate targets. r=jrmuizel 2017-08-21 18:22:56 +02:00
Kartikaya Gupta 7017055b92 Bug 1390804 - When pushing a mask clip, don't record it in DisplayListBuilder's clip stack. r=ethlin
Recording mask clips in the clip stack changes the value of TopmostClipId()
which confuses the code in ScrollingLayersHelper. The mask clip can be
thought of as an "out-of-band" clip that ScrollingLayersHelper doesn't
need to know about. This patch adds a mechanism for pushing such
"out-of-band" clips without touching the clip stack.

MozReview-Commit-ID: 8Zeqtigk0cj

--HG--
extra : rebase_source : 35176f3c9d98d186f78d7a0ff44845c7c3c9f67e
2017-08-17 13:54:25 -04:00
Alexis Beingessner 9c4535798f Bug 1357545 - handle text-shadows/decorations with webrender (layers-free) r=jrmuizel
This replaces our DrawTargetCapture hack with a similar but more powerful TextDrawTarget
hack. The old design had several limitations:

* It couldn't handle shadows
* It couldn't handle selections
* It couldn't handle font/color changes in a single text-run
* It couldn't handle decorations (underline, overline, line-through)

Mostly this was a consequence of the fact that it only modified the start and end
of the rendering algorithm, and therefore couldn't distinguish draw calls for different
parts of the text.

This new design is based on a similar principle as DrawTargetCapture, but also passes
down the TextDrawTarget in the drawing arguments, so that the drawing algorithm can
notify us of changes in phase (e.g. "now we're doing underlines"). This also lets us
directly pass data to TextDrawTarget when possible (as is done for shadows and selections).

In doing this, I also improved the logic copied from ContainsOnlyColoredGlyphs to handle
changes in font/color mid-text-run (which can happen because of font fallback).

The end result is:

* We handle all shadows natively
* We handle all selections natively
* We handle all decorations natively
* We handle font/color changes in a single text-run
    * Although we still hackily intercept draw calls
    * But we don't need to buffer commands, reducing total memcopies

In addition, this change integrates webrender's PushTextShadow and PushLine APIs,
which were designed for this use case. This is only done in the layerless path;
WebrenderTextLayer continues to be semantically limited, as we aren't actively
maintaining non-layers-free webrender anymore.

This also doesn't modify TextLayers, to minimize churn. In theory they can be
augmented to support the richer semantics that TextDrawTarget has, but there's
little motivation since the API is largely unused with this change.

MozReview-Commit-ID: 4IjTsSW335h

--HG--
extra : rebase_source : d69f69648ade5c7a8e6bb756f4b8ab9e2543e576
2017-06-19 10:58:28 -04:00
Kartikaya Gupta 24d7292dde Bug 1389138 - Add helper to track the topmost scroll id on the WR stack. r=mstange
Note that when PushClipAndScrollInfo is called, we are pushing an
already-defined scrolling clip onto the stack, and anything that gets
pushed inside it is going to be defined as being inside that scrolling
clip. So we need to make sure to update the scroll id stack for those
calls as well. This was an oversight previously but it never mattered.

MozReview-Commit-ID: D40Gk00HYrq

--HG--
extra : rebase_source : 677a92f918481a73877f551b9ac32975e0110be9
2017-08-17 11:06:51 -04:00
Sebastian Hengst 6c9b12dc58 Backed out changeset d45e64ac4452 (bug 1389138) 2017-08-17 21:08:14 +02:00
Kartikaya Gupta 0f4e894586 Bug 1389138 - Add helper to track the topmost scroll id on the WR stack. r=mstange
Note that when PushClipAndScrollInfo is called, we are pushing an
already-defined scrolling clip onto the stack, and anything that gets
pushed inside it is going to be defined as being inside that scrolling
clip. So we need to make sure to update the scroll id stack for those
calls as well. This was an oversight previously but it never mattered.

MozReview-Commit-ID: D40Gk00HYrq

--HG--
extra : rebase_source : beee11f8694489183dbeb4edcd95d89f55656486
2017-08-17 11:06:51 -04:00
Morris Tseng 6391dec171 Bug 1389027 - Support nsDisplayPerspective in layers-free mode. r=kats
MozReview-Commit-ID: K0RCuQ8WEE3
2017-08-14 17:31:55 +08:00
JerryShih 7b702f3d00 Bug 1352092 - Get the max texture size from WR. r=nical
The gecko side just queries the max texture size from gl context[1]. We
should query that size from WR.

[1]
https://dxr.mozilla.org/mozilla-central/rev/4c5fbf49376351679dcc49f4cff26c3c2e055ccc/gfx/webrender_bindings/WebRenderAPI.cpp#72

MozReview-Commit-ID: 6RQ8ZW9mWSE
2017-08-12 13:41:56 +08:00
Kartikaya Gupta f10ce62128 Bug 1386483 - Split the wr_dp_push_clip method into two to allow reusing clips. r=jrmuizel
MozReview-Commit-ID: 90BEJGs8wGg

--HG--
extra : rebase_source : 9ef113bee43391c00912457afc395284899a23cb
2017-08-08 15:43:17 -04:00
sotaro 162dcae649 Bug 1385003 - Use a different WebRenderAPI instance for each WebRenderBridgeParent. r=kats
Previously, the WebRenderBridgeParent for each content layer tree would use the
same WebRenderAPI instance as the top-level WebRenderBridgeParent for that window.
However, in order to make the namespacing changes work we now need to use a
separate WebRenderAPI instance for each WebRenderBridgeParent. The content
WebRenderAPIs are cloned from the parent one, so that they all share the same
backend, but can allocate resource IDs in distinct namespaces.

MozReview-Commit-ID: 7VTFL8F09n7

--HG--
extra : rebase_source : 2da1d03abc23bd7852e4b12fe133889bd80cad53
2017-08-09 08:46:25 -04:00
Kartikaya Gupta c18e91b352 Bug 1385003 - Update webrender bindings for API changes in WR cset f6d81d9. r=kvark
In theory the upstream API change should allow us to share the same WR renderer
instance across multiple WebRenderAPI instances. For now however I retain the
existing behaviour of one WR instance for each WebRenderAPI instance, but keep
track of the document id in a new DocumentHandle struct. The C++ side keeps
a pointer to this DocumentHandle struct instead of the raw RenderApi.

MozReview-Commit-ID: I9pCKOY1OYx

--HG--
extra : rebase_source : 7b0ae2ccb2692a76045371ac165468c7f7539b40
2017-08-09 08:46:24 -04:00
JerryShih 5d101602fb Bug 1357299 - P12: Add SyncObject in RendererOGL. v2. r=nical
With DXVA2 hardware-video-decoding, the RendererOGL should have a
synchronization mechanism to prevent the flickering of video texture.
Create a SyncObject in RendererOGL to do the texture synchronization.

The WebRenderAPI also exposes the RendererOGL's SyncHandle to
WebRenderBridgeParent. Then, the WebRenderBridgeParent could pass this SyncHandle
to the video decoding module for texture synchronization.

MozReview-Commit-ID: toQ2mO5fzG
2017-08-07 18:15:25 +08:00
Nicolas Silva 230106d30b Bug 1383786 - Changes to the ffi boundary. r=sotaro 2017-07-28 14:08:11 +02:00
sotaro eaf00c953c Bug 1377619 - Add EndTransaction to on screen timing log for WebRender r=nical 2017-07-28 08:05:56 +09:00
Ryan Hunt 11bda66c5d Bug 1383714 - Update to cbindgen 0.1.19. r=kats
MozReview-Commit-ID: FdtZ9Pw0Z2A

--HG--
extra : rebase_source : 1cabc3fcc16ccf20a8d111389ccbbf518c42f32e
2017-07-21 12:39:25 -04:00
Ryan Hunt 522bc76415 Bug 1382128 part 8 - Remove Wr prefix from some type aliases. r=kats
MozReview-Commit-ID: 5h7QobhcYc1

--HG--
extra : rebase_source : 34d6636b6c3726ccc21b105f05227e27f84e63c9
2017-07-19 03:28:58 -04:00
Ryan Hunt d9bbfee6e2 Bug 1382128 part 6 - Remove WrBorderSides, WrBorderRadius, WrBorderWidths, WrNinePatchDescriptors. r=kats
MozReview-Commit-ID: 7YkHoNs64T9

--HG--
extra : rebase_source : f6f29cea6753d95857b0d65ae97faed1ed306f10
2017-07-19 01:56:20 -04:00
Ryan Hunt c013220860 Bug 1382128 part 5 - Remove WrGradientStop and WrGradientExtendMode. r=kats
MozReview-Commit-ID: 47Rb5jUpCFX

--HG--
extra : rebase_source : 6b4d3e6193b08bc978751921d12a0bb37a60c927
2017-07-19 01:47:07 -04:00
Ryan Hunt f082c1791e Bug 1382128 part 4 - Remove WrGlyphInstance. r=kats
MozReview-Commit-ID: 2CpW51FKUoK

--HG--
extra : rebase_source : d24e596dbd1a114d660e0b0ec1657f3efc11965d
2017-07-18 18:53:09 -04:00
Ryan Hunt 017d292cac Bug 1382128 part 2 - Remove WrPoint, WrSize, WrRect, WrMatrix, and WrColor. r=kats
MozReview-Commit-ID: 9koNScu4CyE

--HG--
extra : rebase_source : 68185e949ddf2ae346a5d597d056a7f2d9ea7a28
2017-07-18 18:32:46 -04:00
Ryan Hunt 3f3cb0a954 Bug 1382128 part 1 - Use a namespace in webrender_bindings. r=kats
MozReview-Commit-ID: 3JTMa9Ix5S7

--HG--
extra : rebase_source : 0bea14d9e395cab260d2db5135b1f64e9f82b2e2
2017-06-27 19:20:36 -04:00
Kartikaya Gupta 7fe2c84b1e Bug 1374730 - Update for clip API change in WR cset 0bf6655. r=mrobinson
MozReview-Commit-ID: dEe7yDDZPk

--HG--
extra : rebase_source : 09a1f858a347bdc95baa8015db9fa156b119334a
2017-07-10 07:22:39 -04:00
sotaro 178043d1da Bug 1357734 - Change argument of DisplayListBuilder::PushBorder() to bypass compiler bug r=jrmuizel
Visual Studio 2015 Update 3 has a bug that PGO build generates movaps to unaligned address. The patch just bypasses the compiler bu
2017-06-30 16:22:25 -07:00
Kartikaya Gupta 34903d0ba6 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

--HG--
extra : rebase_source : 77c34ec1cbbc1c0fe4d1971feb131d30c97f0d66
2017-06-26 07:49:52 -04:00
Carsten "Tomcat" Book c2622cfcd0 Backed out changeset 504e5b1de987 (bug 1376215) for bustage 2017-06-26 13:07:09 +02:00
Kartikaya Gupta b459b56298 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

--HG--
extra : rebase_source : d8522d8e806522a4a0e8b2cd1669db0374bd5e63
2017-06-25 14:45:54 -04:00
Jeff Muizelaar 0de540ca2e Bug 1375534 - Add bindings for setting transform style to PushStackingContext. r=kats 2017-06-22 17:30:27 -04:00
Jeff Muizelaar e16b0717ca Bug 1373861. Pass a built display list to PushBuiltDisplayList by reference instead of value. r=Ganrko
Previously we needed to pass by value and that was causing us to clear out our
prebuilt display list when we actually wanted to keep it around.

The rust code ended up doing a bit of a silly dance but that's better than copying the display list around.
2017-06-21 18:40:13 -04:00
Kartikaya Gupta beb80358ab Bug 1373378 - Do a better job tracking the ancestor scrollids in DisplayListBuilder. r=jrmuizel
In some cases we need to know the ancestor scrollid of a scrollid that we had
previously pushed onto the stack and then subsequently popped off. Since that
scrollid is no longer actually on the stack at the time of the query, we would
return Nothing(). Instead, this patch adds a map to "remember" previously
encountered scrollids and their ancestors, so that these queries can be correctly
handled.

MozReview-Commit-ID: BrtEv88ZysX

--HG--
extra : rebase_source : a14d72cd535c5cf7f57691b7d8be9aaf26303709
2017-06-16 15:12:24 -04:00
Kartikaya Gupta 1e6ddf03d5 Bug 1372912 - Make the clip id more strongly typed. r=jrmuizel,mrobinson
This patch is not really needed, but it avoids accidental conversion
between FrameMetrics::ViewID (which represents a scrolling clip) and a
uint64_t id for a non-scrolling clip.

MozReview-Commit-ID: JriIfpECHe7

--HG--
extra : rebase_source : a7af8465c9c62a60856c190da64667439233f4b0
2017-06-15 17:02:20 -04:00
Sebastian Hengst 8d132d70e6 Backed out changeset 8176859f8b70 (bug 1372912) 2017-06-15 22:58:57 +02:00
Kartikaya Gupta f910c3f66e Bug 1372912 - Make the clip id more strongly typed. r=jrmuizel,mrobinson
This patch is not really needed, but it avoids accidental conversion
between FrameMetrics::ViewID (which represents a scrolling clip) and a
uint64_t id for a non-scrolling clip.

MozReview-Commit-ID: BU7p4WNocXa

--HG--
extra : rebase_source : 0cf69ca0a7b716bd9ad5c3cef114a3b99ec00e1b
2017-06-15 09:41:46 -04:00
Wes Kocher 1af6d5cf57 Merge inbound to central, a=merge
UPGRADE_NSS_RELEASE
MozReview-Commit-ID: CBIFPwA5aNp

--HG--
extra : amend_source : 035a5be59d0046a643d0f836a95195e8c4ade4a6
2017-06-13 18:27:10 -07:00
Kartikaya Gupta e5fa0b8e06 Bug 1372321 - Log the mask rect when passing a WrImageMask to WR. r=jrmuizel
MozReview-Commit-ID: 3CdjfiwzZiJ

--HG--
extra : rebase_source : d3a6aac4042412d82aa1c3a5f47a40230d5297eb
2017-06-13 08:42:39 -04:00
Kartikaya Gupta 1bcefeafef Bug 1368496 - Expose the push_clip_and_scroll_info API in WR via WebRenderAPI. r=jrmuizel
MozReview-Commit-ID: f8gIDoUDC1

--HG--
extra : rebase_source : 12a7c8b9d466157ec63f3e57f77ab50b30f9b4fe
2017-06-08 11:34:01 -04:00
Kartikaya Gupta 25de5f333c Bug 1368496 - Track the pushed clip and scroll IDs. r=jrmuizel
Tracking the active clips and scroll layers is helpful for implementing
fixed-position type stuff, because we will need to answer questions like
"what is the ancestor scroll layer of this other scroll layer that is
somewhere on the stack" and "what is the currently active stack of
non-scrolling clips". This patch also adds a couple of methods to
WebRenderAPI that answers questions like these.

MozReview-Commit-ID: 9bgOW3Z8Tbp

--HG--
extra : rebase_source : 382f1d476217739d9e023e05d8b3886f268c6b72
2017-06-08 11:34:00 -04:00
Martin Robinson 7d937678f4 Bug 1365972 - Add initial WebRender support for nsDisplayFilter. r=rhunt, r=mattwoodrow 2017-06-06 06:28:00 -04:00
Kartikaya Gupta c054f05ef3 Bug 1368551 - Remove unneccessary overload of PushStackingContext. r=pchang
This overload is only called in one place, so we can just inline it. It
makes the API a little simpler.

MozReview-Commit-ID: H55IUduUSiJ
2017-06-01 09:17:16 -04:00
Kartikaya Gupta cab614e181 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 2e1b9ac498 Bug 1368483 - Pass WrColor in wr_api_set_root_display_list() r=nical 2017-06-01 09:53:58 +09:00