Commit Graph

28385 Commits

Author SHA1 Message Date
Jamie Nicol
cc72c8cff9 Bug 1413693 - Ensure data copied from discarded front buffer isn't also painted. r=mstange
Bug 1092294 introduced a regression in to the code to copy from
the discarded front buffers to the new backbuffers in
SingleTiledContentClient. The aim was to ensure that if locking the
the frontbuffers failed, meaning the region could not be copied, that it
would be painted instead. However due to incorrect logic the
region would both be copied and painted in cases where
there was no onWhite buffers.

To fix this we take both locks (frontLock, and frontOnWhiteLock if
required) up front, so that we either copy both buffers or neither.

MozReview-Commit-ID: 3iepOuweruk

--HG--
extra : rebase_source : 2e2f951c3315f2809191f43a9d5ec4a939c82724
2017-11-02 11:46:08 +00:00
Phil Ringnalda
e0e1cf4354 Backed out 4 changesets (bug 1406327) for crashing other tests, crashing itself, and assertion failures
Backed out changeset 471c710b19b1 (bug 1406327)
Backed out changeset 5890bb3a0d97 (bug 1406327)
Backed out changeset 63c8ee57e38c (bug 1406327)
Backed out changeset 345972733daa (bug 1406327)

MozReview-Commit-ID: IwWx11QSuS4
2017-11-01 21:44:12 -07:00
Daosheng Mu
f10ab3c49f Bug 1406327 - Part 4: RefreshVRDisplays needs to be at VRListenerThread; r=kip
MozReview-Commit-ID: KuhPFqMhTDB

--HG--
extra : rebase_source : 53dac47c5ede72acbe2760f056ca88f8cbc0c6b9
2017-11-01 22:15:06 +08:00
Daosheng Mu
1b3cb570af Bug 1406327 - Part 3: VRSystemManager for multi-threads; r=kip
MozReview-Commit-ID: 4bE5hruFcT2

--HG--
extra : rebase_source : e1184bbd96c7c5663e04db85d4d2c0f44bf4dcd6
2017-10-26 17:45:44 +08:00
Daosheng Mu
292c24950b Bug 1406327 - Part 2: When loading VR content, launching the VR listener thread; r=kip
MozReview-Commit-ID: IyBzJyDEVdv

--HG--
extra : rebase_source : d626c4b0ce7c5ca2a1bda6cb6b8d0d42a4d09e1d
2017-10-26 17:28:37 +08:00
Daosheng Mu
a04c759f89 Bug 1406327 - Part 1: Shutdown VR listener thread when no VR content in seconds; r=dvander,kip
MozReview-Commit-ID: AnYJT8WBkI7

--HG--
extra : rebase_source : fff277f9801760fa00261283fbc1ca42b59a8fd8
2017-10-26 16:51:14 +08:00
Botond Ballo
a155122b36 Bug 1382534 - Add a UnionMaybeRects() method to gfx/2d/Rect.h. r=mstange
MozReview-Commit-ID: 3G4Hlj54Thy

--HG--
extra : rebase_source : 6c2b22f28ee648bc93f4cb3471727f992f8cb34e
2017-08-23 17:45:15 -04:00
Kearwood "Kip" Gilbert
efffd1d8b9 Bug 1413357 - Remove VRManagerChild::RecvParentAsyncMessages r=daoshengmu
- This IPC is no longer used and can be removed to simplify
  the PVRManager protocol.
MozReview-Commit-ID: Kno5CHkI17K

--HG--
extra : rebase_source : 227e36b00bc2d6a3b83b48d80fbfdfe35196057d
2017-10-31 15:53:50 -07:00
Andrew Osmond
2e03149cc0 Backed out changeset d84ea38d6fd0 (bug 1399453) because the annotations are no longer needed. 2017-11-01 13:34:43 -04:00
Jeff Muizelaar
df5772565c Bug 1412848. Use the proper types and functions. r=lsalzman
The previous code was a bad copypasta
2017-11-02 17:47:33 -04:00
Ryan Hunt
c6d2561056 Mark ShallowCopy as override to fix bustage (bug 1399692, r=me)
MozReview-Commit-ID: 2LIxzNFrcA3

--HG--
extra : rebase_source : dab0937161a2ffa15e48cf0273a714cf10b35443
extra : amend_source : bc6b97ea306b5351535f9b0e7e399fa6f545683b
2017-11-02 17:43:52 -04:00
Ryan Hunt
153dbb56d7 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 : c14b9da390e88907e184409404c5c21b5fe23dff
2017-10-26 00:47:17 -04:00
Ryan Hunt
37542c54f7 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 : 3e8b49d5931d853857dd1b2eeff914465251f613
2017-10-25 10:20:49 -04:00
Ryan Hunt
12cec070ad 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 : b5f5a0c46c225b8d2fbdd1891a16f3c0812382eb
2017-10-23 18:27:53 -04:00
Ryan Hunt
cf8f4842ac 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.

MozReview-Commit-ID: 2hyrrUhA4zO

--HG--
extra : rebase_source : 8eb7f992758d2e1db47eb88fe8d31651b335be6d
2017-10-23 15:33:40 -04:00
Ryan Hunt
f7fab34fd0 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 : 22c004e81257bf2d31438972c17b7b4f61532b23
2017-10-23 14:56:13 -04:00
Ryan Hunt
f3f6dc6284 Simplify the code for creating a new back buffer (bug 1399692 part 2, r=bas)
MozReview-Commit-ID: D28JNYWD9Uc

--HG--
extra : rebase_source : e494a32dcef12baac681f2140eea81339392d333
2017-10-23 12:40:01 -04:00
Ryan Hunt
44b97f79ca Remove unneeded lambda capture in paint thread (bug 1399692 part 1, r=bas)
MozReview-Commit-ID: 71X22PHRTRz

--HG--
extra : rebase_source : c31d3ad296359af32d528e03a65d744211aac7be
2017-10-31 01:55:24 -04:00
Markus Stange
9d74ba14bd Bug 1413178 - Initialize the new field that was added in webrender commit 479d43ab4f245c42b33e12f9b6f050045ec84ab3. r=lsalzman
MozReview-Commit-ID: 3oFtSjbnBsI

--HG--
extra : rebase_source : b3d792787a9226265d02eaff027e0919aca1d17d
2017-11-03 00:37:20 -04:00
Kartikaya Gupta
69f8f61109 Bug 1413178 - Re-generate FFI header. r=lsalzman
MozReview-Commit-ID: 53SneuKAusl

--HG--
extra : rebase_source : 9ace105caaf16c9fc2a844cd82a483e84d5ceb53
2017-11-03 10:59:33 -04:00
Kartikaya Gupta
5a6135f9dd Bug 1413178 - Update webrender to commit fae962bfd6e1997f4b921ee93c3c1cc5abca3256. r=lsalzman
MozReview-Commit-ID: LStxYqdw50U

--HG--
extra : rebase_source : a732f4a3e6ed28902d61de03dfea69626733711d
2017-11-03 10:28:15 -04:00
NARCIS BELEUZU
8a7f727056 Merge mozilla-central to autoland. r=merge a=merge CLOSED TREE 2017-11-03 15:07:59 +02:00
NARCIS BELEUZU
0a208387ad Merge mozilla-central to autoland. r=merge a=merge on CLOSED TREE 2017-11-03 12:20:45 +02:00
Ethan Lin
4f02235ca5 Bug 1413680 - DrawTargetRecording should return the real size instead of the dummy drawtarget's size. r=jrmuizel
MozReview-Commit-ID: E63f8ZIGYm2

--HG--
extra : rebase_source : d966d435308ca66a4d0c64f5e90db218ed1fe31f
2017-11-02 13:50:38 +08: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
Csoregi Natalia
423b2522c4 Merge inbound to mozilla-central r=merge a=merge 2017-11-01 12:14:00 +02:00
Lee Salzman
1eba4acd8d Bug 1412942 - pad Mac font data when checksumming. r=jfkthame
MozReview-Commit-ID: 3941eAWNXoR
2017-10-31 23:13:25 -04:00
sotaro
3aac464b5a Bug 1408490 - Fix reinitRendering for deviceReset r=dvander 2017-11-01 11:58:10 +09:00
Sebastian Hengst
2181970726 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-11-01 00:39:58 +01:00
Sebastian Hengst
7a0f790c30 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4CDH6A5NT2U
2017-11-01 00:36:12 +01:00
David Anderson
997c7019bc Don't cache DrawTargetCaptures in nsCanvasFrame. (bug 1395478 part 10, r=mattwoodrow)
--HG--
extra : rebase_source : fc0746099e910f1e46842f292f60b2f00ee25f38
2017-10-31 12:02:32 -07:00
David Anderson
3bc0066b70 When similar draw targets are requested from capturing DTs, always return a new capturing DT instead of an actual surface. (bug 1395478 part 9, r=mchang)
--HG--
extra : rebase_source : 9957e68435e69d65e3f4fa82bc870e37b21392dd
2017-10-31 12:02:32 -07:00
David Anderson
9956a762ef Don't call MarkChanged for commands that don't affect pixels. (bug 1395478 part 8, r=rhunt)
--HG--
extra : rebase_source : fe6c36991e36f6ba23682604fa84bc87634fccd2
2017-10-31 12:02:31 -07:00
David Anderson
74657c11e8 Implement DrawTargetCapture::DrawSurfaceWithShadow. (bug 1395478 part 7, r=mchang)
--HG--
extra : rebase_source : d7884ca8caa4e23369cdf098120dc6b8998598a4
2017-10-31 12:02:31 -07:00
David Anderson
cf84c3f01d Add SourceSurfaceCapture to avoid main-thread rasterization with temporary DrawTargetCaptures. (bug 1395478 part 6, r=rhunt)
--HG--
extra : rebase_source : 3a3841e5a54f9780720a543ee792f501b5150b02
2017-10-31 12:02:31 -07:00
David Anderson
4a00595a2a Allow cloning draw commands. (bug 1395478 part 5, r=rhunt)
--HG--
extra : rebase_source : 5a5e1d6e0f572a82403842c425fba347b4acf549
2017-10-31 12:02:31 -07:00
David Anderson
f97ea2781d Create a CaptureCommandList abstraction for DrawTargetCapture. (bug 1395478 part 4, r=mchang)
--HG--
extra : rebase_source : 527e364c50365a5b793dfe743cb502dffb3c6eef
2017-10-31 12:02:30 -07:00
David Anderson
94d1c71ca2 Create DrawTargetCaptures for blur operations when OMTP is enabled. (bug 1395478 part 3, r=mattwoodrow)
--HG--
extra : rebase_source : 902e1d5238b831c3ce4a0f1da98741b3aa040b6d
2017-10-31 12:02:30 -07:00
David Anderson
8ef5cedd49 Add a Blur DrawCommand. (bug 1395478 part 2, r=rhunt)
--HG--
extra : rebase_source : 02307fbf209058f661e1379b51b2dcaa40da94b6
2017-10-31 12:02:30 -07:00
David Anderson
bee44bc0cb Add a factory method for creating data-backed DrawTargetCaptures. (bug 1395478 part 1, r=rhunt)
--HG--
extra : rebase_source : 5bcce03e60ba64b8b54e24db2e25a6e42a4fe8de
2017-10-31 12:02:29 -07:00
Ryan Hunt
4371a10ca6 Add profiler markers for painting on the paint thread. (bug 1412951, r=mstange)
The following commits added the necessary tracking to ensure we always end
a profiler marker when we start one, and this just plugs them in.

MozReview-Commit-ID: C5VXpnlH2QA

--HG--
extra : rebase_source : 832c8abdef45e0a9bbb71bbf105fe4a76d0eb60d
2017-10-30 14:48:16 -04:00
Ryan Hunt
27d35624ce Track when we start and finish painting a layer transaction. (bug 1412951, r=dvander)
This commit adds instrumentation and some asserting to track a "paint group",
which is essentially the first PaintThread::AsyncPaintContents until
PaintThread::AsyncEndLayerTransaction.

I didn't add an AsyncBeginLayerTransaction and use that to start a "paint group"
as I think it makes sense to not have a paint marker if we don't do
any painting.

MozReview-Commit-ID: AlSsUUF5ZOH

--HG--
extra : rebase_source : 84d9feaf5aac39fb9ce32984efda704fa2a68838
2017-10-30 14:49:58 -04:00
Ryan Hunt
71996a3966 Be sure to call EndLayerTransaction if there are queued paints. (bug 1412951, r=dvander)
I believe this is the only case where we miss calling EndLayerTransaction,
but still had queued async paints. This wasn't an issue before, because
the following transaction would then do the synchronization. But I'd
like to use EndLayerTransaction for a profiler mark, so we should call
it unconditionally.

MozReview-Commit-ID: 9rUXBzCZaLO

--HG--
extra : rebase_source : ba360f2451190cf38745121d4dc32f4ed8d1bfe2
2017-10-30 13:44:59 -04:00
Margareta Eliza Balazs
a63fdbeabb Merge inbound to mozilla-central r=merge a=merge 2017-10-31 12:46:19 +02:00
JerryShih
12d00a2d70 Bug 1413043 - check WR enabling status before the WR calls. r=pchang
MozReview-Commit-ID: 29mkllmDQ0L
2017-10-31 13:52:41 +08: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
Kartikaya Gupta
bca07b64e2 Bug 1412280 - Update webrender to commit c0194de78ce26106a8497484dc8d159069e3a482. r=jrmuizel
MozReview-Commit-ID: 6kfVziU2Cj7

--HG--
extra : rebase_source : 3a9971e3c406df7c1b13dc1600a1c437213707bf
2017-10-31 09:08:43 -04:00
Kartikaya Gupta
197f2cc1ec Bug 1412280 - Remove unused bincode dependency. r=jrmuizel
MozReview-Commit-ID: JPy0COAMZfp

--HG--
extra : rebase_source : 23268ba42cde3f42d78f600c5ecf09a91761ae9e
2017-10-31 09:08:39 -04:00
Chris Peterson
73037a0f6a Bug 1412048 - Replace NS_RUNTIMEABORT(var) with MOZ_CRASH_UNSAFE_OOL(var). r=froydnj data-review=francois
And remove unreachable code after MOZ_CRASH_UNSAFE_OOL().

MOZ_CRASH_UNSAFE_OOL causes data collection because crash strings are annotated to crash-stats and are publicly visible. Firefox data stewards must do data review on usages of this macro. However, all the crash strings this patch collects with MOZ_CRASH_UNSAFE_OOL are already collected with NS_RUNTIMEABORT.

MozReview-Commit-ID: IHmJfuxXSqw

--HG--
extra : rebase_source : 031f30934b58a7b87f960e57179641d44aefe5c5
extra : source : fe9f638a56a53c8721eecc4273dcc074c988546e
2017-10-24 23:38:38 -07:00
Chris Peterson
1df202b177 Bug 1412048 - Replace NS_RUNTIMEABORT("...") with MOZ_CRASH("..."). r=froydnj
And remove unreachable code after MOZ_CRASH().

MozReview-Commit-ID: 6ShBtPRKYlF

--HG--
extra : rebase_source : 0fe45a59411bda663828336e2686707b550144ae
extra : source : 8473fd7333d2abe1ea1cc176510c292a5b34df45
2017-10-24 23:30:31 -07:00
Jonathan Kew
1f0b3fb8e7 Bug 1411931 - Ignore the font-size tolerance for bitmap fonts when matching font style in GetDefaultFont, as even a poor size match is better than no usable font. r=lsalzman 2017-10-31 17:33:18 +00:00
Attila Craciun
2ae920762e Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-10-31 12:53:23 +02:00
Sebastian Hengst
2470a9a87b merge mozilla-central to autoland. r=merge a=merge 2017-11-01 00:38:25 +01:00
Ethan Lin
72aaacd371 Bug 1407938 - Part3. Update reftest annotations after the fix. r=jrmuizel
MozReview-Commit-ID: E6JI7XFAOqf

--HG--
extra : rebase_source : 2f9d00827c8b579f2be08eb5e0f964264fd69c30
2017-10-18 14:37:56 +08:00
Jeff Muizelaar
a1e7521959 Bug 1412565. Release the vec before deleting the item. r=lsalzman
I think I caught and fixed this earlier but somehow lost the change.
Oh well.
2017-10-30 22:38:38 -04:00
Lee Salzman
341a10bb1b Bug 1412545 - AddRef user data before passing to cairo_font_face_set_user_data. r=jrmuizel
MozReview-Commit-ID: FcPTjCWh9wu
2017-10-30 22:31:11 -04:00
Sebastian Hengst
2c835e29c4 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-31 00:00:54 +01:00
Sebastian Hengst
f07fc93141 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4PW6ESqLL73
2017-10-30 23:52:23 +01:00
Jeff Gilbert
76e7050969 Bug 1411626 - Make GLContextSymbols a pure aggregate POD. - r=andi
MozReview-Commit-ID: CFRJqfcdXIJ
2017-10-30 14:51:51 -07:00
Andrew Osmond
95ee90ca7f Bug 1331944 - Part 8. Add plumbing to use shared surfaces if available in WebRenderImageData. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond
c505acd7e7 Bug 1331944 - Part 7. Handle shared surfaces in WebRenderBridgeParent::AddExternalImage. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond
74f4713f93 Bug 1331944 - Part 6. Expand SharedSurfacesChild to support sharing ImageContainers directly. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond
c38ef911b1 Bug 1331944 - Part 5. Integrate SharedSurfacesParent with the WebRender texture cache. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond
031385694b Bug 1331944 - Part 4. Add RenderSharedSurfaceTextureHost wrapper to integrate with external images. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond
2f8b457e1e Bug 1331944 - Part 3. Refactor mozilla::wr::LockExternalImage to make it easier to add new types. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond
d9e413fa5a Bug 1331944 - Part 2. Add SharedSurfacesParent/Child to manage shared surfaces. r=jrmuizel 2017-10-30 13:10:29 -04:00
Andrew Osmond
b8f42d8fa2 Bug 1331944 - Part 1. Add SourceSurfaceSharedDataWrapper and SourceSurfaceSharedData::HandleLock. r=jrmuizel 2017-10-30 13:10:28 -04:00
Jeff Gilbert
4f2cae0384 Bug 1395497 - Add AndroidSurfaceTexture support to GLBlitHelper. - r=snorp
MozReview-Commit-ID: JttqOoDCE4O
2017-10-30 10:58:56 -05:00
James Willcox
1ee57ae7a7 Bug 1395497 - Create SurfaceTexture in detached state, attach on first use r=jgilbert
MozReview-Commit-ID: HfkEUH9aiBo
2017-10-30 10:58:56 -05:00
Bas Schouten
cbbc50786e Bug 1412850: Release capture drawtargets on the paint thread. r=rhunt
MozReview-Commit-ID: AD3F5DfGAkp
2017-10-30 15:50:25 +01:00
Ryan Hunt
32261e72c6 Be sure to invalidate the buffer when content changes and we cannot reuse the buffer. (bug 1412150, r=nical)
Even if we cannot reuse the back buffer, we still use it to initialize the new back buffer.
The correct condition for detecting changes to buffer mode should only care if there is a
buffer, not if we decided to reuse it.

If the buffer mode has changed to component alpha, we need to invalidate and repaint everything
because we won't be able to copy over content to the new buffer correctly.

I believe this is a regression from the refactoring that created this function from
RotatedContentBuffer::BeginPaint.

MozReview-Commit-ID: H9G7GxqekLt

--HG--
extra : rebase_source : afb3321694ce3f1b54ad4dce28b4a7c7c7b47904
extra : amend_source : fdef1994514fcc9b9f2e952767a785841e9ddda0
extra : histedit_source : 3e8324255f516094c242ab3ec0688d2285c85a99
2017-10-28 15:21:13 -05:00
Jonathan Kew
0aa24e331c Bug 1412355 - Replace the mXOffset/mYOffset fields in DetailedGlyph records with a gfx::Point that stores glyph offsets in line-orientation-relative coordinates. r=jrmuizel 2017-10-30 14:55:42 +00:00
Jamie Nicol
21b5b6db95 Bug 1092294 - Use SurfaceTextures for painted content on android (preffed off). r=nical,snorp
Add a new TextureClientData type, AndroidNativeWindowTextureData,
backed by a SurfaceTexture in single-buffer mode. It uses the
NativeWindow API, which provides producer-side access to the buffer.
This provides a DrawTarget which can be used to paint directly in to
the SurfaceTexture, which can then be composited using a SurfaceTextureHost.

Due to API restrictions it is not possible to read from a NativeWindow
while the corresponding SurfaceTexture has ownership of the
buffer. TiledContentClient now handles that by painting the additional
region that it cannot copy from the front buffer, if required.

MozReview-Commit-ID: 1NZq6MQqwFq

--HG--
extra : rebase_source : 9d1db721d4892f3df033d43127489a85421e8863
2017-10-28 11:59:58 +01:00
Ethan Lin
a20e5ebfaa Bug 1407938 - Part2. Extract paint function for filter and svg wrapper. r=jrmuizel
MozReview-Commit-ID: CQpBdZapFH2

--HG--
extra : rebase_source : 1741e12c9f09596c27219ca2b3ce5c3923145593
2017-10-16 16:26:15 +08:00
Ethan Lin
1da48a5cc4 Bug 1407938 - Part1. Add nsDisplaySVGWrapper for webrender as a fallback display item. r=jrmuizel
MozReview-Commit-ID: LBjrqvPziCJ

--HG--
extra : rebase_source : 4f48e0c57a7170bd1d6e97cc6b426aa0cf81be4b
2017-10-16 15:47:46 +08:00
Andi-Bogdan Postelnicu
07c02b3927 Bug 1411630 - make mozilla::gfx::VRHMDSensorState to be trivial typed. r=kip
MozReview-Commit-ID: 7BniyasLIQD

--HG--
extra : rebase_source : 9f96da05deab0718b19170814a67a2b22c58656e
2017-10-30 14:51:32 +02:00
Sebastian Hengst
6979ea37b4 merge mozilla-central to autoland. r=merge a=merge 2017-10-30 23:58:16 +01: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
Daniel Holbert
de4b2b1c8b Bug 1412427 part 7: Manually fix up a few non-standard quirks in mode lines & MPL text, in gfx source files. r=jrmuizel
MozReview-Commit-ID: JgK3UhG20kn

--HG--
extra : rebase_source : 2677c73948463f84eeafc4895697dbdcd5fccae4
2017-10-27 15:55:40 -07:00
Daniel Holbert
3b352c7239 Bug 1412427 part 6: Remove stray "//" prefix before first line of MPL boilerplate comment, in some gfx source files. r=jrmuizel
This patch was automatically generated. I found the files to be fixed in this
patch with the following command:
grep -r "//  \* This Source Code" gfx

...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
####
old="//  \* This Source Code Form is subject to the terms of the Mozilla Public"
new=" \* This Source Code Form is subject to the terms of the Mozilla Public"
sed -i s%"^$old"%"$new"% $1
####

MozReview-Commit-ID: Ihx0EAOkT2g

--HG--
extra : rebase_source : 4dc97f234495e3ec1f4904e91d43d00fd3810626
2017-10-27 15:55:38 -07:00
Daniel Holbert
fc539779ba Bug 1412427 part 5: Deindent over-indented MPL boilerplate comments down to 1 space, for consistency & alignment. (whitespace-only) r=jrmuizel
This patch was automatically generated. I found the files to be fixed in this
patch with the following command:
grep -r "  \* This Source Code" gfx

...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
###
line1=" \* This Source Code Form is subject to the terms of the Mozilla Public"
line2=" \* License, v\. 2\.0\. If a copy of the MPL was not distributed with this"
line3=" \* file, You can obtain one at http://mozilla\.org/MPL/2\.0/\. \*/"

# Strip off 1 space at beginning:
sed -i s%"^ $line1"%"$line1"% $1
sed -i s%"^ $line2"%"$line2"% $1
sed -i s%"^ $line3"%"$line3"% $1
###

MozReview-Commit-ID: EwCjyajgY4W

--HG--
extra : rebase_source : c61ca17ba556290d1f27af0a0c84e2ccc5371a36
2017-10-27 15:55:37 -07:00
Daniel Holbert
ecf5ee687e Bug 1412427 part 4: Indent under-indented MPL boilerplate comments by 1 space, for consistency & alignment. (whitespace-only) r=jrmuizel
This patch was automatically generated. I found the files to be fixed in this
patch with the following command:
grep -r "^\* This Source Code" gfx

...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
###
line1="\* This Source Code Form is subject to the terms of the Mozilla Public"
line2="\* License, v\. 2\.0\. If a copy of the MPL was not distributed with this"
line3="\* file, You can obtain one at http://mozilla\.org/MPL/2\.0/\. \*/"

# Insert 1 space at beginning:
sed -i s%"^$line1"%" $line1"% $1
sed -i s%"^$line2"%" $line2"% $1
sed -i s%"^$line3"%" $line3"% $1
###

MozReview-Commit-ID: HXBMrfnhlVr

--HG--
extra : rebase_source : de4c78563711f8366e2978c5199a5041875fbe38
2017-10-27 15:55:37 -07:00
Daniel Holbert
76d8e6a7d5 Bug 1412427 part 3: Replace 10 gfx usages of a particular non-standard emacs mode line with our standard mode line. r=jrmuizel
This patch was mostly[1] automatically generated. I found the files to be fixed
in this patch with the following command:
grep -r "C++; indent-tabs-mode:" gfx

...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
###
old="/\* -\*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4 -\*- \*/"
new="/\* -\*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -\*- \*/"

sed -i s%"^$old"%"$new"% $1
###

[1] NOTE: Nearly all of these files use 2-space indentation, so it's correct
(from a consistency perspective and a reflecting-reality perspective) that
we're reducing their "c-basic-offset: 4" down to "c-basic-offset: 2" here.  The
one exception is nsDeviceContext.h, which *does* actually use 4-space
indentation right now -- so I'm leaving that file with "c-basic-offset: 4" in
its mode line.  This manual change (reverting 1 character from the automated
process) is the only piece of this patch that isn't automated.

MozReview-Commit-ID: L4MbyeYSbfY

--HG--
extra : rebase_source : 8ddbe422471bfd8b0060e96fb1c8cd062f10f290
2017-10-27 15:55:37 -07:00
Daniel Holbert
0aa7ac8984 Bug 1412427 part 2: Move vim mode line below emacs mode line in a few gfx files, for consistency. r=jrmuizel
This patch doesn't modify the mode lines at all -- it just swaps their order,
and makes each one its own C++ comment, separate from the MPL boilerplate
comment.

MozReview-Commit-ID: BEZJVj2sMuK

--HG--
extra : rebase_source : 9e0946c8a8d0b67c11b5932b9d1e51e0e6e8ebef
2017-10-27 15:55:37 -07:00
Daniel Holbert
976e9f7e7f Bug 1412427 part 1: Add standard mode line & MPL boilerplate to a few gfx C++ files that are missing it entirely. r=jrmuizel
I copied the boilerplate comment directly from the Coding Style MDN page:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

MozReview-Commit-ID: 8rO6SfBIaRl

--HG--
extra : rebase_source : 90093621cbaa2a62b19e22b0eacad600fc586560
2017-10-27 15:55:37 -07:00
Coroiu Cristina
9ca76dcb7a Backed out changeset b7a07167905c::2932c914e223 (bug 1406327) for failing in dom/vr/test/mochitest/test_vrController_displayId.html r=backout a=backout on a CLOSED TREE
Backed out changeset 2932c914e223 (bug 1406327)
Backed out changeset cfbc6262a064 (bug 1406327)
Backed out changeset b7a07167905c (bug 1406327)
2017-10-30 14:51:52 +02:00
Coroiu Cristina
de62a69e14 Merge inbound to mozilla-central r=merge a=merge 2017-10-30 12:16:47 +02:00
JerryShih
95b77b8a45 Bug 1399389 - update Cargo.lock and webrender_ffi_generated.h for webrender_bindings updating. r=nical
MozReview-Commit-ID: 8FIu1K1jjxM
2017-10-30 11:31:38 +08:00
JerryShih
5b15c33523 Bug 1399389 - redirect the warn/error message to gfx_critical_error/note in WR. r=kvark
MozReview-Commit-ID: Fxkz3Fq96Tb
2017-10-30 11:31:38 +08:00
Lee Salzman
3b3fcb68c1 Bug 1408481 - send gfxMacFont font smoothing setting to WebRender. r=mstange
MozReview-Commit-ID: 9BwLVrfjnsP
2017-10-29 20:21:10 -04:00
Kearwood "Kip" Gilbert
ccc6462307 Bug 1410493 - Update Oculus SDK from 1.5 to 1.9, update IPD during VR presentation r=daoshengmu
- Oculus SDK was updated from 1.5 to 1.9
- As the Oculus API now returns quaternion orientations for each
  eye-to-head transform, I needed to send more information to the
  content process.
- Rather than adding the quaternion, we now calculate the view matrices
  on the VR thread in the GPU process rather than calculating it in the
  content thread from parameters.
- OpenVR's full view matrix is now used, for compatibility with more devices.
- IPD adjustments are now updated every frame for both Oculus and OpenVR.


MozReview-Commit-ID: LOtfs4QIqc8

--HG--
extra : rebase_source : 0a69824012ede4bea0e0e709a2d027d0c35730bb
2017-10-23 14:23:03 -07:00
Kartikaya Gupta
e943be52e0 Bug 1413229 - Stop calling CreateWebRenderCommands for event regions types. r=jrmuizel
These items don't paint anything and are handled separately, so we don't need
to call CreateWebRenderCommands for them. We could just implement
CreateWebRenderCommands for the item and have it return true unconditionally,
but it's still an extra virtual call. Plus there's existing code in
WebRenderCommandBuilder that's conditioned specifically for event regions so
I prefer keeping all the conditioned code together.

MozReview-Commit-ID: 5kTuv7qgiKU

--HG--
extra : rebase_source : 8bd1a3fdf6711d06ff7523a25324da3a170215a3
2017-10-31 12:07:23 -04: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
Sebastian Hengst
ead7053042 merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2017-10-29 12:12:13 +02:00
Jeff Muizelaar
91f3b3ac1d Bug 1380014. Fix up the webrender bindings. r=kats
The earlier patches in this bug were written before we had
sophisticated binding generation so the types didn't match very well.
This fixes all of that.

MozReview-Commit-ID: DpcblpB8vxW
2017-10-28 18:32:24 -04:00
Sebastian Hengst
7486bf7e8a merge mozilla-central to autoland. r=merge a=merge 2017-10-29 00:22:01 +02:00
Boris Chiou
ca916ce990 Bug 1412542 - Fix crashes on products other than Firefox. r=heycam
MozReview-Commit-ID: G9DeMR5o8F3

--HG--
extra : rebase_source : ddf209961e618c90da7c80f8a2d6952923b56ecb
2017-10-28 20:49:08 +02:00
Sebastian Hengst
8968724f1a Backed out changeset 4905048de8d1 (bug 1412355) for frequently failing reftest layout/reftests/writing-mode/1248248-1-orientation-break-glyphrun.html on Linux x64 debug and asan. r=backout
--HG--
extra : amend_source : 61e56c97354c788bfd03aa551e911a1aff14006e
2017-10-28 16:39:59 +02:00
Jonathan Kew
62f09f8b17 Bug 1407114 - part 4 - Handle fallback from styled to regular face if necessary when using font-families from preferences. r=jrmuizel 2017-10-23 22:32:58 +01:00
Jonathan Kew
3ea98ba522 Bug 1407114 - part 3 - Handle fallback from styled to regular face if necessary when checking the platform's common fallback fonts. r=jrmuizel 2017-10-23 22:31:57 +01:00
Jonathan Kew
6ade77d1f6 Bug 1407114 - part 2 - Handle fallback from styled to regular face if necessary during global font fallback, to handle cases where some styled faces may have a reduced character repertoire. r=jrmuizel 2017-10-28 13:21:44 +01:00
Jonathan Kew
bbbc9da9dd Bug 1407114 - part 1 - preliminary cleanup - Remove the (unused) runScript member from the GlobalFontMatch struct, and introduce gfxFontEntry::IsNormalStyle() helper method. r=jrmuizel 2017-10-28 13:21:38 +01:00
Jonathan Kew
8397a853b8 Bug 1412355 - Replace the mXOffset/mYOffset fields in DetailedGlyph records with a gfx::Point that stores glyph offsets in line-orientation-relative coordinates. r=jrmuizel 2017-10-28 11:37:35 +01:00
sotaro
23069babc9 Bug 1401609 - Add UpdateWebRenderCanvasData() to handle CanvasRenderer re-creation r=jrmuizel,mstange 2017-10-28 19:07:27 +09:00
Sebastian Hengst
831f2ed98f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: oIdBL7fmlE
2017-10-28 10:31:58 +02:00
Jeff Muizelaar
5052f0826f Bug 1380014. Keep the unscaled font alive. r=lsalzman
This is the actual change the eliminates the font cache
churn as well as eliminating the jank that comes when
loading font for the first time.
2017-10-27 23:23:35 -04:00
sotaro
4461b5e90f Bug 1408573 - Change buffer allocation to fallible r=nical 2017-10-28 07:30:13 +09:00
Jeff Muizelaar
ed62b1d4a1 Bug 1380014. Share fonts with WebRender. r=lsalzman
This changes the serialization format a little bit.
We now have an index at the end of the blob. This
is currently used to store a list of the used font keys.
In the future we'll add rects and can use it for invalidation.
2017-10-27 18:21:27 -04:00
Jeff Muizelaar
f1e1608327 Bug 1380014. Add the ability to record UnscaledFonts by index. r=lsalzman 2017-10-27 18:21:26 -04:00
Jeff Muizelaar
2922532654 Bug 1380014. Expose GetFontKeyForUnscaledFont. r=lsalzman
We'll use this to share fonts with BlobImages
2017-10-27 18:21:25 -04:00
sotaro
9ddfb11820 Bug 1412246 - Fix memory leak with WebRenderLayerManager::EndEmptyTransaction() r=nical 2017-10-28 06:54:56 +09:00
Sebastian Hengst
2e7f384b52 merge autoland to mozilla-central. r=merge a=merge 2017-10-27 23:21:20 +02:00
Jonathan Kew
824ae50de4 Bug 1395926 - Fix up handling of glyph offsets for text shaped in vertical mode. r=jrmuizel 2017-10-27 18:57:45 +01:00
Kartikaya Gupta
e7b42ecace Bug 1411249 - Handle yet more clipping cases. r=mstange
This extends the fix in bug 1373802 to account for extra levels of
display item nesting. If those extra intermediate display items don't
push any clips we still want to pick up the ClipAndScroll from the
enclosing ancestor that has it.

MozReview-Commit-ID: AmxRz4fBKnX

--HG--
extra : rebase_source : ae12a9f797ab201169ff199d0d42a29df51ee1cb
2017-10-27 13:22:16 -04:00
Kartikaya Gupta
3d6ab7288b Bug 1373802 - Handle more clipping cases. r=mstange
We already support cases where we have scrolling clips applied to fixed
items. However if we had to build nested clips inside those items, then
those nested clips would not properly inherit from the scrolling clips.
This patch addresses that case.

MozReview-Commit-ID: CWp1x0EsyaP

--HG--
extra : rebase_source : f8c80ace2da39edebaabd5339670a68038a18489
2017-10-27 11:41:37 -04:00
Ryan VanderMeulen
42a983ba76 Bug 1411005 - Update Harfbuzz to version 1.6.3. r=jfkthame 2017-10-27 10:56:24 -04:00
Kartikaya Gupta
b7e231bc45 Bug 1410777 - Force a full transaction for WR when the window overlay changes. r=mstange
The window buttons are drawn as part of the AddWindowOverlayWebRenderCommands
function which is invoked in the full-transaction codepath. It should be possible
to have the empty transaction codepath simply update the image (without building
a full WR display list) and do a recomposite. That would be more performant but
it requires some plumbing to build and ship across a IpcResourceUpdateQueue on
empty transactions.

MozReview-Commit-ID: 2Mrb0wELD6E

--HG--
extra : rebase_source : 9a94c32f94403050835bf3445176f4fe2c1579fa
2017-10-26 14:17:19 -04:00
Kartikaya Gupta
75717cb048 Bug 1410777 - Remove unused function and dead code left over from the layers-full WR days. r=mstange
This is functionally unrelated to the bug but I noticed it while fiddling with
the code, and the lines affected are kind of intertwined with the next patch so
I'm just doing the code removal as part of this bug.

MozReview-Commit-ID: CwmluhyCdbR

--HG--
extra : rebase_source : 0a86ba7299f63587b77c44fadc804e34ada5a474
2017-10-26 14:17:18 -04:00
Boris Chiou
0576efed8c Bug 1340005 - Part 7: Switch compositor animations to Servo backend for desktop. r=birtles,hiro,nical
We want to always use Servo animation backend on the compositor.
However, Android doesn't support Stylo now, so add a defined flag for it.

MozReview-Commit-ID: 63MnTBnq6yv

--HG--
extra : rebase_source : dce46737f81e4e217e9fd67b6bec722994dca6a2
2017-10-27 21:13:27 +02:00
Boris Chiou
3788926119 Bug 1340005 - Part 6: Move AppendTransformFunction into AnimationValue struct. r=birtles
MozReview-Commit-ID: KhjKXxkllEF

--HG--
extra : rebase_source : 6f22a5f0a90f3f3d160f64c67e6fd6d04a2c1441
2017-10-17 13:11:19 +08:00
Boris Chiou
387cd4d8a1 Bug 1340005 - Part 5: Implement SampleValue for Servo backend. r=birtles
Use the new added FFI, Servo_ComposeAnimationSegment, to compose an
animation segment from Servo backend on the compositor.

MozReview-Commit-ID: LNgpCSIlDl9

--HG--
extra : rebase_source : 5b5c145fae877b4f4b01ea54259737dc9dad2951
2017-10-27 21:09:11 +02:00
Boris Chiou
0129bb4f52 Bug 1340005 - Part 4: Retrieve transform list from AnimationValue. r=birtles
MozReview-Commit-ID: 82NAOBV2rEl

--HG--
extra : rebase_source : 073ff742dcea4573febeec3b57c60b0f1f5736e2
2017-09-25 14:25:43 +08:00
Boris Chiou
743614effe Bug 1340005 - Part 3: Use AnimationValue on the compositor thread. r=birtles
MozReview-Commit-ID: CtnDLsdcr9x

--HG--
extra : rebase_source : 3d4a0f40e2f522471555c04c88474cb08e082851
2017-09-21 17:01:48 +08:00
Boris Chiou
7086921688 Bug 1340005 - Part 2: Implement AnimationValue::Transform. r=birtles
MozReview-Commit-ID: BDKcpDIM9nb

--HG--
extra : rebase_source : 43a5e7f053d746198f422487f7e19f535ccd9dc5
2017-10-27 21:06:30 +02:00
Boris Chiou
701609334e Bug 1340005 - Part 1: Implement AnimationValue::Opacity. r=birtles
We will use Servo backend on the compositor, so implement this for opacity.

MozReview-Commit-ID: BeWR2nBSbjb

--HG--
extra : rebase_source : eb5db3cf04640a83f13857984e792a949f26bcc7
2017-10-27 21:04:52 +02:00
Sebastian Hengst
28b1c813ea merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: DasxLYlgq0N
2017-10-27 23:30:52 +02:00
Alexis Beingessner
0f3e571e68 Bug 1410893 - Update bindings for API changes in WR PR 1923. r=jrmuizel
MozReview-Commit-ID: G7qfzaX6mxb

--HG--
extra : rebase_source : 0584dfa51eac36bbacf3870de50c86d4b53ee525
2017-10-27 08:56:31 -04:00
Kartikaya Gupta
1acb485728 Bug 1410893 - Update Cargo lockfiles and re-generate FFI header. r=jrmuizel
MozReview-Commit-ID: FobLKM7SYdY

--HG--
extra : rebase_source : bb1d27b56d9556097ef005c93de44be10d19e79a
2017-10-27 08:52:51 -04:00
Kartikaya Gupta
d639eb0193 Bug 1410893 - Update webrender to commit 4b8493d6bdc64d2d83202ac15b06b0d4b14c6e76. r=jrmuizel
MozReview-Commit-ID: DoUZXZtRyDY

--HG--
extra : rebase_source : c6b6fac4767e641ac7207bc03dbf206417f7a655
2017-10-27 08:51:39 -04:00
Sebastian Hengst
5c15da1f08 merge mozilla-inbound to mozilla-central. r=merge a=merge
--HG--
rename : testing/talos/tests/__init__.py => testing/talos/talos/unittests/__init__.py
rename : testing/talos/tests/browser_output.ts.txt => testing/talos/talos/unittests/browser_output.ts.txt
rename : testing/talos/tests/browser_output.tsvg.txt => testing/talos/talos/unittests/browser_output.tsvg.txt
rename : testing/talos/tests/profile.tgz => testing/talos/talos/unittests/profile.tgz
rename : testing/talos/tests/ps-Acj.out => testing/talos/talos/unittests/ps-Acj.out
rename : testing/talos/tests/test_talosconfig_browser_config.json => testing/talos/talos/unittests/test_talosconfig_browser_config.json
rename : testing/talos/tests/test_talosconfig_test_config.json => testing/talos/talos/unittests/test_talosconfig_test_config.json
rename : testing/talos/tests/xrestop_output.txt => testing/talos/talos/unittests/xrestop_output.txt
2017-10-27 12:45:34 +03:00
Jeff Gilbert
e0d51c5ece Bug 1404536 - Use float division not accidentally int division. - r=daoshengmu
MozReview-Commit-ID: KUIE0dl6hlE
2017-10-26 18:43:35 -07:00
Jeff Gilbert
747359fc3f Bug 1404536 - ESSL3 needs texture() not texture2D(). - r=snorp
MozReview-Commit-ID: CJxOVbkItJX
2017-10-26 18:43:31 -07:00
Jeff Gilbert
62ca2c9829 Bug 1404536 - Use 3x4 matrices for GLBlitHelper's color matrix. - r=daoshengmu
MozReview-Commit-ID: Z5XTzmY3K7
2017-10-26 18:43:28 -07:00
Jeff Gilbert
1f167472bf Bug 1404536 - Use mat3s to transform tex coords in GLBlitHelper. - r=daoshengmu
MozReview-Commit-ID: 9LxsSJF1ggN
2017-10-26 18:43:24 -07:00
Tom Ritter
314d986699 Bug 1407513 Turn std:future back on for ANGLE in the MinGW build now that we have winpthreads r=jgilbert
MozReview-Commit-ID: 9K2Bqtvxemo

--HG--
extra : rebase_source : ab3e9e924734125d94a5460057c6b36f96c4b9a8
2017-10-26 16:02:03 -05:00
Sebastian Hengst
4d087e6f8b Backed out changeset 817727beee91 (bug 1410766) for leak. r=backout
--HG--
extra : amend_source : 3137b1b2bd4cafe41651244531957708193eccbb
2017-10-26 23:39:23 +02:00
Sebastian Hengst
c1cc60ba6f Backed out changeset 0998d26202bd (bug 1408612) for reftest failures e.g. layout/reftests/svg/text-gradient-01.svg and layout/reftests/writing-mode/1193519-sideways-lr-decoration-1.html. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 9939a46e37da653be63d9e9ba6a079a05851780d
2017-10-26 23:08:29 +02:00
Attila Craciun
0cab95ab0f Merge inbound to mozilla-central r=merge a=merge 2017-10-26 12:20:45 +03:00
Jesse Ruderman
85a0a23d40 Bug 1248222 - Add crashtest. r=me 2017-10-25 21:03:17 -04:00
Jesse Ruderman
ae2294df40 Bug 1242822 - Add crashtest. r=me 2017-10-25 21:03:17 -04:00
Jesse Ruderman
7dfed796b9 Bug 1242811 - Add crashtest. r=me 2017-10-25 21:03:16 -04:00
Jesse Ruderman
e524f59c09 Bug 1229972 - Add crashtest. r=me 2017-10-25 21:03:16 -04:00
Jesse Ruderman
1c94b2275e Bug 1228127 - Add crashtest. r=me 2017-10-25 21:03:16 -04:00
Jesse Ruderman
b304b15bff Bug 895233 - Add crashtest. r=me 2017-10-25 21:03:16 -04:00
Jesse Ruderman
0895ae5e71 Bug 747302 - Add crashtest. r=me 2017-10-25 21:03:16 -04:00
Jesse Ruderman
1bd739f84f Bug 747132 - Add crashtest. r=me 2017-10-25 21:03:16 -04:00
Jesse Ruderman
39171de089 Bug 746866 - Add crashtest. r=me 2017-10-25 21:03:15 -04:00
Jesse Ruderman
052e25b132 Bug 746849 - Add crashtest. r=me 2017-10-25 21:03:15 -04:00
Jesse Ruderman
41d58ad1d4 Bug 746847 - Add crashtest. r=me 2017-10-25 21:03:15 -04:00
Jesse Ruderman
ef85cadf01 Bug 746844 - Add crashtest. r=me 2017-10-25 21:03:15 -04:00
Jesse Ruderman
679e4b5aa5 Bug 1221304 - Add crashtest. r=me 2017-10-25 21:03:15 -04:00
Jesse Ruderman
8d838329c9 Bug 746497 - Add crashtest. r=me 2017-10-25 21:03:14 -04:00
Jesse Ruderman
44192a9753 Bug 746495 - Add crashtest. r=me 2017-10-25 21:03:14 -04:00
Jesse Ruderman
c6bbb01a1e Bug 746491 - Add crashtest. r=me 2017-10-25 21:03:14 -04:00
Jonathan Kew
d19ac5a103 Bug 1408612 - patch 3 - Take GlyphBufferAzure::Flush() out of the inner loop of DrawGlyphs by pre-allocating capacity for a run of glyphs to be appended. r=jrmuizel 2017-10-25 20:39:30 +01:00
Jonathan Kew
2660b7f4db Bug 1408612 - patch 2 - Create templated gfxFont::DrawGlyphs and DrawOneGlyph methods to allow parts of their complexity to be optimized away at compile time for the most common cases (no color glyphs, no inter-glyph spacing). r=jrmuizel 2017-10-24 15:06:45 +01:00
Jonathan Kew
793b63713b Bug 1408612 - patch 1 - Use single-precision floats more consistently for glyph position computations when drawing text. r=jrmuizel 2017-10-24 09:59:09 +01:00
Jesse Ruderman
3345bdd9b6 Bug 691330 - Add crashtest. r=me 2017-10-25 14:58:33 -04:00
Jesse Ruderman
bd5f8ece04 Bug 1011218 - Add crashtest. r=me 2017-10-25 14:58:32 -04:00
Jesse Ruderman
06e60cd556 Bug 403352 - Add crashtest. r=me 2017-10-25 14:58:32 -04:00
Sebastian Hengst
443416f881 Merge mozilla-central to autoland. r=merge a=merge 2017-10-26 00:39:55 +02:00
Chris Manchester
c86173526a Bug 1403346 - Replace all uses of ALLOW_COMPILER_WARNINGS with a template, remove ALLOW_COMPILER_WARNINGS. r=glandium
MozReview-Commit-ID: 1G2o4fy74cf
2017-10-25 15:12:09 -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
Kartikaya Gupta
cf3b87c06e Bug 1410527 - Update how we tell WR about position:sticky elements. r=mstange
My original understanding of the API was flawed, and so while I had
position:sticky working in some cases it didn't work properly in a lot
of other cases. This patch corrects the usage of the API to match what
WR is expecting and fixes a lot of test cases.

MozReview-Commit-ID: AdMux19Fk9U

--HG--
extra : rebase_source : e7f970a710b2079501a91eeeac8c292b603210dc
2017-10-25 15:21:32 -04:00
Tom Ritter
fc2f75822a Bug 1407601 Revert to the previous behavior in MozGrMalloc.h for Linux, and add extern C to correct Solaris build break r=baku
MozReview-Commit-ID: GP6N6pcqQp

--HG--
extra : rebase_source : a51cbdffcb05631876d458f7a19b295fc0bb4642
2017-10-11 10:16:32 -05:00
Kartikaya Gupta
bec5f23434 Bug 1411238 - Make APZ test logging work in layers-free WR mode. r=botond
Most of this change is just fiddling with function signatures so that they take
a LayerManager* instead of a Layer* (or in some cases, both). This allows
the WebRender codepaths to pass a WebRenderLayerManager* instead of having to
produce a Layer* which it doesn't have.

MozReview-Commit-ID: Fb0C8OUVDin

--HG--
extra : rebase_source : e4c3324cfa20c295db85d5c09df8d8d77865bb6a
2017-10-25 13:22:04 -04:00
Kartikaya Gupta
4c7c7873e4 Bug 1411238 - Make OMTA queries work with layers-free webrender. r=mtseng
MozReview-Commit-ID: Jq57GtjNO3E

--HG--
extra : rebase_source : 15c2e3a4acbc61c60827bf1748ef691f2275fb66
2017-10-25 11:14:41 -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
Miko Mynttinen
e61db8e3f3 Bug 1411248 - Add some early exit heuristics to avoid complicated partial display list builds r=mattwoodrow
MozReview-Commit-ID: BRYYvGHptbw

--HG--
extra : rebase_source : e740e868bf6f1ce366286a4e8a3db8f1918b4160
extra : source : df60d43e89285978ca7ba6bab5a5c7ef49ffaf92
2017-10-24 14:54:16 +02: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
d37fe26642 Bug 1405359 - Add some logging code in ScrollingLayersHelper. r=jrmuizel
MozReview-Commit-ID: Lb4UeUxO5HL

--HG--
extra : rebase_source : e5e8c58380055693664bb1a5241bab4d803dfdab
2017-10-24 18:47:24 -04:00
Kartikaya Gupta
4891a7a56f Bug 1405359 - Avoid pushing and popping identical clip stacks for adjacent display items. r=jrmuizel
Instead of unconditionally pushing and popping clips per display item,
this patch changes things so that for each recursive display list, we
create an ItemClips struct. We push this onto the stack when we enter
the display list, and pop it off at the end. For each display item, we
check to see if the clips would actually change compared to the previous
display item, and only do the pop/repush in that case.

MozReview-Commit-ID: J0MCc2V9hWT

--HG--
extra : rebase_source : 8617cfaa7391457867f01c1b619cb871a21bf3f5
2017-10-24 18:47:17 -04:00
Kartikaya Gupta
746bb09454 Bug 1405359 - Make ScrollingLayersHelper a more stateful class. r=jrmuizel
This makes ScrollingLayersHelper a non-RAII type class, and instead adds
methods to notify it of when we start processing a new transaction or a
new display item within the transaction. This patch has no functional
changes, it's non-obvious refactoring.

MozReview-Commit-ID: GEZzCGbVqB1

--HG--
extra : rebase_source : dd4fab7f34da7c5465ba474db670cf583e8dadf4
2017-10-24 18:46:44 -04:00
Kartikaya Gupta
4aa9c4885f Bug 1405359 - Replace the mPushed* variables with a more encapsulated struct. r=jrmuizel
Storing the per-item clip state in a struct like this will allow us to
easily compare the desired clip state across items, so we can avoid
doing unnecessary work when going from one item to the next. This patch
has no functional changes, it's just refactoring.

MozReview-Commit-ID: GX2FX4YDusO

--HG--
extra : rebase_source : 06d7bae5cbae99d2987881f26f7ebd26965c1799
2017-10-24 18:45:28 -04:00
Kartikaya Gupta
ead1f0c769 Bug 1405359 - Stop passing around the clip id cache in all the functions. r=jrmuizel
Instead just keep a ref to it as a member variable. No functional
change.

MozReview-Commit-ID: 9jSBdZRIGuV

--HG--
extra : rebase_source : cd1b2f500e9a833f7d42bce53bdaec2118e0d4c3
2017-10-24 18:45:04 -04:00
Sebastian Hengst
6231274042 Backed out changeset cb49e178390c (bug 1405359) for Windows build bustage in ScrollingLayersHelper.h. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 81b0a5bd94ad8e5d83e455e5a226a578b7060dc4
2017-10-25 00:17:01 +02:00
Sebastian Hengst
1d775e1d29 Backed out changeset f6ce05f8e699 (bug 1405359) 2017-10-25 00:16:55 +02:00
Sebastian Hengst
c10fc4a634 Backed out changeset 154c415885b8 (bug 1405359) 2017-10-25 00:16:49 +02:00
Sebastian Hengst
eecd8d4a11 Backed out changeset 988d6a397ea8 (bug 1405359) 2017-10-25 00:16:43 +02:00
Sebastian Hengst
5a6323a88c Backed out changeset 1593dfc4cf04 (bug 1405359) 2017-10-25 00:16:37 +02:00
Kartikaya Gupta
0950c9499b Bug 1405359 - Add some logging code in ScrollingLayersHelper. r=jrmuizel
MozReview-Commit-ID: 3OLNPHlkO9M

--HG--
extra : rebase_source : dcfbae96dc8de0a5d726140a05b5807e2b03412d
2017-10-24 16:15:00 -04:00
Kartikaya Gupta
3bc78496af Bug 1405359 - Avoid pushing and popping identical clip stacks for adjacent display items. r=jrmuizel
Instead of unconditionally pushing and popping clips per display item,
this patch changes things so that for each recursive display list, we
create an ItemClips struct. We push this onto the stack when we enter
the display list, and pop it off at the end. For each display item, we
check to see if the clips would actually change compared to the previous
display item, and only do the pop/repush in that case.

MozReview-Commit-ID: GadIp2J8TrA

--HG--
extra : rebase_source : ba64c6b4659b8e51cab19b807088b9a50d71b85a
2017-10-24 16:15:00 -04:00
Kartikaya Gupta
1ef110fd03 Bug 1405359 - Make ScrollingLayersHelper a more stateful class. r=jrmuizel
This makes ScrollingLayersHelper a non-RAII type class, and instead adds
methods to notify it of when we start processing a new transaction or a
new display item within the transaction. This patch has no functional
changes, it's non-obvious refactoring.

MozReview-Commit-ID: 3yq9sPiHMge

--HG--
extra : rebase_source : 286423f56de59211e320f015cb1004a1e98332b8
2017-10-24 16:15:00 -04:00
Kartikaya Gupta
7feb6820bd Bug 1405359 - Replace the mPushed* variables with a more encapsulated struct. r=jrmuizel
Storing the per-item clip state in a struct like this will allow us to
easily compare the desired clip state across items, so we can avoid
doing unnecessary work when going from one item to the next. This patch
has no functional changes, it's just refactoring.

MozReview-Commit-ID: 49B6hmsWZ4V

--HG--
extra : rebase_source : 8ac4bbf039f81bc2d26e92924ed041fa3d18e5ba
2017-10-24 16:15:00 -04:00
Kartikaya Gupta
b43a3f46dc Bug 1405359 - Stop passing around the clip id cache in all the functions. r=jrmuizel
Instead just keep a ref to it as a member variable. No functional
change.

MozReview-Commit-ID: 5fccUlSifsA

--HG--
extra : rebase_source : a14672f926c383354db76e553ae23613fe4a432a
2017-10-24 16:14:59 -04:00
Kartikaya Gupta
54a6b4655a Bug 1409446 - Remove old code that is now unused. r=mstange
MozReview-Commit-ID: KEtcbIGTrn3

--HG--
extra : rebase_source : dd2a435cab15930b7d5277d1764eddefd4cca298
2017-10-24 15:46:00 -04:00
Kartikaya Gupta
1dc275308d Bug 1409446 - Switch over to the new code. r=mstange
One of the sticky-pos tests was only passing because of two wrongs that
cancelled each other out in the old code. Specifically, instead of
defining a nested clip with the sticky clip as an ancestor, the clip was being
defined with the root ASR as an ancestor. Both resulted in the nested
clip not scrolling with the actual scrolling scrollframe and so the test
was passing.

The new code changes things so that the nested clip is defined with the
actual scrolling scrollframe as the ancestor, causing the reftest to fail.
Fixing the clip ancestry is not hard but it reveals other problems so
so I'm deferring that to a follow-up bug.

MozReview-Commit-ID: DldAKi1AP4l

--HG--
extra : rebase_source : a448e06fd26fff21bbc4a6f50e04dbbdb427298c
2017-10-24 15:46:00 -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
4fcc51960c Bug 1409446 - Work around the dual-ancestor case that WR doesn't handle yet. r=mstange
Bug 1409442 is tracking a change that will allow scroll layers to have
multiple ancestors. Without that, there are cases we cannot properly
handle, and so we need to ignore a clip in those scenarios. This patch
makes sure we do that instead of crashing.

MozReview-Commit-ID: 7AU4uyzT6if

--HG--
extra : rebase_source : d483c2a7ecff5cd488a53fa5e6b6da55cc3a1e29
2017-10-24 15:45:59 -04:00
Kartikaya Gupta
9b3a9d0d62 Bug 1409446 - Deal with scenario of two interchangeable DisplayItemClipChain objects causing a cache miss. r=mstange
MozReview-Commit-ID: 4FQvOmMUUKH

--HG--
extra : rebase_source : 9b497dc5f97345aee55f8dbf25d1db926c93c68f
2017-10-24 15:45:59 -04:00
Kartikaya Gupta
fdefb982b7 Bug 1409446 - Properly handle out-of-band clips in the new ScrollingLayersHelper code. r=mstange
When display items (such as mask items) push an out-of-band clip, we
can't use clip ids from, or update clip ids into, the cache. We also
need to ensure we take these out-of-band clips into account when
determining the parent for a new clip we are going to define.

MozReview-Commit-ID: GcUI2Hf6SLB

--HG--
extra : rebase_source : 512be5a6998b9c1d6db9d8c550231f0883d721c9
2017-10-24 15:45:59 -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
54e570d116 Bug 1409446 - Write the new recursive method to define clip chains. r=mstange
This code is more straightforward in its recursion than the old code,
and provides a relatively clean way to explicitly pass the desired
parent when defining a new clip or scroll layer.

Refer to the documentation in the patch for more details.

Note that this patch provides the basic recursive algorithm to define
the clips and scroll layers, although it omits some of the complicating
edge cases which will be added in later patches. The new code is not
invoked from anywhere until all the edge case handling has been done.

MozReview-Commit-ID: 7z51Kd7LlPU

--HG--
extra : rebase_source : 491efac9282a7379f7977a1bc0205ac70e356c3c
2017-10-24 15:45:58 -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