This converts the fromPointer() calls to an object cast to (hopefully)
avoid the GC crashes. Logic is reversed from MustSkipMarking to
ShouldMark with appropriate renames.
Splitting several parts of `SweepPhase` into constituent parts to
separate out sweeping code from code that handles yielding to the
mutator and resuming.
Remove stuff from /extra/ and the JPEG transcoding file from compilation, as
we don't need them.
A disable define for box decoding is also added, but currently commented out as
there's no need to disable the function right now.
Co-authored-by: Moonchild <moonchild@palemoon.org>
Fixes building on Windows.
I also decided to move the preprocessed jxl/version.h to our include/jxl
instead of relying on moz.build in preprocessing the file. Future me
should note to not forget to update the version number at that new file
Per Issue #2033 we don't support expanding RGB to RGBA yet, so this opacity
check will always return RGBX, which makes images with transparent backgrounds
show up with a black background instead. Feel free to readd once we backport
Mozilla bug 1551088.
Based on Mozilla phab D122159, intended for bug 1709815.
Also moved the temporary RGBA and premultiplication fixes to a macro, since
progressive decoding also needs these fixes.
We have a BGR/RGB channel ordering mismatch here. to at least
provide proper display, a quick&dirty byte swap on the output
buffer will fix this for now, but we should look into seeing where
the surface mismatch is caused.
std::swap() should optimize pretty well in any of the used
compilers, but if necessary, a full buffer ASM routine can be
slotted in (although on current hardware I doubt this will be
even noticeable as it is)
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.
highway upstream added a new header file to be included in highway.h after
0.15.0 it seems, so we have to account for that in moz.build.
Also brought back allowing compiler warnings for libjxl and highway.
Apparently the equivalent of AllowCompilerWarnings() is a bool whose name
is UPPERCASE and uses under_scores instead of CamelCase.
The mp4parse Rust component has been removed in Issue #58. It doesn't seem
like the decoder uses any mp4parse function, so seems like it's safe to
remove it.
Removed const DecoderType named GetType() because we don't have it in our
Decoder.h.
I've decided to abandon the OS_RGBA backporting effort and instead went for
using OS_RGBA's value which is R8G8B8A8. Turns out that there is much more
going on in Mozilla's version of CreateSurfacePipe than I've expected, like
the aInFormat and aOutFormat thing which I really don't want to delve into
right now. Looking at the code it looks like all JPEG-XL images are expected
to have an alpha channel anyway, so I think my workaround should be safe.
I also removed the dependency in OrientedIntSize and used Size() from gfx/2d/
Point.h like our PNG and GIF decoders currently do. Migrating our decoders
to OrientedInt types should be done in another PR instead.
Also also changed the coding style to be closer to UXP's.
Also also also, I made a mistake in Part 1's commit message; the commit used
for libjxl is 192ddd90fdf0c69cd1db1c8d7850db036dd87f4b.
Limits set are minimum 1 entry (0 would mean unlimited so this can't
be used to completely remove the history list from the menu) and maximum
50 which would overflow on most screens anyway. Default remains 15 if
undefined.
Resolves#1925
This is a convenience access function to hasOwnProperty.
Trivial, self-hosted implementation providing the interface to the
already existing hasOwnProperty cpp function with additional toObject
for spec compliance.
Resolves#2256