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

44613 Коммитов

Автор SHA1 Сообщение Дата
Glenn Watson a7e386d79f Bug 1821233 - Simplify and optimize how prims are pushed to command buffers r=gfx-reviewers,lsalzman
Previously, we would do a fine-grained visibility check for
prims against the dirty rect stack (after coarse grained
tile visibility), then prepare the primitive, then determine
which command buffer(s) the prim should be added to, based
on which tile(s) the prim affects.

The patch changes this so that the fine-grained visibility
check returns a list of command buffer(s) that the prim
should be added to. This is passed to the prim prepare
step, and then used to directly add prims to the buffers
rather than checking which tiles are affected by the prim.

The motivation for doing this will become apparent in
follow up patches. We want to be able to encode
multiple command buffer commands per-prim, whereas it
was previously only possible to encode primitive
commands. By allowing prim-prepare to write directly
to the command buffers, rather than return a list of
primitive commands, we can write whatever commands
are needed. Future patches will use this to write
segment rect streams, and other information.

A side effect of this is that the `tile_rect` field
in the `PrimitiveVisibility` struct is no longer
required. This reduces the size of `PrimitiveInstance`
from 104 bytes to 88 bytes, which is likely to be
a reasonable performance win on pages that have
high primitive counts.

Differential Revision: https://phabricator.services.mozilla.com/D172081
2023-03-19 22:57:54 +00:00
Jonathan Kew c9c9aef089 Bug 1823270 - Rewrite gfxTextRun::SortGlyphRuns to use RemoveElementsBy instead of RemoveElementAt when merging adjacent runs, to minimize array-data shifting. r=gfx-reviewers,lsalzman
In the patches for bug 1823215, we eliminated the use of a local copy of the glyph runs array
during SortGlyphRuns; but we call RemoveElementAt individually for each run to be coalesced,
which means potentially moving all the rest of the array multiple times. Instrumentation shows
that we sometimes end up with dozens of glyphruns to be coalesced (or even hundreds/thousands,
in pathological cases), which becomes quite inefficient.

Using RemoveElementsBy(predicate) instead will minimize the copying/moving of the remaining
array elements.

Differential Revision: https://phabricator.services.mozilla.com/D172945
2023-03-19 18:41:30 +00:00
Jonathan Kew 73d344d188 Bug 1823215 - Use ElementOrArray<T> to simplify the management of glyphrun(s) in gfxTextRun. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D172940
2023-03-19 16:36:06 +00:00
Jonathan Kew 3bdedbad5b Bug 1823215 - Add API to ElementOrArray to support use in gfxTextRun to store the glyph run(s). r=gfx-reviewers,lsalzman
Depends on D172938

Differential Revision: https://phabricator.services.mozilla.com/D172939
2023-03-19 16:36:06 +00:00
Jonathan Kew ce6caaeacf Bug 1823215 - Extract ElementOrArray<T> from CanvasRenderingContext2D into gfxUtils.h so it can also be used elsewhere in gfx/thebes. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D172938
2023-03-19 16:36:05 +00:00
Lee Salzman d9bcef0fa5 Bug 1447839 - Directly calculate endpoint in PathBuilderRecording::Arc. r=jrmuizel,gfx-reviewers
The math for directly calculating the endpoint of the arc is actually trivial,
and ArcToBezier is pretty expensive so should be avoided.

Differential Revision: https://phabricator.services.mozilla.com/D172929
2023-03-19 02:05:23 +00:00
Emanuele Rocca 92da89bf60 Bug 1822827 - Remove explicit NEON flags from skia build r=glandium
While Firefox builds for Android ARMv7 don't support non-NEON
processors, downstreams (including non-Android ones) may still want to
support them.

On the Firefox builds that don't support non-NEON processors, the NEON
flags are actually already passed globally, and they don't need to be
explicitly added. NEON_FLAGS is actually only meant to be used for
sources that specifically need NEON support even when the target doesn't
support it, for, e.g. specialized code behind runtime CPU detection.

So removing NEON_FLAGS is a no-op in practice when NEON processors are
already targeted.

Differential Revision: https://phabricator.services.mozilla.com/D172801
2023-03-17 22:59:50 +00:00
Lee Salzman 94519ca0e5 Bug 1447839 - Avoid creating internal path builder for PathRecording unless necessary. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D172870
2023-03-17 19:04:40 +00:00
Lee Salzman 47c82792d1 Bug 1447839 - Avoid creating internal path for PathRecording unless necessary. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D172869
2023-03-17 19:04:39 +00:00
sotaro b2f1baf7c4 Bug 1812498 - Destroy RenderBufferTextureHosts that use VideoBridgeParent's Shmems in VideoBridgeParent::OnChannelError() r=lsalzman
Destroy RenderBufferTextureHosts that use VideoBridgeParent's Shmems before destroying all VideoBridgeParent's Shmems by PVideoBridgeParent::OnChannelError().

Differential Revision: https://phabricator.services.mozilla.com/D169796
2023-03-17 00:35:03 +00:00
Kelsey Gilbert 25f19106d7 Bug 1822519 - When qcms_profile_from_memory fails, default to sRGB for display space. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D172837
2023-03-16 20:54:52 +00:00
Norisz Fay 4e15bb623b Backed out changeset 6c0c507c2227 (bug 1822325) for causing build bustages CLOSED TREE 2023-03-16 19:09:57 +02:00
pmcmanis 7ba1258eb8 Bug 1822325 - Vendor Glean 52.4.2 r=janerik,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D172797
2023-03-16 16:21:06 +00:00
Tiaan Louw 1da980f4b4 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-16 11:50:55 +00:00
sotaro 5abd63997f Bug 1822459 - Use UniquePtr in mWindowInfos r=gfx-reviewers,ErichDonGubler
With UniquePtr, RenderThread::RemoveRenderer() becomes simpler.

Differential Revision: https://phabricator.services.mozilla.com/D172644
2023-03-16 00:59:19 +00:00
Marian-Vasile Laza b1bb1b3c9b Backed out changeset 160ac6b5f726 (bug 1813481) for assertion failure on nsCSSRenderingGradients.cpp. 2023-03-16 01:50:39 +02:00
Tiaan Louw a7a28cf7a6 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-15 21:10:43 +00:00
Glenn Watson 6e6cfd149f Bug 1822436 - Remove `offset` from WR border-image implementation r=gfx-reviewers,lsalzman
It's not needed, as Gecko incorporates it in to the border-image rect.

Differential Revision: https://phabricator.services.mozilla.com/D172636
2023-03-15 20:51:37 +00:00
Marian-Vasile Laza d9dcca62c0 Backed out changeset 82ff06193160 (bug 1822436) for wr wrench bustages. CLOSED TREE 2023-03-15 22:34:35 +02:00
Glenn Watson 30496845a0 Bug 1822436 - Remove `offset` from WR border-image implementation r=gfx-reviewers,lsalzman
It's not needed, as Gecko incorporates it in to the border-image rect.

Differential Revision: https://phabricator.services.mozilla.com/D172636
2023-03-15 20:01:20 +00:00
Cosmin Sabou 8ed22fcd56 Merge autoland to mozilla-central. a=merge 2023-03-15 18:25:52 +02:00
Ryan VanderMeulen 05af21204b Backed out changeset b5cc339840e6 (bug 1821233) for causing bug 1822548 and bug 1822567. 2023-03-15 11:15:26 -04:00
Jonathan Kew 2ef13f3560 Bug 1815890 - Hold the font-list lock during ToPtr. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D171064
2023-03-15 10:58:47 +00:00
Glenn Watson 363e2e1ebb Bug 1821233 - Simplify and optimize how prims are pushed to command buffers r=gfx-reviewers,lsalzman
Previously, we would do a fine-grained visibility check for
prims against the dirty rect stack (after coarse grained
tile visibility), then prepare the primitive, then determine
which command buffer(s) the prim should be added to, based
on which tile(s) the prim affects.

The patch changes this so that the fine-grained visibility
check returns a list of command buffer(s) that the prim
should be added to. This is passed to the prim prepare
step, and then used to directly add prims to the buffers
rather than checking which tiles are affected by the prim.

The motivation for doing this will become apparent in
follow up patches. We want to be able to encode
multiple command buffer commands per-prim, whereas it
was previously only possible to encode primitive
commands. By allowing prim-prepare to write directly
to the command buffers, rather than return a list of
primitive commands, we can write whatever commands
are needed. Future patches will use this to write
segment rect streams, and other information.

A side effect of this is that the `tile_rect` field
in the `PrimitiveVisibility` struct is no longer
required. This reduces the size of `PrimitiveInstance`
from 104 bytes to 88 bytes, which is likely to be
a reasonable performance win on pages that have
high primitive counts.

Differential Revision: https://phabricator.services.mozilla.com/D172081
2023-03-14 23:02:06 +00:00
Hiroyuki Ikezoe be5af8fe49 Bug 1784772 - Preserve APZEventResult.mHandledResult when we set `eConsumeDoDefault` for the APZEventResult in InputQueue::ReceivePanGestureInput(). r=botond
The `mHandledResult` is set in the ctor of APZEventResult based on an incoming
TargetConfirmationFlags, we shouldn't clobber the original `mHandledResult` when
we set `eConsumeDoDefault` for pan events.

Note that we should probably do the same thing for other
SetStatusAsConsumeDoDefault call sites basically, but for now I'd like to make
this change as mimumum as possible.

Differential Revision: https://phabricator.services.mozilla.com/D172525
2023-03-14 21:01:02 +00:00
Iulian Moraru 801dae8f2c Backed out 14 changesets (bug 1607634, bug 1814683, bug 1815177, bug 1814686) for causing build bustages on MaybeStorageBase. CLOSED TREE
Backed out changeset ae1c0551cea5 (bug 1815177)
Backed out changeset a11cafaa1884 (bug 1814686)
Backed out changeset 621507521762 (bug 1814686)
Backed out changeset ad692c73e381 (bug 1814686)
Backed out changeset 3be031e503dc (bug 1607634)
Backed out changeset aebbaa145d2d (bug 1607634)
Backed out changeset 9aa1f346fe14 (bug 1607634)
Backed out changeset e3eb77ad55ca (bug 1607634)
Backed out changeset e60591e5d5cf (bug 1607634)
Backed out changeset 6e43042d204a (bug 1814683)
Backed out changeset 1706e88652d6 (bug 1814683)
Backed out changeset 6878a1590e91 (bug 1814683)
Backed out changeset b1c980c834d8 (bug 1814683)
Backed out changeset 94480b82d102 (bug 1814683)
2023-03-15 01:58:36 +02:00
Nika Layzell a8e03b0bf5 Bug 1815177 - Use a custom ReadResult to reduce branching during IPDL deserialization, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D169954
2023-03-14 19:31:42 +00:00
Nika Layzell 462fc4e4ee Bug 1607634 - Part 4b: Changes for not-nullable actor types being wrapped in NotNull, r=ipc-reviewers,necko-reviewers,mccr8
These are the code changes required by the IPDL changes in part 4a.

Differential Revision: https://phabricator.services.mozilla.com/D168887
2023-03-14 19:31:40 +00:00
Nika Layzell 97577629c0 Bug 1814683 - Part 1: Combine parent/child fields in IPDL structs/unions, r=ipc-reviewers,necko-reviewers,mccr8
This combines the multiple fields or variants which were previously used to
track sided types like protocol types into a single field wrapped with a
SideVariant.

This will be used in the next part to avoid the need for default constructors
for actor types allowing the proper types to be used.

Differential Revision: https://phabricator.services.mozilla.com/D168879
2023-03-14 19:31:36 +00:00
Andi-Bogdan Postelnicu 61d67443e1 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.5.1-stable (2c8cc34 2023-03-06)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D172587
2023-03-14 16:54:29 +00:00
Chris Martin b42c4425d0 Bug 1816559 - Remote compositor recording from GPU process r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D170514
2023-03-14 13:31:37 +00:00
Chris Martin b23a9763fb Bug 1816559 - Add ability to encode gfx surface as stream or bytes r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D170513
2023-03-14 13:31:37 +00:00
Jonathan Kew 10860fc8ff Bug 1822098 - Inline a bunch of trivial gfxContext accessors and other small methods. r=gfx-reviewers,lsalzman
And sprinkle some extra const around, and remove a few unused bits.

Differential Revision: https://phabricator.services.mozilla.com/D172440
2023-03-13 23:08:03 +00:00
Jonathan Kew f6403db704 Bug 1822018 - Remove gfxContext::mTransform, just use mAzureState.transform directly. r=gfx-reviewers,lsalzman
Depends on D172405

Differential Revision: https://phabricator.services.mozilla.com/D172439
2023-03-13 23:08:02 +00:00
Jonathan Kew e9b404b8b8 Bug 1821935 - Store current state directly in gfxContext, to avoid a separate allocation in the common case where Save/Restore is not used on the context. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D172405
2023-03-13 23:08:02 +00:00
Botond Ballo 1cd16f816d Bug 1821838 - Protect access to mState in AsyncPanZoomController::OnPanEnd() with mRecursiveMutex. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D172468
2023-03-13 21:16:44 +00:00
Otto Länd f63433d7a5 Bug 1799258: apply code formatting via Lando
# ignore-this-changeset
2023-03-13 21:10:21 +00:00
Kelsey Gilbert 4b467818c8 Bug 1799258 - Fix constexpr issue on base toolchain builds. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D171623
2023-03-13 21:04:13 +00:00
Kelsey Gilbert 754f4a89af Bug 1799258 - Share all-of-dcomp.h preamble, and deal with outdated mingw dcomp.h. r=gfx-reviewers,sotaro
Mingw's dcomp.h is not the official one, but rather a by-hand
reproduction. While this newly-updated version has e.g.
IDCompositionFilterEffect, it is still missing e.g.
IDCompositionColorMatrixEffect.

Differential Revision: https://phabricator.services.mozilla.com/D168839
2023-03-13 21:04:12 +00:00
Kelsey Gilbert c1b083b181 Bug 1799258 - Ask dcomp.h to define IDCompositionFilterEffect. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D168325
2023-03-13 21:04:12 +00:00
Kelsey Gilbert 06c8141322 Bug 1799258 - Support outByIn.size()<2 in SampleOutByIn. r=bradwerth
This makes it easier to apply transform functions, even when they are
not defined/present.

Differential Revision: https://phabricator.services.mozilla.com/D167472
2023-03-13 21:04:11 +00:00
Kelsey Gilbert b18204020a Bug 1799258 - No-op equal tfs rather than inverting. r=bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D167471
2023-03-13 21:04:10 +00:00
Kelsey Gilbert 2a633b2502 Bug 1799258 - Do color-management on Windows+DComp via IDCompositionFilterEffects. r=sotaro
+ Add gfx.color_management.rec709_gamma_as_srgb:true. :'(

In particular, rec709(16/255) -> srgb(31/255). Even though it's
technically correct, it's practically-speaking incorrect, since that's
not what Chrome does, nor what the web expected for years and years.

In practice, basically everyone expects gamma to just be completely
ignored.

What people expect:
* Pretend gamut is srgb(==rec709), but stretch this naively for the
  display. If you have a display-p3-gamut display, srgb:0.5 expects to
  be displayed as display:0.5, which will be display-p3:0.5 to the eyes.
* Pretend all content gammas (TFs) are srgb(!=rec790), and then bitcast this
  naively for the display. E.g. rec709(16/255) should
  display the same as srgb(16/255), not srgb(31/255). (Note: display-p3
  uses srgb gamma) But if your display has e.g. gamma=3.0, don't
  convert or compensate.

This is a formalization of what you get when you spend decades ignoring
color management, and people build things based on behavior-in-practice,
not behavior-in-theory.

Also:
+ gfx.color_management.native_srgb:true for Windows, so we don't use the
  display color profile, which no one else does.
+ Add rec2020_gamma_as_rec709, so we have a path towards maybe having
  rec2020 use its correct transfer function, rather than srgb (like
  rec709).

Differential Revision: https://phabricator.services.mozilla.com/D161857
2023-03-13 21:04:10 +00:00
Kelsey Gilbert 000ff9b4e5 Bug 1799258 - Add prereq Colorspaces stuff, including generic gamma->linear LUT inversion approximation. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D163664
2023-03-13 21:04:10 +00:00
Kelsey Gilbert 3bd71468e2 Bug 1799258 - [qcms] Add query for profile data and lut tables. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D163663
2023-03-13 21:04:09 +00:00
Butkovits Atila 34681f7f63 Backed out 3 changesets (bug 1822098, bug 1821935, bug 1822018) for causing bustages at gfxContext.h. CLOSED TREE
Backed out changeset 689b845c477e (bug 1822098)
Backed out changeset 826643e43e2c (bug 1822018)
Backed out changeset 5b0011efcb58 (bug 1821935)
2023-03-13 22:32:13 +02:00
Jonathan Kew b6a94cd33d Bug 1822098 - Inline a bunch of trivial gfxContext accessors and other small methods. r=gfx-reviewers,lsalzman
And sprinkle some extra const around, and remove a few unused bits.

Differential Revision: https://phabricator.services.mozilla.com/D172440
2023-03-13 18:17:06 +00:00
Jonathan Kew bacaf70932 Bug 1822018 - Remove gfxContext::mTransform, just use mAzureState.transform directly. r=gfx-reviewers,lsalzman
Depends on D172405

Differential Revision: https://phabricator.services.mozilla.com/D172439
2023-03-13 18:17:06 +00:00
Jonathan Kew f445aa695e Bug 1821935 - Store current state directly in gfxContext, to avoid a separate allocation in the common case where Save/Restore is not used on the context. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D172405
2023-03-13 18:17:05 +00:00
Robert Longson b4c3f44799 Bug 1820752 - Factor out webrender bounds assessment into its own function and avoid bounds checking if there's an active preceding sibling r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171854
2023-03-13 17:02:06 +00:00