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

33090 Коммитов

Автор SHA1 Сообщение Дата
Jeff Gilbert 69072e8b95 Bug 1540357 - Fix implicit int truncation in dom/canvas's gfx/* includes. r=jrmuizel
Depends on D25497

Differential Revision: https://phabricator.services.mozilla.com/D25498

--HG--
extra : moz-landing-system : lando
2019-04-02 17:00:47 +00:00
Matt Woodrow b7d051a4cb Bug 1539673 - Make sure we build layers for empty items, since they might contain hit test information. r=miko
Depends on D25169

Differential Revision: https://phabricator.services.mozilla.com/D25331

--HG--
extra : moz-landing-system : lando
2019-04-01 16:54:51 +00:00
Matt Woodrow fed842fadd Bug 1539673 - Remove old code for handling opacity:0 within the consumers. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D25169

--HG--
extra : moz-landing-system : lando
2019-04-01 16:54:07 +00:00
Gerald Squelart e2d15a1cfb Bug 1429613 - Variant matcher callbacks renamed from `match` to `operator()` - r=froydnj
Mechanical change from Matcher::match(...) to Matcher::operator()(...).
This will now permit the use of generic lambdas, and facilitate the
implementation of multi-lambda match.

Differential Revision: https://phabricator.services.mozilla.com/D24889

--HG--
extra : moz-landing-system : lando
2019-04-02 11:53:47 +00:00
Daosheng Mu 0965abeaa7 Bug 1520339 - Part 2: handling memory reporting for VR process. r=kip,erahm
Differential Revision: https://phabricator.services.mozilla.com/D25321

--HG--
extra : moz-landing-system : lando
2019-04-02 05:13:17 +00:00
Daosheng Mu 9904bad8e0 Bug 1520339 - Part 1: adding ensure VR process ready mechanism. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D25320

--HG--
extra : moz-landing-system : lando
2019-04-02 05:13:15 +00:00
sotaro e64563ea54 Bug 1532201 - Enable SurfaceFactory_EGLImage usage with WebRender r=nical
Differential Revision: https://phabricator.services.mozilla.com/D24668

--HG--
extra : moz-landing-system : lando
2019-04-02 03:16:20 +00:00
arthur.iakab 97cc18f3c6 Backed out changeset 48d248c9f5fd (bug 1532201) for causing multiple build bustages on TextureHostOGL.cpp CLOSED TREEE 2019-04-02 02:36:51 +03:00
sotaro 572a63549a Bug 1532201 - Enable SurfaceFactory_EGLImage usage with WebRender r=nical
Differential Revision: https://phabricator.services.mozilla.com/D24668

--HG--
extra : moz-landing-system : lando
2019-04-01 22:07:47 +00:00
sotaro 6510aded8d Bug 1539729 - Disable RenderCompositorOGL usage on android r=nical
On android, we want to use only RenderCompositorEGL for using sharedGL. Further RenderCompositorOGL does not work well with android SurfaceTexture.

Differential Revision: https://phabricator.services.mozilla.com/D25201

--HG--
extra : moz-landing-system : lando
2019-04-01 21:58:05 +00:00
Emilio Cobos Álvarez d5f76a387b Bug 1537594 - Make the fixed generic family a parse-time alias to monospace. r=jfkthame
As discussed on IRC, fixed is only used for prefs right now, and:

 * We already copy the fixed size to the monospace font.
 * We already serialize the fixed family as "monospace" in the style system.

So it already works somewhat inconsistently. Making it an alias makes it
work consistently.

Differential Revision: https://phabricator.services.mozilla.com/D24288

--HG--
extra : moz-landing-system : lando
2019-04-01 21:48:08 +00:00
Emilio Cobos Álvarez 19c116ce06 Bug 1537575 - Cleanup generic font-family handling. r=jfkthame
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

Differential Revision: https://phabricator.services.mozilla.com/D24272

--HG--
extra : moz-landing-system : lando
2019-04-01 21:47:59 +00:00
Cosmin Sabou 6f67a6f9e5 Merge mozilla-inbound to mozilla-central. a=merge 2019-04-02 00:55:55 +03:00
Makoto Kato e336b78caf Bug 1149300 - zoomToFocusedInput should make focused content visible. r=kats
ZoomToFocusedInput currently does not properly handle the
case where the input element is inside a nested scrollable subframe,
as it only asks APZ to pan/zoom the root content document, and
the root content document might not be zoomable or scrollable to
make the input element visible. To handle this case properly we need
to ask the main thread to scroll the element into view first.

Differential Revision: https://phabricator.services.mozilla.com/D20983

--HG--
extra : rebase_source : 21d2b66bb657b1165820d76fe86badb7838035da
extra : histedit_source : 996b4eebf9855445c11135f5f7a3789209b720f8%2C183ffc9ae30c1df4813204dd1bedf5b9f5608518
2019-04-01 15:46:24 +09:00
Sylvestre Ledru ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D24168

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Emilio Cobos Álvarez a77e5e1ffc Bug 1520953 - Use GL_ANGLE_provoking_vertex extension if available. r=jgilbert
You tell me if this is right, I have no Windows build available to test :)

Depends on D25602

Differential Revision: https://phabricator.services.mozilla.com/D25603

--HG--
extra : moz-landing-system : lando
2019-04-01 16:06:20 +00:00
Emilio Cobos Álvarez 63d22618c3 Bug 1520953 - Update gleam. r=kats,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D25602

--HG--
extra : moz-landing-system : lando
2019-04-01 17:54:08 +00:00
Lee Salzman a00853db4b Bug 1539026 - Skia m74 fuzzing. r=rhunt 2019-03-26 14:52:45 -04:00
Lee Salzman 552e417755 Bug 1539026 - Skia m74 Moz2D fixes. r=rhunt 2019-03-26 11:06:56 -04:00
Lee Salzman 73443d7f86 Bug 1539026 - Skia m74 mozbuild fixes. r=rhunt 2019-03-26 11:06:47 -04:00
Lee Salzman f2f62aef14 Bug 1539026 - Skia m74 sources. r=rhunt
--HG--
rename : gfx/skia/skia/third_party/vulkan/LICENSE => gfx/skia/skia/include/third_party/vulkan/LICENSE
rename : gfx/skia/skia/third_party/vulkan/vulkan/vk_platform.h => gfx/skia/skia/include/third_party/vulkan/vulkan/vk_platform.h
rename : gfx/skia/skia/third_party/vulkan/vulkan/vulkan.h => gfx/skia/skia/include/third_party/vulkan/vulkan/vulkan.h
rename : gfx/skia/skia/third_party/vulkan/vulkan/vulkan_android.h => gfx/skia/skia/include/third_party/vulkan/vulkan/vulkan_android.h
rename : gfx/skia/skia/third_party/vulkan/vulkan/vulkan_ios.h => gfx/skia/skia/include/third_party/vulkan/vulkan/vulkan_ios.h
rename : gfx/skia/skia/third_party/vulkan/vulkan/vulkan_macos.h => gfx/skia/skia/include/third_party/vulkan/vulkan/vulkan_macos.h
rename : gfx/skia/skia/third_party/vulkan/vulkan/vulkan_win32.h => gfx/skia/skia/include/third_party/vulkan/vulkan/vulkan_win32.h
rename : gfx/skia/skia/third_party/vulkan/vulkan/vulkan_xcb.h => gfx/skia/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h
rename : gfx/skia/skia/include/core/SkLights.h => gfx/skia/skia/src/shaders/SkLights.h
rename : gfx/skia/skia/src/core/SkMetaData.cpp => gfx/skia/skia/src/utils/SkMetaData.cpp
rename : gfx/skia/skia/include/core/SkMetaData.h => gfx/skia/skia/src/utils/SkMetaData.h
2019-03-26 11:06:25 -04:00
Narcis Beleuzu d20e1695b0 Merge autoland to mozilla-central. a=merge 2019-03-30 23:43:56 +02:00
Markus Stange 2770f087b3 Bug 1479145 - Handle arbitrary strides for WebGL-to-SharedSurface readback on platforms that support it. r=jgilbert
The only platforms that do not support GL_PACK_ROW_LENGTH are platforms with
GLES 2. So on those platforms, trying to read back into buffers whose stride is
not width * 4 will assert.
That's fine because we usually don't encounter buffers with such large strides
on GLES 2 platforms. The only platform that really needs to handle the large
strides is macOS, and it always supports GL_PACK_ROW_LENGTH.
On macOS, we often run into large strides on surfaces that we intend to upload
as textures at some point, because large stride alignments are required for
efficient upload performance on some drivers.

Bug 1540209 tracks fixing the general case.

Differential Revision: https://phabricator.services.mozilla.com/D25464

--HG--
extra : moz-landing-system : lando
2019-03-29 20:18:53 +00:00
Markus Stange baea6b435f Bug 1479145 - Give RGB textures a 32-byte aligned stride on macOS in order to improve texture upload efficiency on certain drivers. r=mattwoodrow
In particular, it looks like this alignment is required by the Intel driver on
macOS if you want to avoid CPU copies.

It was already known that the efficiency gains from client storage only
materialize if you follow certain restrictions:
 - The textures need to use the TEXTURE_RECTANGLE_ARB texture target.
 - The textures' format, internalFormat and type need to be chosen from a small
   list of supported configurations. Unsupported configurations will trigger
   format conversions on the CPU.
 - The GL_TEXTURE_STORAGE_HINT_APPLE may need to be set to shared or cached.
 - glTextureRangeAPPLE may or may not make a difference.

It now appears that the stride alignment is another requirement:

When uploading textures which otherwise comply with the above requirements, the
Intel driver will still make copies using the CPU if the texture's stride is not
32-byte aligned. These CPU copies are reflected in a high CPU usage (as observed
in Activity Monitor) and they show up in profiles as time spent inside
_platform_memmove under glrUpdateTexture.

However, when uploading 32-byte stride aligned textures which comply with the
above requirements, this CPU usage goes away. There might still be hardware
copies behind the scenes, but they no longer take up CPU time.

Differential Revision: https://phabricator.services.mozilla.com/D25316

--HG--
extra : moz-landing-system : lando
2019-03-29 20:11:12 +00:00
Cameron McCormack 7bc808faa6 Bug 1474793 - Part 3: Allow references to static, single-generic C++ SharedFontList objects from Rust FontFamilyList. r=emilio
UA style sheets only ever specify a single generic font family in font-family
properties, so we pre-create a unique, static SharedFontList for each generic
and change the representation of FontFamilyList to be able to refer to them
by their generic ID.  This avoids having to share refcounted SharedFontList
objects across processes.

Depends on D17182

Differential Revision: https://phabricator.services.mozilla.com/D17183

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:51 +00:00
Alex Gaynor 44989b091f Bug 1540190 - replace the AnimationData IPDL union with native Maybe syntax; r=kats
Differential Revision: https://phabricator.services.mozilla.com/D25425

--HG--
extra : moz-landing-system : lando
2019-03-29 19:54:14 +00:00
Noemi Erli cb48453c36 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-30 11:35:28 +02:00
Jeff Gilbert 758e836333 No bug - clang-format -p gfx 2019-03-29 23:41:48 -07:00
Botond Ballo 27b218cb75 Bug 1519007 - Avoid using setAsyncScrollOffset() to scroll out of bounds in tests. r=kats
Depends on D24826

Differential Revision: https://phabricator.services.mozilla.com/D25483

--HG--
extra : moz-landing-system : lando
2019-04-01 15:39:27 +00:00
Botond Ballo 58c5bb6a5a Bug 1519007 - Do not allow APZ to move the layout viewport outside the scrollable rect. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D24826

--HG--
extra : moz-landing-system : lando
2019-03-29 22:00:36 +00:00
Jonathan Kew b9a573d30f Bug 1533448 - Provide a version of gfxSparseBitSet that is better suited to shared-memory use. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22936

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:08 +00:00
Jonathan Kew 9cddae40f3 Bug 1533428 - patch 8 - Move the ReadOtherFamilyNamesForFace helper to gfxFontUtils, for use by shared fontlist code as well as by old gfxFontFamily. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22935

--HG--
extra : moz-landing-system : lando
2019-04-01 14:33:46 +00:00
Jonathan Kew d2a3361fa4 Bug 1533428 - patch 7 - Create a FontFamily type that wraps either a gfxFontFamily pointer or a mozilla::fontlist::Family pointer (to be used by the shared font list), and use this in various places where we need to pass families around. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22934

--HG--
extra : moz-landing-system : lando
2019-04-01 14:33:34 +00:00
Jonathan Kew 5f45afb7ec Bug 1533428 - patch 6 - Consistently use the gfxPlatformFontList::PrefFontList type instead of repeatedly spelling out the array declaration. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22930

--HG--
extra : moz-landing-system : lando
2019-04-01 14:33:16 +00:00
Jonathan Kew 27e809db53 Bug 1533428 - patch 5 - Move the helper functions that measure the 'distance' between values of font properties (weight, stretch, style) to gfxFontUtils.h. r=jwatt
This will allow upcoming shared font-list to use the same helpers as the existing code.

Differential Revision: https://phabricator.services.mozilla.com/D22926

--HG--
extra : moz-landing-system : lando
2019-04-01 14:33:04 +00:00
Jonathan Kew a978a2a32d Bug 1533428 - patch 2 - Move the Orientation enum from gfxFont to nsFontMetrics to enable some #include-elimination, in particular to avoid including gfxTextRun.h in nsFontMetrics.h. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22913

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:19 +00:00
Jonathan Kew c671cf4509 Bug 1533395 - Refactor gfxTextRange struct, moving the MatchType enum to gfxTypes.h as FontMatchType, and the struct inside gfxFontGroup as a local type. r=jwatt
This allows us to reduce #include usage of the massive gfxFont.h header,
and keeps this specialized kind of TextRange struct local to where it's used.

Differential Revision: https://phabricator.services.mozilla.com/D22904

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:06 +00:00
Kartikaya Gupta c80e2408ea Bug 1539684 - Don't let scrollPercent become NaN if maxThumbPos is zero. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D25405

--HG--
extra : moz-landing-system : lando
2019-03-29 15:39:35 +00:00
Emily Toop d75296da81 Bug 1532582 - Display autofill popup in correct location.
This autofill popover was being displayed in the incorrect place because the display rect we were providing to the `AutofillManager` was the rect for the `GeckoView` and not the rect for the HTML element that the autofill popover was relating to.

1. Add view dimensions to info passed to autofill in `GeckoViewAutoFill`.
2. Use those view dimensions to calculate the correct location on the screen using `pageToScreenMatrix` in `GeckoSession`.

The resulting locations were incorrect, as the values used by `pageToScreenMatrix` were out of date. The `GeckoSession` was only notified about updated metrics during first composite, which meant that when the metrics changed during zoom and scroll on soft keyboard presentation, `GeckoSession` was unaware of it.

3. Update `GeckoSession` with new screen metrics when they change and not only during first composite.

Despite this change ensuring that `GeckoSession` always had the correct values for the viewport size and location, the request to provide the autofill location was made before the zoom and scroll was complete, meaning that even then out of date values were used during the calculation. The intial solution was to fire an event once zoom was complete, but despite this event being fired after the new screen size had been calculcated in `AsyncCompositionManager`, `GeckoSession` did not receive the values until after the event had been processed (the calls were out by 0.024ms).

5. Call new method `onScreenMetricsUpdated` inside `SessionTextInput` after screen metrics have been updated. Call `AutofillManager#notifyViewEntered` from this function.

This was not my preferred solution to this, but timing issues meant I could not find/think of an alternative way of delaying the calculation of the autofill popover location until after `GeckoSession` had been updated.

This patch currently fixes things on GV apps. Occasionally, on Fennec, the autofill view is out of alignment slightly. This needs further work.

Differential Revision: https://phabricator.services.mozilla.com/D25406

--HG--
extra : moz-landing-system : lando
2019-03-29 15:25:42 +00:00
Masayuki Nakano de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25338

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Alex Gaynor e845354e42 Bug 1539892 - replace FeatureChange and GPUDeviceStatus IPDL unions with native Maybe syntax; r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D25259

--HG--
extra : moz-landing-system : lando
2019-03-28 21:13:53 +00:00
sotaro 2f9999a07a Bug 1539732 - Release unnecessary GeckoSurfaceTexture resource at RenderCompositorEGL r=jnicol
Bug 1416015 and Bug 1470348 added function calls for CompositorOGL. Similar things needs to be done for RenderCompositorEGL.

Differential Revision: https://phabricator.services.mozilla.com/D25199

--HG--
extra : moz-landing-system : lando
2019-03-29 14:36:05 +00:00
Dorel Luca a91d673cd5 Backed out changeset b6f5942c42bb (bug 1532582) for Eslint failure. CLOSED TREE 2019-03-29 16:37:21 +02:00
Kartikaya Gupta 557527a0b6 Bug 1539953 - Initialize mScrollId to the root scroll id. r=kvark
A spatial id of 0 refers to the root reference frame on the WR side, but
we shouldn't be using that on the Gecko side at all. Due to the
early-exit codepath in ClipManager we were actually sending some display
items with this spatial id over to WebRender. Although this doesn't
appear to cause any user-visible problems it seems wrong and can confuse
debugging other issues.

Differential Revision: https://phabricator.services.mozilla.com/D25296

--HG--
extra : moz-landing-system : lando
2019-03-29 14:13:38 +00:00
Emily Toop 65bf84e5c6 Bug 1532582 - Display autofill popup in correct location. r=geckoview-reviewers,snorp,kats
This autofill popover was being displayed in the incorrect place because the display rect we were providing to the `AutofillManager` was the rect for the `GeckoView` and not the rect for the HTML element that the autofill popover was relating to.

1. Add view dimensions to info passed to autofill in `GeckoViewAutoFill`.
2. Use those view dimensions to calculate the correct location on the screen using `pageToScreenMatrix` in `GeckoSession`.

The resulting locations were incorrect, as the values used by `pageToScreenMatrix` were out of date. The `GeckoSession` was only notified about updated metrics during first composite, which meant that when the metrics changed during zoom and scroll on soft keyboard presentation, `GeckoSession` was unaware of it.

3. Update `GeckoSession` with new screen metrics when they change and not only during first composite.

Despite this change ensuring that `GeckoSession` always had the correct values for the viewport size and location, the request to provide the autofill location was made before the zoom and scroll was complete, meaning that even then out of date values were used during the calculation. The intial solution was to fire an event once zoom was complete, but despite this event being fired after the new screen size had been calculcated in `AsyncCompositionManager`, `GeckoSession` did not receive the values until after the event had been processed (the calls were out by 0.024ms).

5. Call new method `onScreenMetricsUpdated` inside `SessionTextInput` after screen metrics have been updated. Call `AutofillManager#notifyViewEntered` from this function.

This was not my preferred solution to this, but timing issues meant I could not find/think of an alternative way of delaying the calculation of the autofill popover location until after `GeckoSession` had been updated.

This patch currently fixes things on GV apps. Occasionally, on Fennec, the autofill view is out of alignment slightly. This needs further work.

Differential Revision: https://phabricator.services.mozilla.com/D24397

--HG--
extra : moz-landing-system : lando
2019-03-29 12:49:26 +00:00
Dorel Luca 5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano 9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25338

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00
Gurzau Raul fa62ace3f1 Backed out changeset b64006992c1c (bug 1479145) for failing at /client/CanvasClient.cpp on a CLOSED TREE. 2019-03-29 06:16:14 +02:00
Markus Stange 058a2fee49 Bug 1479145 - Give RGB textures a 32-byte aligned stride in order to improve texture upload efficiency on certain drivers. r=mattwoodrow
In particular, it looks like this alignment is required by the Intel driver on
macOS if you want to avoid CPU copies.

It was already known that the efficiency gains from ClientStorage only
materialize if you follow certain restrictions:
 - The textures need to use the TEXTURE_RECTANGLE_ARB texture target.
 - The textures' format, internalFormat and type need to be chosen from a small
   list of supported configurations. Unsupported configurations will trigger
   format conversions on the CPU.
 - The GL_TEXTURE_STORAGE_HINT_APPLE may need to be set to shared or cached.
 - glTextureRangeAPPLE may or may not make a difference.

It now appears that the stride alignment is another requirement:

When uploading textures which otherwise comply with the above requirements, the
Intel driver will still make copies using the CPU if the texture's stride is not
32-byte aligned. These CPU copies are reflected in a high CPU usage (as observed
in Activity Monitor) and they show up in profiles as time spent inside
_platform_memmove under glrUpdateTexture.

However, when uploading 32-byte stride aligned textures which comply with the
above requirements, this CPU usage goes away. There might still be hardware
copies behind the scenes, but they no longer take up CPU time.

Differential Revision: https://phabricator.services.mozilla.com/D25316

--HG--
extra : moz-landing-system : lando
2019-03-29 02:00:03 +00:00
Matt Woodrow 864779b578 Bug 1539306 - Use the current producer/frame id for mask layers, since they never set the previous one. r=mstange
Depends on D25302

Differential Revision: https://phabricator.services.mozilla.com/D25303

--HG--
extra : moz-landing-system : lando
2019-03-28 23:25:10 +00:00