Commit Graph

28170 Commits

Author SHA1 Message Date
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
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
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
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