Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
Match following change in the spec:
https://github.com/whatwg/fetch/commit/8f109835dcff90d19caed4b551a0da32d9d0f57e
|
|
This allows clipping your drawing by any path you like! To do this
all painting has been wrapped around a new draw_clipped() helper
method, which handles the clipping before/after painting.
Note: This clipping is currently missing support for intersecting
clip paths.
|
|
This adds CanvasPathClipper and ScopedCanvasPathClip. These allow
clipping the canvas by some arbitrary path.
This initial implementation is fairly naive, with a good few
allocations, though this can probably be improved in future.
|
|
This is done to be consistent with enclosing_int_rect() which is
used elsewhere to work out offsets in PaintStyles. Without this, you
can get an off-by-one in painting.
|
|
|
|
Since close_all_subpaths() appends while iterating, the vector can
end up being resized and the iterator invalidated. Previously, this
led to a crash/UAF in some cases.
|
|
This is a simple paint style for filling a path with a bitmap.
|
|
|
|
This macro has the usual `TRY` semantics, but instead of returning the
error, it will let the test fail with the formatted error as the fail
message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This ports XHR's fire_progress_event() and request_error_steps() to new
FlyString.
Signature of fire_progress_event() parameter event_name was changed
from 'String const&' to 'FlyString const&'.
|
|
|
|
|
|
|
|
The v2 spec doesn't require it, and it's not true in practice
(e.g. Compact-ICC-Profiles/profiles/sRGB-v2-nano.icc has size 410).
|
|
Prefix code decoding seems to work fairly well and produces a ton of
log output with `#define WEBP_DEBUG 1`, so remove the log lines.
(If needed it's always possible to just locally revert this commit.)
No behavior change, since WEBP_DEBUG isn't usually defined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WebP lossless files that use a color indexing transform with <= 16
colors use pixel bundling to pack 2, 4, or 8 pixels into a single pixel.
If the image's width doesn't happen to be an exact multiple of the
bundling factor, we need to:
1. Use ceil_div() instead of just dividing the width by the bundling
factor
2. Remember the original width and use it instead of computing
reduced width times bundling factor
This does these changes, and adds a simple test for it -- it at least
checks that the decoded images have the right size.
(I created these images myself in Photoshop, and used the same
technique as for Tests/LibGfx/test-inputs/catdog-alert-*.webp
to create images with a certain number of colors.)
|
|
If the video element has a 'controls' attribute, we now paint some basic
video controls over the video element. If no frame has been decoded yet,
we paint a play button on the center of the element.
If a frame has been decoded, we paint that frame and paint a control bar
on the bottom of the frame. This control bar currently only contains a
play/pause button, depending on the video's playback state. We will only
paint the control bar if the video is paused or hovered.
|
|
Because we currently both fetch and process the media data in one chunk,
we have enough data for playback immediately.
|
|
This also includes the HTMLMediaElement's list of pending play promises,
which is coupled pretty tightly with HTMLMediaElement.play.
|
|
|
|
Note that the default value of the attribute is true. We were previously
autoplaying videos as soon as they loaded - this will prevent that from
happening until the paused attribute is set to false.
|
|
|
|
|
|
WebIDL::Promise is aliased to a JS::PromiseCapability. This missing
include would cause a compile error in an upcoming commit.
|
|
See the lengthy comment added in this commit for details.
With this, the webp lossless decoder is feature complete :^)
(...except for bug fixes and performance improvements, as always.)
|
|
...in addition to modifying in-place. This is needed for bitpacking
support for the color indexing transform (and it could also be used
to make the color indexing transform return an indexed bitmap, which
is something we could do if that's the last transform that's applied).
No behavior change.
|
|
|
|
This makes the accidental copy fixed in 2125ccdc19 a compile error.
No behavior change.
|
|
Reduces the time to run
Build/lagom/image ~/src/libwebp/webp_js/test_webp_wasm.webp -o tmp.png
from 0.5s to 0.25s.
Before, 60% of the time was spent decoding webp and 40% writing png.
Now, 16% of the time was spent decoding webp and 84% writing png.
That means png writing takes 0.2s, and webp decoding time went from
0.3s to 0.05s.
A template expression without explicit return type deduces its return
type as if for a function whose return type is declared auto. That
does deduce return-by-value, while `decltype(auto)` would deduce
return-by-reference. Explictly saying `decltype(auto)` would work
too, but writing out the type is maybe easier to understand.
No behavior change other than being much faster.
|
|
The previous attempt was in commit e5e9d3b877c, where I thought
max_symbol describes how many code lengths should be read.
But it looks like it instead describes how many code length input
symbols should be read. (The two aren't the same since one code length
input symbol can produce several code lengths.)
I still agree with the commit description of e5e9d3b877c that the spec
isn't very clear on this :)
This time I've found a file that sets max_symbol and with this change
here, that file decodes correctly. (It's Qpalette.webp, which I'm about
to add as a test case.)
|
|
Doesn't yet implement pixel packing for when the palette has fewer
than 16 colors.
|
|
|