Commit graph

239 commits

Author SHA1 Message Date
Moonchild
ef5f052d97 Issue #2657 - Remove -moz-samplesize resize-decoding for low-vram mobiles
Resolves #2657
2024-11-21 21:08:24 +08:00
Moonchild
8d536c0cc7 Issue #2646 - Parse "variations" keywords.
Resolves #2646
2024-10-31 21:47:14 +08:00
Nia Alarie
a023a81fef Fix loading libGL on NetBSD
The unversioned libGL is preferred on OpenBSD and NetBSD because
both (a) always install it (b) have forks of X11 with different
ABI versions.  However, many Linux distributions do not ship
unversioned .so symlinks unless you install -dev packages.

Unfortunately also needs to be fixed in ANGLE which has the same
problem.
2024-08-05 10:39:06 +08:00
Moonchild
5c509ea6ce Issue #1925 - Replace RectCorner with Corner. 2024-08-05 10:38:49 +08:00
Moonchild
c096b46278 Issue #1925 - Convert NS_SIDE_TO_HALF_CORNER to a constexpr function. 2024-08-05 10:38:32 +08:00
Moonchild
2a399b60a1 Issue #1925 - Convert NS_SIDE_TO_FULL_CORNER to a constexpr function. 2024-08-05 10:38:17 +08:00
Moonchild
b0b13b8719 Issue #1925 - Convert NS_SIDE_IS_VERTICAL to a constexpr function. 2024-08-05 10:38:00 +08:00
Moonchild
8a2bc8ef4d Issue #1925 - Convert NS_FULL_TO_HALF_CORNER to a constexpr function.
Note: Because the new function checks types, we need to change the
fullCorner type in `nsComputedDOMStyle::GetEllipseRadii()` and
`StyleAnimationValue::ExtractComputedValue()` to `Corner` instead of the
underlying base type.
2024-08-05 10:35:50 +08:00
Moonchild
31badb0f2e Issue #1925 - Convert NS_HALF_TO_FULL_CORNER to a constexpr function. 2024-08-05 10:35:29 +08:00
Moonchild
f507d2cdbc Issue #1925 - Convert NS_HALF_CORNER_IS_X to a constexpr function. 2024-08-05 10:35:13 +08:00
Moonchild
1730199755 Issue #1925 - Move NS_FOR_CSS_HALF_CORNER to gfx/2d/Types.h and rewrite it. 2024-08-05 10:34:47 +08:00
Moonchild
8dc8875db6 Issue #1925 - Convert half-corner index macros to an enum. 2024-08-05 10:34:31 +08:00
Moonchild
d73f8c2e84 Issue #1925 - Remove use of NS_CORNER_{TOP|BOTTOM}_{LEFT|RIGHT} macros. 2024-08-05 10:34:15 +08:00
Moonchild
0a7f42b452 Issue #1925 - Rewrite NS_FOR_CSS_CORNERS to be similar to *_SIDES
- Renames it to NS_CSS_FULL_CORNERS and uses the one macro for all full
  corners. In preparation for giving half corners the same treatment.
- Swaps to prefix operator++
2024-08-05 10:33:54 +08:00
Moonchild
b3a51c2711 Issue #1925 - Move Corner enum from mozilla::css to mozilla namespace. 2024-08-05 10:33:38 +08:00
Moonchild
bdb12f10e3 Issue #1925 - Move NS_FOR_CSS_CORNERS and enum to gfx/2d/Types.h. 2024-08-05 10:32:40 +08:00
Moonchild
3a153f32e3 Issue #1925 - Change Side's operator++ from postfix to prefix.
The postfix operator++ was actually incorrectly implemented (the
implementation is a prefix version). Since it's only used in the adjacent
macro, there's no risk with this change to correct that.
2024-08-05 10:32:24 +08:00
Moonchild
ec7351a5d4 Issue #1925 - Remove use of NS_SIDE_* macros. 2024-08-05 10:31:46 +08:00
Moonchild
e6e2796541 Issue #1925 - Remove mozilla::css::Side typedef. 2024-08-05 10:30:50 +08:00
Moonchild
5b0921df6e Issue #1925 - Move NS_FOR_CSS_SIDES and operator++ to gfx/2d/Types.h 2024-08-05 10:30:33 +08:00
Richard-Rogalski
b73f500c04 PR #2530 - Fix altivec code, fix building for PPC
Altivec code was previously uncompilable, and the altivec accelerations
also could not be disabled with a build flag or env variable, leading
to pale moon not being buildable on any altivec supported CPU ( all
PPC CPUs ever almost ). Why? I don't know, 'inline' in C is cursed
and making it static makes it significantly less so.

Closes: https://forum.palemoon.org/viewtopic.php?f=5&t=31108&p=252462#p252462
Signed-off-by: Richard Rogalski <rrogalski@firemail.cc>
2024-06-17 16:10:19 +08:00
Moonchild
7d2ecc13dd [gfx] Use calloc for cairo font-creation functions. 2024-05-22 15:22:50 +08:00
Moonchild
7672f932f7 [gfx] Ensure font entry's unitsPerEm and font extents are initialized when gfxFont is created. 2024-05-22 15:22:23 +08:00
Moonchild
552cd74b08 [gfx] Clear mSharedBlobData if blob creation failed. 2024-05-22 15:21:23 +08:00
Moonchild
9b6c2f36f1 [gfx] Pull several OTS fixes from upstream to improve data safety.
- Don't check STAT designAxisSize if the designAxisCount is zero.
- Avoid potential arithmetic overflow during Buffer read operations.
- Use more careful range checks in STAT parsing.
2024-04-19 09:35:17 +08:00
Moonchild
07cc276a10 Issue #2470 - Check for failure of getting IDXGIKeyedMutex. 2024-04-16 14:52:01 +08:00
Andy
0d07d4377a Issue #2492 - Don't Assume System Font for Emojis with Suffixes
A few dozen Emojis use otherwise general font characters in the lower codepages.
Luckily, the Emoji codepages always include either a VS16 or KeyCap suffix.
2024-04-02 22:55:06 +08:00
Andy
69f3b4e199 Issue #2492 - Standardized use of Emoji Character Properties
Detection of Emoji Components, for use as suffixes of TextDefault.
Detection of Non-Presentation Emojis as TextDefault.
Detection of all Extended Pictographics as EmojiDefault.
2024-04-02 22:54:46 +08:00
FranklinDM
4bf43b8fb4 Issue #2488 - Part 3: Remove the StyleSetHandle smart pointer class 2024-04-02 22:49:48 +08:00
FranklinDM
656ee639c5 Issue #2112 - Part 1: Remove Stylo tests 2024-04-02 22:29:48 +08:00
Moonchild
6d1bf36717 Issue #2465 - Do not use our in-tree metrics hints if using system-cairo
Use a somewhat equivalent font-options instance when using the
system-supplied cairo lib, instead of our in-tree extension.

Resolves #2465
2024-02-08 14:30:30 +08:00
Geoff Lang
580e04c8a8 [gfx] Cherry-pick chromium:1864587 2024-01-25 12:12:43 +08:00
trav90
48698abb77 Issue #2393 - Part 8 - Fix TextureClient-creating functions 2023-11-30 10:03:54 +08:00
trav90
04f124b105 Issue #2393 - Part 5 - Extract D3D11MTAutoEnter and reuse 2023-11-30 09:53:54 +08:00
trav90
74a22e5c00 Issue #2393 - Part 2 - Add D3D11YCbCrImage type and related methods
Will allow to directly upload a YUV420 buffer into a D3D11 texture.
2023-11-30 09:52:46 +08:00
trav90
1fc1753d4d Issue #2393 - Part 1 - Allow client side uploads on Intel hardware 2023-11-30 09:52:28 +08:00
Moonchild
0db18745f4 Issue #2364 - Limit the growth of scaling for animated nsDisplayTransform in the fallback case.
This ensures we don't scale the underlying size of the layer beyond what
is close to the current display size. When box shadows get much larger
than this, they start taking so much time to render that successive
frames grow in scale too fast for any inter-frame reuse to be possible.

With this, we avoid that and no longer get crushed by re-rendering
gigantic box shadows every single frame.

See BZ 1383825
2023-11-04 11:41:44 +08:00
Moonchild
d4cdecec81 Add Min() and Max() convenience functions for 2d point types.
This will return (min(x1,x2), min(y1,y2)) and equivalent max from 2
passed-in (x1,y1) (x2,y2) points
2023-11-04 11:41:21 +08:00
Moonchild
3bdb386b6e Fix a bug in SizeTyped templating
A second template parameter 'F' was previously added to SizeTyped, but
was not correspondingly added to the argument passed for the 'Sub'
parameter of BaseSize.
2023-11-04 11:40:55 +08:00
Moonchild
f1ccc95daf Issue #2364 - Only use HWA AlphaBoxBlur when targets are large enough.
There's considerable cost associated with creating HWA draw targets
which would negate and regress the performance won by it if used for
too small targets (like small spans of text).
This only uses HWA if >= 8K SurfaceAllocationSize to balance HWA draw
target cost with box blur cost.
2023-11-04 11:40:33 +08:00
Moonchild
3f618a55dc Issue #2364 - Optimize the software-based box blur implementation. 2023-11-04 11:40:15 +08:00
Moonchild
4beb3b947c Issue #2364 - use DrawTarget::DrawSurfaceWithShadow to render box shadows on platforms that accelerate it. 2023-11-04 11:40:00 +08:00
Moonchild
8d30faf95f Issue #2364 - Re-factor AlphaBoxBlur
Only blur one quadrant of a box-shadow and mirror it to the other quadrants.
This applies only if the corners are symmetrical (square corners or equal
corner radii) otherwise we'll fall back to the old method.
2023-11-04 11:39:45 +08:00
Moonchild
e4d635f889 [WebGL] Add preffed limit to WebGL vertCount
Defaults to 30M, working around driver bugs (looking at you, Mesa)
2023-10-26 10:53:11 +08:00
Jeremy Andrews
9982ceb94f Issue #2357 - Paused WebM videos w/alpha are 100% transparent if HA is disabled.
Mozilla found a bug in their initial implementation, causing paused WebM videos with alpha to become totally transparent if hardware acceleration is disabled. Straight port of the Firefox 54 fix.

Ref: BZ 1332952
2023-10-26 10:49:41 +08:00
Jeremy Andrews
c0ba3a8d2e Issue #2357 - VPXDecoder does not decode alpha frames.
Another requirement to have transparency in videos. Straight port of Firefox 53 implementation, save for some oddities relating to needing to put uint8_t instead of uint8 in yuv_convert to get this to compile.

Ref: BZ 1321076, 1329104
2023-10-26 10:49:23 +08:00
Matheus Marinho
9e7d1492e6 Issue #2301 - Make Gecko Media Plugins optional when not building EME or WebRTC
Co-authored-by: Moonchild <moonchild@palemoon.org>
2023-09-14 10:22:47 +08:00
Moonchild
56c53b3b8f [gfx] Check if we have a valid texture before trying to delete it. 2023-08-31 22:43:18 +08:00
Moonchild
7f87cc1276 Issue #1769 - Follow-up: Default-enable JPEG-XL images if built
Sets the pref default to true and also add conneg entry for images
if jxl support is built.
Additionally, ifdefs the GfxPref to only observe when jxl is built.
2023-06-24 12:19:10 +08:00
Job Bautista
51ea0e4f3a Issue #1769 - Part 2: Implement JPEG-XL decoder and about:config and MIME plumbing.
Backported from Mozilla bug 1707590 whereever possible.
2023-06-24 12:16:27 +08:00