mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
LibWeb: Decode CSS image values out-of-process as well
This commit is contained in:
parent
805123ab3d
commit
4c00cae4b9
1 changed files with 1 additions and 5 deletions
|
@ -25,7 +25,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/ByteBuffer.h>
|
#include <AK/ByteBuffer.h>
|
||||||
#include <LibGfx/Bitmap.h>
|
|
||||||
#include <LibGfx/PNGLoader.h>
|
#include <LibGfx/PNGLoader.h>
|
||||||
#include <LibGfx/Palette.h>
|
#include <LibGfx/Palette.h>
|
||||||
#include <LibWeb/CSS/StyleValue.h>
|
#include <LibWeb/CSS/StyleValue.h>
|
||||||
|
@ -302,10 +301,7 @@ void ImageStyleValue::resource_did_load()
|
||||||
{
|
{
|
||||||
if (!m_document)
|
if (!m_document)
|
||||||
return;
|
return;
|
||||||
// FIXME: Use the shared decoder from ImageResource!
|
m_bitmap = resource()->bitmap();
|
||||||
m_bitmap = Gfx::load_png_from_memory(resource()->encoded_data().data(), resource()->encoded_data().size());
|
|
||||||
if (!m_bitmap)
|
|
||||||
return;
|
|
||||||
// FIXME: Do less than a full repaint if possible?
|
// FIXME: Do less than a full repaint if possible?
|
||||||
if (m_document->frame())
|
if (m_document->frame())
|
||||||
m_document->frame()->set_needs_display({});
|
m_document->frame()->set_needs_display({});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue