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

33078 Коммитов

Автор SHA1 Сообщение Дата
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
Matt Woodrow 6215c48259 Bug 1539306 - Don't transform mask layer invalid regions by the current layer transform, since they are positioned relative to our parent. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D25302

--HG--
extra : moz-landing-system : lando
2019-03-28 23:25:08 +00:00
Botond Ballo 3efeb40684 Bug 1539687 - Error out if a property name is misspelt in a subtest entry. r=kats
Depends on D25176

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

--HG--
extra : moz-landing-system : lando
2019-03-28 11:09:42 +00:00
Kartikaya Gupta 82e8cfa38b Bug 1535029 - Store the render root rect as a ScreenRect. r=dthayer
The main change here is removing some rounding so that we can do more
accurate hit-testing in APZ. Instead of rounding both the rect and the
point, we just store both as unrounded values. mRenderRootRects is also
changed to be of a Screen type as that better reflects what it's being
used for, and there is a legitimate justification for converting it from
LayoutDevice.

Depends on D25239

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

--HG--
extra : moz-landing-system : lando
2019-03-28 16:46:35 +00:00
Kartikaya Gupta bc956607f9 Bug 1535029 - Pass the render root rect over as an unrounded LayoutDeviceRect. r=dthayer
We use a strongly typed LayoutDevice rect because that's the correct
type for this rect. And we defer the rounding to the parent side for
more precise hit-testing (see next patch).

Depends on D25238

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

--HG--
extra : moz-landing-system : lando
2019-03-28 16:45:12 +00:00
Kartikaya Gupta 4f62584409 Bug 1535029 - Change the viewport size passed to TransactionBuilder::SetDisplayList to a wr::LayoutSize. r=dthayer
The receiver of this parameter treats it as a layout size, so it doesn't
make sense for the argument to be a LayerSize partway through the call
chain. Also the callers originally get this from a LayoutDevice rect;
so there's even less reason for this to be turned into a LayerSize. The
next patch will propagate this cleanup more.

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

--HG--
extra : moz-landing-system : lando
2019-03-28 16:38:01 +00:00
Brad Werth 00fe72de86 Bug 1500314 Part 2: Update test expectations. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D24268

--HG--
extra : moz-landing-system : lando
2019-03-27 23:44:09 +00:00
Barret Rennie 6e284e1063 Bug 1444434 - Free the Gecko profiler screenshots structures in the WebRender renderer when profiling stops r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23964

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:49 +00:00
Barret Rennie 0aac558507 Bug 1444434 - Submit screenshots to the Gecko profiler from WebRender r=kvark,mstange
Differential Revision: https://phabricator.services.mozilla.com/D23963

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:40 +00:00
Barret Rennie 6131c4dbab Bug 1444434 - Add C bindings to the Renderer::get_screenshot_async and Renderer::map_and_recycle_screenshot APIs r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23962

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:32 +00:00
Barret Rennie 03468158ba Bug 1444434 - Add infrastructure for reading back screenshots for the Gecko profiler to WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23961

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:25 +00:00
Barret Rennie 98ab12e0e7 Bug 1444434 - Capture screenshots for the Gecko profiler in WebRender r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23960

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:15 +00:00
Barret Rennie a3b16ea535 Bug 1444434 - Optionally create PBOs with a backing buffer and store that size with the PBO r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D23959

--HG--
extra : moz-landing-system : lando
2019-03-28 14:51:08 +00:00