mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibWeb: Share decoded images at the Resource level :^)
This patch adds ImageResource as a subclass of Resource. This new class also keeps a Gfx::ImageDecoder so that we can share decoded bitmaps between all clients of an image resource inside LibWeb. With this, we now share both encoded and decoded data for images. :^) I had to change how the purgeable-volatile flag is updated to keep the volatile-images-outside-the-visible-viewport optimization working. HTMLImageElement now inherits from ImageResourceClient (a subclass of ResourceClient with additional image-specific stuff) and informs its ImageResource about whether it's inside the viewport or outside. This is pretty awesome! :^)
This commit is contained in:
parent
1c6e4e04a8
commit
d4ddb0013c
14 changed files with 200 additions and 30 deletions
9
Base/home/anon/www/many-buggies.html
Normal file
9
Base/home/anon/www/many-buggies.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<body>
|
||||
<img src=http://serenityos.org/buggie.png>
|
||||
<img src=http://serenityos.org/buggie.png>
|
||||
<img src=http://serenityos.org/buggie.png>
|
||||
<img src=http://serenityos.org/buggie.png>
|
||||
<img src=http://serenityos.org/buggie.png>
|
||||
</body>
|
||||
</html>
|
|
@ -28,6 +28,7 @@ span#ua {
|
|||
<p>Your user agent is: <b><span id="ua"></span></b></p>
|
||||
<p>Some small test pages:</p>
|
||||
<ul>
|
||||
<li><a href="many.html">many buggies</a></li>
|
||||
<li><a href="palette.html">system palette color css extension</a></li>
|
||||
<li><a href="inline-block-link.html">link inside display: inline-block</a></li>
|
||||
<li><a href="set-interval.html">setInterval() test</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue