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

9801 Коммитов

Автор SHA1 Сообщение Дата
stransky 579b6fd6ed Bug 1823333 [VAAPI] Fix FEATURE_HW_DECODED_VIDEO_ZERO_COPY handling as it's allowlisted feature r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D173573
2023-03-27 07:37:20 +00:00
Andi-Bogdan Postelnicu 4efa1bd0ba Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-27 07:20:25 +00:00
Sandor Molnar 9db345d4c1 Backed out 2 changesets (bug 1276351) for causing build bustage in image/ClippedImage.cp CLOSED TREE
Backed out changeset e84598eb82c1 (bug 1276351)
Backed out changeset e940b0554484 (bug 1276351)
2023-03-25 14:16:43 +02:00
Jonathan Kew 6ab0ea8aa6 Bug 1823365 - Clean up management of missing-glyph atlas. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D173360
2023-03-25 09:42:48 +00:00
Andi-Bogdan Postelnicu 447f1e3358 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-25 06:58:52 +00:00
Iulian Moraru 6d40eee997 Backed out 2 changesets (bug 1276351) for causing multiple failures.
Backed out changeset eeaf4f1e06af (bug 1276351)
Backed out changeset d44cb5704342 (bug 1276351)
2023-03-25 00:08:24 +02:00
Andi-Bogdan Postelnicu a1b827b503 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-24 18:55:39 +00:00
stransky 0bd628961c Bug 1824335 [VAAPI] Add preference to force enable zero copy video playback r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173519
2023-03-24 11:15:52 +00:00
Jonathan Kew c96601cb34 Bug 376129 - Scale the missing-glyph hex digits more usefully for large font sizes. r=gfx-reviewers,lsalzman
This makes the digits scale up to better fill the box, as it looks a bit odd to have
the box grow with the font size but the digits remain tiny in the middle of it.

One thing that may look a little odd with this version is that 6-digit hexboxes tend
to get smaller digits than 4-digit ones with large font sizes. But I think that's
OK; it allows the 4-digit chars to be more readable, and 6-digit (non-BMP) ones are
generally much rarer.

(And the whole thing is basically cosmetic anyhow; this isn't about rendering web
content as intended, but trying to provide a bit of useful information when the
content is somehow broken or not renderable.)

Differential Revision: https://phabricator.services.mozilla.com/D173463
2023-03-24 09:07:04 +00:00
serge-sans-paille 97144c5a94 Bug 1824070 - Make gfx/thebes buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D173397
2023-03-24 07:01:08 +00:00
Sandor Molnar 39587cae6b Backed out 3 changesets (bug 1820066) for causing xpc failures in widget/headless/tests/test_headless.js CLOSED TREE
Backed out changeset 501d93d8c9eb (bug 1820066)
Backed out changeset ec623d25b138 (bug 1820066)
Backed out changeset c34dfd018abb (bug 1820066)
2023-03-22 22:54:53 +02:00
Ray Kraesig 640df4416e Bug 1820066 [3/3] - Default to DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL on Win10+ r=sotaro
This silences a warning emitted by the D3D11 debug layer.

Conveniently, it also suppresses bug 1763981.

Differential Revision: https://phabricator.services.mozilla.com/D171522
2023-03-22 15:09:24 +00:00
Emilio Cobos Álvarez 471df3eab7 Bug 1821131 - Make font visibility part of the fontconfig substitution cache key. r=jfkthame
This is one possible option, the other one is to just cache the
substitute results.

Differential Revision: https://phabricator.services.mozilla.com/D172578
2023-03-22 13:11:25 +00:00
Andi-Bogdan Postelnicu 10f49d4180 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 11:35:33 +00:00
Stanca Serban e31a178029 Backed out 7 changesets (bug 1660405) for causing bustages on Linux x64 opt. CLOSED TREE
Backed out changeset ad1a5f59214f (bug 1660405)
Backed out changeset a39e95f0aafe (bug 1660405)
Backed out changeset 48629ee0d70d (bug 1660405)
Backed out changeset 8419b99aab60 (bug 1660405)
Backed out changeset 535cc12c8bed (bug 1660405)
Backed out changeset e27052da4927 (bug 1660405)
Backed out changeset 11b0f9cf8091 (bug 1660405)
2023-03-22 13:05:53 +02:00
Andi-Bogdan Postelnicu a5d28acdd6 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 09:27:56 +00:00
Jonathan Kew b69e6563fc Bug 1823644 - Optimize textrun initialization by merging SanitizeGlyphRuns and SortGlyphRuns. r=gfx-reviewers,lsalzman
No change in behavior, just a marginal optimization when creating large/complex textruns.

Differential Revision: https://phabricator.services.mozilla.com/D173140
2023-03-21 18:44:12 +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
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
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
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
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
Otto Länd f63433d7a5 Bug 1799258: apply code formatting via Lando
# ignore-this-changeset
2023-03-13 21:10:21 +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 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
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
Jonathan Kew 4d44c5aa6d Bug 1820988 - Templatize the 8- and 16-bit versions of gfxFontGroup::MakeTextRun for convenience. r=gfx-reviewers,aosmond
No functional change, just a drive-by cleanup noticed when looking over the text-rendering APIs.

Differential Revision: https://phabricator.services.mozilla.com/D171984
2023-03-09 12:48:42 +00:00
Emilio Cobos Álvarez 48efee8e29 Bug 1820280 - Don't proxy some principal destruction to the main thread. r=dshin
Drive-by, but nsIPrincipal is thread-safe now.

Differential Revision: https://phabricator.services.mozilla.com/D171642
2023-03-09 10:22:35 +00:00
stransky b3b9bd67b2 Bug 1802844 [Linux] Configure FEATURE_HW_DECODED_VIDEO_ZERO_COPY on Linux r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171553
2023-03-09 08:57:41 +00:00
Norisz Fay d51def9e85 Backed out changeset 6fdd0782eb8d (bug 1820988) for causing build bustage CLOSED TREE 2023-03-08 23:11:46 +02:00
Jonathan Kew b5e33edcbb Bug 1820988 - Templatize the 8- and 16-bit versions of gfxFontGroup::MakeTextRun for convenience. r=gfx-reviewers,aosmond
No functional change, just a drive-by cleanup noticed when looking over the text-rendering APIs.

Differential Revision: https://phabricator.services.mozilla.com/D171984
2023-03-08 18:28:07 +00:00
Tiaan Louw c8476cb106 Bug 1817641 - Convert RGBA to AbsoluteColor for computed/animated/resolved CSS colors r=emilio
Computed color values will not be in the correct format, closer to the
one specified by the author.  This also means that colors accross the
code are stored now as AbsoluteColor or StyleAbsoluteColor.  This allows
color space/gamut information to be available for use.

Some animation related test failures had to be changed, because colors
now has greater precision.  Animated a color now causes a lot more
animation updates, which was not initially expected.  See the bug for
discussion.

Differential Revision: https://phabricator.services.mozilla.com/D171021
2023-03-07 11:28:15 +00:00
sotaro 592d27074f Bug 1817674 - Change RDDProcess shutdown from XPCOMShutdown event to gfxPlatform::ShutdownLayersIPC() r=KrisWright,gfx-reviewers,lsalzman
There was a case that RDD process was shut down during WebRender rendering. It happens by RDDProcess shutdown during XPCOMShutdown event. In this case, there could be a widget that nsBaseWidget::Shutdown() has not yet been called.

RDD process must be shutdown after all nsBaseWidget::Shutdown()s are called. gfxPlatform::ShutdownLayersIPC() is called immediately after XPCOMShutdown event in ShutdownXPCOM(). Then the ShutdownLayersIPC() is a good place to handle RDDProcess shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D171313
2023-03-05 08:47:22 +00:00
Lee Salzman 620b4abe8f Bug 1777849 - Require HW-WR for Accelerated Canvas2D. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D171638
2023-03-05 03:11:08 +00:00
Cosmin Sabou 2057febcbf Backed out changeset e51a9dda4b96 (bug 1817674) for causing asan failures in __pthread_mutex_lock. 2023-03-03 02:39:51 +02:00
sotaro 04266eba2f Bug 1817674 - Change RDDProcess shutdown from XPCOMShutdown event to gfxPlatform::ShutdownLayersIPC() r=KrisWright,gfx-reviewers,lsalzman
There was a case that RDD process was shut down during WebRender rendering. It happens by RDDProcess shutdown during XPCOMShutdown event. In this case, there could be a widget that nsBaseWidget::Shutdown() has not yet been called.

RDD process must be shutdown after all nsBaseWidget::Shutdown()s are called. gfxPlatform::ShutdownLayersIPC() is called immediately after XPCOMShutdown event in ShutdownXPCOM(). Then the ShutdownLayersIPC() is a good place to handle RDDProcess shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D171313
2023-03-02 22:22:58 +00:00
Makoto Kato 051c921a72 Bug 1813573 - Part 2. Restart vsync when refresh rate is changed. r=geckoview-reviewers,owlish
When refresh rate is changed, `DisplayListener` is called. So we restart vsync
when refresh rate may be changed.

Differential Revision: https://phabricator.services.mozilla.com/D168666
2023-03-01 03:12:32 +00:00
Makoto Kato 9aca857df0 Bug 1813573 - Part 1. Clean up AndroidVsyncSource to get current refresh rate when enabling vsync. r=geckoview-reviewers,owlish
Newer Android supports multiple refresh rate that is dynamically changed.
Actually, GeckoView will always pass the refresh rate value to vsync when
getting it first time.

So this fix changes that GeckoView gets the refresh rate when vsync is started.

Differential Revision: https://phabricator.services.mozilla.com/D168665
2023-03-01 03:12:31 +00:00
Sandor Molnar c7778b99c0 Backed out changeset 1c6351a80663 (bug 1819097) for causing macOS bc failures in security/sandbox/test/browser_bug1393259.js CLOSED TREE 2023-02-28 19:07:51 +02:00
Jonathan Kew 988a2a4cab Bug 1819097 - Avoid repeating InitFontList due to RegisteredFontsChanged notification during startup on macOS. r=gfx-reviewers,lsalzman
During font-list initialization, we call Core Text to "activate" the supplemental language fonts,
and potentially any bundled fonts shipped with the app. But this generates an OS notification,
which if we process it will cause a redundant rebuild of our list. So to avoid this, set a flag
when we activate the fonts, telling us that the upcoming notification can be ignored.

Differential Revision: https://phabricator.services.mozilla.com/D171205
2023-02-28 10:36:59 +00:00