浏览代码

LibWeb: Decode CSS image values out-of-process as well

Andreas Kling 5 年之前
父节点
当前提交
4c00cae4b9
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      Libraries/LibWeb/CSS/StyleValue.cpp

+ 1 - 5
Libraries/LibWeb/CSS/StyleValue.cpp

@@ -25,7 +25,6 @@
  */
 
 #include <AK/ByteBuffer.h>
-#include <LibGfx/Bitmap.h>
 #include <LibGfx/PNGLoader.h>
 #include <LibGfx/Palette.h>
 #include <LibWeb/CSS/StyleValue.h>
@@ -302,10 +301,7 @@ void ImageStyleValue::resource_did_load()
 {
     if (!m_document)
         return;
-    // FIXME: Use the shared decoder from ImageResource!
-    m_bitmap = Gfx::load_png_from_memory(resource()->encoded_data().data(), resource()->encoded_data().size());
-    if (!m_bitmap)
-        return;
+    m_bitmap = resource()->bitmap();
     // FIXME: Do less than a full repaint if possible?
     if (m_document->frame())
         m_document->frame()->set_needs_display({});