Commit Graph

28354 Commits

Author SHA1 Message Date
Coroiu Cristina
230207fe30 Merge inbound to mozilla-central r=merge a=merge 2017-11-12 00:05:11 +02:00
Jonathan Kew
49c97adb4e Bug 1411625 - Remove the constructor from gfxShapedText::CompressedGlyph to make it a trivial class, and provide a couple of convenience "factory" methods to create simple and complex glyph values. r=andi 2017-11-11 15:32:58 +00:00
JerryShih
c061f3959d Bug 1371838 - set the window_id as renderer_id to WR. r=jrmuizel
MozReview-Commit-ID: 7YbQNzTNpmE
2017-11-11 18:57:31 +08:00
JerryShih
4eb77c1992 Bug 1371838 - add a custom thread listener to WR. r=jrmuizel
MozReview-Commit-ID: yyFwBr21F3
2017-11-11 18:57:31 +08:00
JerryShih
56d6261465 Bug 1371838 - register the WR thread pool's thread to gecko profiler. r=jrmuizel
MozReview-Commit-ID: BUyTq2vz3cO
2017-11-11 18:57:31 +08:00
JerryShih
8b031732c0 Bug 1371838 - export the gecko profiler registering function to WR. r=jrmuizel
MozReview-Commit-ID: 2gVAmU2xomP
2017-11-11 18:57:31 +08:00
Andreea Pavel
7fb4cc447c Merge inbound to mozilla-central r=merge a=merge 2017-11-11 11:59:20 +02:00
Chih-Yi Leu
80c342950f Bug 1412554 - Return GL_OOM if memory counter in ResourceManager11 overflow r=jgilbert
MozReview-Commit-ID: AgDd95NlNZq

--HG--
extra : rebase_source : 8e5818d186aa151f9ba0cb1a6569de8f9211b049
2017-11-08 10:36:18 +08:00
Ethan Lin
beaea27dc3 Bug 1415989 - Do not use 'ShouldUseAdvancedLayer' for button type display items. r=jrmuizel
MozReview-Commit-ID: 83qOTfTRUY0

--HG--
extra : rebase_source : 560f285f3092cd75d14d27cae4adcb8e9dca0e3a
2017-11-10 11:41:15 +08:00
Ryan Hunt
3a2498f61a Flush any buffer operations that may be running after EndEmptyTransaction before EndTransaction (bug 1416308, r=dvander)
MozReview-Commit-ID: CpdtwW2JNip

--HG--
extra : rebase_source : 20e46df173896d5d4fef7f0a9c0989096cd14daa
2017-11-10 13:12:15 -05:00
Milan Sreckovic
639eb384ce Bug 1416306 - Make the function argument a const& instead of passing by value. r=mstange 2017-11-10 10:29:00 -05:00
Nathan Froyd
68ce6c6d2a Bug 1415961 - construct {Blur,Gradient}CacheData more efficiently; r=jrmuizel
We pass in `const {Blur,Gradient}CacheKey&` to these functions.  There's
no need to copy the cache keys here; we can just Move() the existing
objects in instead.  Doing this saves unnecessary allocations and/or
refcounting.
2017-11-10 16:43:54 -05:00
Ryan VanderMeulen
b16410f51c Merge inbound to m-c. a=merge 2017-11-10 16:13:15 -05:00
Ryan VanderMeulen
f09d55fcf6 Backed out changeset f296220f4117 (bug 1415762) for frequently crashing with mozilla::BlockingResourceBase::CheckAcquire(), RtlEnterCriticalSection and _pthread_mutex_lock. 2017-11-10 16:06:34 -05:00
Jeff Muizelaar
0d413c707d Bug 1415326. Tolerate slight changes in scale for fallback items. r=ethlin
This helps us avoid rerasterizing the blob images every frame.  This makes a
huge difference in performance. Our score goes from approx 75 to 380. Current
Firefox gets about 200.
2017-11-10 13:19:11 -05:00
Kartikaya Gupta
c13feff999 Bug 1415150 - Update webrender to commit f58ed651b47f47382b63dd2bce6e4ed10ee18c78. r=jrmuizel
MozReview-Commit-ID: 8wGfwYlhJ1N

--HG--
extra : rebase_source : 4554d38e38c76902ffdb27a4b773d31ccf8868c2
2017-11-10 10:55:05 -05:00
Chris Peterson
0e8425b401 Bug 1416164 - Replace NS_ABORT with MOZ_ASSERT_UNREACHABLE. r=froydnj
MozReview-Commit-ID: DRdYlOYqZpN

--HG--
extra : rebase_source : b20fb24abf0f2ce648c12a827532c0dbeefb6c63
2017-10-24 23:52:56 -07:00
Kartikaya Gupta
00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Jonathan Kew
7036cc5f85 Backed out changesets 75e7f32c3365, eec946b59360, 72a6f5f3512c, ea8ee40ed426 (bug 1412090) for apparently breaking all system-installed fonts on some Linux systems. r=backout 2017-11-10 16:05:33 +00:00
Ryan Hunt
ac638de2f4 Don't do PaintThebes after PaintOffMainThread. (bug 1399692 part 10, r=dvander)
MozReview-Commit-ID: J0IOzqIGRtz

--HG--
extra : rebase_source : d20a570de201dc46ceb3605db20af40f2f2fed8e
extra : source : eab96d73c39df98c888a491f54fbb963069c5f6b
2017-11-09 15:44:21 -05:00
Ryan Hunt
84c229fe9d Don't reuse a back buffer after a swap if the content or surface changed (bug 1399692 part 9, r=bas)
MozReview-Commit-ID: HGAxkeyESbc

--HG--
extra : rebase_source : 7c09e853a3feeb1d1d9d7cc93d77242265ec590b
extra : source : 7d9324e2ab34946539be9f17d74f639aae5ba7e5
2017-11-05 10:38:47 -05:00
Ryan Hunt
9dc07b61c4 Don't copy over regions that will be painted in this frame (bug 1399692 part 8, r=bas)
We do the same in FinalizeFrame, so we should do it here.

MozReview-Commit-ID: JTKDj8yrtI2

--HG--
extra : rebase_source : 6ba114c6734990dcb62e361889d1b2cf2b5ad7dc
extra : intermediate-source : 76bf99decf0906f0a6a4ad99539fd40f97c4539f
extra : source : fb9b0524428307c4ee097894e37879339df47579
2017-11-04 14:52:31 -04:00
Ryan Hunt
c34dc7e2af Replay buffer commands on paint thread when OMTP is enabled (bug 1399692 part 7, r=bas)
This commit does the work of actually dispatching the recorded buffer operations
to the paint thread, and removing some main thread asserts from TextureClient.

MozReview-Commit-ID: CN3RoQPz9fP

--HG--
extra : rebase_source : 08ae6cf8445ef0a757efc54175768c2fa9bb1685
extra : intermediate-source : 0fc2414f146d8f5d08c97e5b7eedb25c5632ab2d
extra : source : e9349ad2f1f8fec862b1d2271d0d8f25ad0814d4
2017-10-26 00:47:17 -04:00
Ryan Hunt
cc9ba81109 Record buffer operations to a struct for replaying on paint thread (bug 1399692 part 6, r=bas)
This commit adds a CapturedBufferState which is used to record all the operations
that are necessary for preparing the buffers. The commands are then instantly
executed to preserve the same behavior, but in the following commit they will
be dispatched to the paint thread.

Note: RotatedBuffer's aren't thread safe and so a shallow copy needs to be made
for sending to the paint thread. This complicates the code for AdjustTo as it can
fail naturally and the buffer parameter changes are needed later in BeginPaint.
So the code for AdjustTo is split up a bit to accomodate that.

MozReview-Commit-ID: FwSwFay887o

--HG--
extra : rebase_source : 70dd8a055aaa13586810030978409d1a89c39081
extra : intermediate-source : f235b12eda6efe0bdec8e6590d813738f53ffe82
extra : source : cb6507b560aaad188fc83a47b664aaa5692a0acd
2017-10-25 10:20:49 -04:00
Ryan Hunt
1c5e585bd6 Simplify copying the front buffer to the back buffer (bug 1399692 part 5, r=bas)
To sync the back buffer with the front buffer, we set the back buffer rect and
rotation to the front buffer's, and then copy over the pixels that different.

We used to do the updating of the rect and rotation before BeginPaint, but that
isn't necessary and we can move it to be with the copying of pixels.

MozReview-Commit-ID: HzBKvMZkn1

--HG--
extra : rebase_source : 053e55df273d0d89327b80bc599ee05a020f6fef
extra : intermediate-source : 467532fd5b7a2385ba0dbdb9201e28e8f2b4a583
extra : source : 3d0da65640964e5a0565b5e7b7646cf719ce1449
2017-10-23 18:27:53 -04:00
Ryan Hunt
8348d444d0 Don't create back buffer for front buffer until we know what type to create. (bug 1399692 part 4, r=bas)
This commit is an optimization for double buffering that delays the creation of
a back buffer until we know what kind of content type it needs to be.

Before this commit, we would EnsureBackBufferIfFrontBuffer before BeginPaint,
then in BeginPaint we could determine that we actually needed a different kind
of buffer because the content changed type, and recreate it.

This was needed because BeginPaint would copy the old front buffer to the buffer
created by EnsureBackBufferIfFrontBuffer, and then if anything failed or we had
determined we couldn't reuse the buffer, we would create a new one and copy that
"temporary" back buffer over, and use the new one.

This is unnecessary because we only need read access on that "temporary" back
buffer, and so we can just use the current front buffer instead.

This optimization only affects the double buffered case, and the single buffered
or basic cases should remain the same.

Note: Because we now need the front buffer for copying into the new back buffer,
we cannot Clear() it away in some error cases.

Note: The code in FinalizeFrame assumes that the back and front buffer have the
same size. This was implicitly enforced before, and now needs to be explicitly
enforced. This commit tries to preserve the exact same behavior, although the
restriction should be removed as long as the back buffer is large enough for
the visible region.

MozReview-Commit-ID: 2hyrrUhA4zO

--HG--
extra : rebase_source : 5db62a4d24383c7d64e127880a3bee7ff76dada1
extra : intermediate-source : dce585be0737f3c9b6b241afb0851d85fb9453c9
extra : source : 926af2eca400cf8a16777813ceb586b1d3be7d68
2017-10-23 15:33:40 -04:00
Ryan Hunt
56b43edede Remove BufferContentType and add ValidBufferSize (bug 1399692 part 3, r=bas)
BufferContentType and BufferSizeOkFor make more sense as general functions for
any RotatedBuffer, and this helps out in a later patch.

MozReview-Commit-ID: EAVodvl4WTu

--HG--
extra : rebase_source : 122b6466ef0194d6ff682d677db01312c9e27a2a
extra : intermediate-source : b971c1aa5a78c17d49d1d64389516437024be72a
extra : source : b57a3f0d08478f094328b5a50c57eed35798fdf0
2017-10-23 14:56:13 -04:00
Ryan Hunt
37f9020f14 Simplify the code for creating a new back buffer (bug 1399692 part 2, r=bas)
MozReview-Commit-ID: D28JNYWD9Uc

--HG--
extra : rebase_source : 089014bebbf97af2eeb5b940cf468411b753c428
extra : intermediate-source : 8ba8bda8521a6460b1213d2d0f14ebefc0a3e14a
extra : source : 9fcb661df79e51c80f5ffb24717dba655dc97d73
2017-10-23 12:40:01 -04:00
Ryan Hunt
c6550ebd1e Remove unneeded lambda capture in paint thread (bug 1399692 part 1, r=bas)
MozReview-Commit-ID: 71X22PHRTRz

--HG--
extra : rebase_source : 1d1016e48054c39a615c31880e4aa8a38f426bf0
extra : intermediate-source : 2c41a712dff22de4fb2bbfd7c5a418fbc3a26f11
extra : source : 744c8fabaa1c3e6b7322cd2b4c6672b8509c643c
2017-10-31 01:55:24 -04: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
sotaro
a8b71fcd72 Bug 1415763 - Fix DXGIYCbCrTextureData as to deliver YUVColorSpace r=mattwoodrow 2017-11-10 18:15:54 +09:00
Milan Sreckovic
7d3551d146 Bug 1281965 - Sometimes we don't want to add when searching for a family. r=jfkthame
--HG--
extra : rebase_source : c1b0ecc2cc221395947326c440e01cbb6b0044fc
2017-11-09 18:38:30 -05:00
Sebastian Hengst
8c31f6f143 Backed out changeset d0ddd9a98e74 (bug 1415961) for bustage in thebes. r=backout on a CLOSED TREE 2017-11-10 00:11:59 +02:00
Nathan Froyd
d553d84aeb Bug 1415961 - construct {Blur,Gradient}CacheData more efficiently; r=jrmuizel
We pass in `const {Blur,Gradient}CacheKey&` to these functions.  There's
no need to copy the cache keys here; we can just Move() the existing
objects in instead.  Doing this saves unnecessary allocations and/or
refcounting.
2017-11-09 17:03:11 -05:00
Andreea Pavel
e1c8aba28f Merge mozilla-central to mozilla-inbound r=merge a=merge on a CLOSED TREE 2017-11-09 22:17:00 +02:00
Andreea Pavel
5e4025c975 Backed out 9 changesets (bug 1399692) for failing reftest/tests/layout/reftests/svg/dynamic-text-06.svg Windows 10 x64 Stylo Disabled debug R-e10s2 r=backout on a CLOSED TREE
Backed out changeset 7d9324e2ab34 (bug 1399692)
Backed out changeset 76bf99decf09 (bug 1399692)
Backed out changeset 0fc2414f146d (bug 1399692)
Backed out changeset f235b12eda6e (bug 1399692)
Backed out changeset 467532fd5b7a (bug 1399692)
Backed out changeset dce585be0737 (bug 1399692)
Backed out changeset b971c1aa5a78 (bug 1399692)
Backed out changeset 8ba8bda8521a (bug 1399692)
Backed out changeset 2c41a712dff2 (bug 1399692)
2017-11-09 21:55:32 +02:00
Kartikaya Gupta
54431ae212 Bug 1415225 - Add a couple of mochitests for event-regions overrides. r=botond
These two tests exercise the codepaths where an event regions override
is set on (a) the root layer of a layer tree and (b) on an in-process
subdocument. I verified that case (b) was failing with webrender enabled
without the patchset and passes now.

MozReview-Commit-ID: Kw6TQjNupSa

--HG--
extra : rebase_source : ce54c46c7d0470b693e82ae3e477b3702155e59d
2017-11-09 09:03:53 -05:00
Kartikaya Gupta
3c76c8128a Bug 1415225 - Move the EventRegionsOverride field to be on RefLayers only. r=botond
We now set EventRegionsOverride flags on ref layers only, so
there's no need to have the APIs to set it on container layers in
general.

MozReview-Commit-ID: JKU4UXvdR2e

--HG--
extra : rebase_source : 77f49787e8953520dc56ea4a8f9286b35d6942b8
2017-11-09 09:03:52 -05:00
Kartikaya Gupta
93ca1a3bc5 Bug 1415225 - Stop setting the EventRegionsOverride flag on root layers. r=botond,mattwoodrow
As with the previous patch, instead of setting the override on the root
layer, we set the flag on the nsDisplayListBuilder before building the
display list, and the flag automatically forces all event regions
display items to use their dispatch-to-content region instead of any
other regions.

Both the WebRender and non-WebRender codepaths were setting the override
flag on their root layers and don't need to any more.

MozReview-Commit-ID: 1cz0ahqwkOm

--HG--
extra : rebase_source : 3292951aca97fd1a355c2fae5b0ab42d2064c548
2017-11-09 09:03:52 -05:00
Kartikaya Gupta
d5cf7941e2 Bug 1415225 - Remove dead code. r=jrmuizel
This code has been unused since the removal of layers-full WR codepaths.

MozReview-Commit-ID: JQn55Kbz5rr

--HG--
extra : rebase_source : af6995265c02a1ddfccbc37adb633bc2b240ec8b
2017-11-09 09:03:51 -05:00
Mats Palmgren
1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
David Anderson
d3b572527a Don't fallback to DrawTargetCairo in TextureClient. (bug 1413862, r=mattwoodrow) 2017-11-08 16:57:25 -08:00
Daosheng Mu
6e5d5d2b20 Bug 1411838 - Part 2: Fix non thread-safe objects in VR; r=kip
MozReview-Commit-ID: EzbNWU17qAP

--HG--
extra : rebase_source : ab04d09ad82b6e4acd6f20d60108672d20e0b843
2017-11-09 10:54:36 +08:00
Daosheng Mu
11ecbe54cb Bug 1411838 - Part 1: Enable WebVR reftest for Windows debug; r=kip
MozReview-Commit-ID: A8drAvmATUZ

--HG--
extra : rebase_source : a1d91e76d42afa3c0f3479918d376159409585dc
2017-11-09 10:52:22 +08:00
Noemi Erli
8d8df3ddfe Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-10 12:43:53 +02:00
Daosheng Mu
08ffc52b07 Bug 1415762 - Cancel VRListener task when CompositorVsyncScheduler is going to destroy; r=dvander
MozReview-Commit-ID: F25LE5Ru9gz

--HG--
extra : rebase_source : c870e2a987fd4a113d67e6672eb1e53a030fad65
2017-11-09 11:41:15 +08:00
Markus Stange
a8ad9935d6 Bug 1416011 - Make the RoundedRect constructor take const references. r=kats
MozReview-Commit-ID: HC9JKt2EBdq

--HG--
extra : rebase_source : f18ae340a644cab6cddce3273bc68ccf4a44935f
2017-11-09 17:07:32 -05:00
Jonathan Kew
f35b992490 Bug 1412090 - patch 4 - Also adopt the ContentParent::NotifyUpdatedFonts method on macOS, so that only the parent process needs to register with CFNotificationCenter for font-changed notifications. r=lsalzman 2017-11-09 16:54:37 +00:00
Jonathan Kew
1177becaba Bug 1412090 - patch 3 - Check the sandbox policy to verify font files will be readable by the content process before including them in the system font list. r=gps 2017-11-09 16:54:30 +00:00
Jonathan Kew
0ba9f9c57b Bug 1412090 - patch 2 - Rework the fontconfig-based platform font list implementation to pass the list of available font patterns from chrome to content, instead of letting the content process get it directly from fontconfig. r=lsalzman 2017-11-02 20:29:33 +00:00