mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:38:12 +00:00
LibWeb+LibWebView+WebContent: Add Web::Platform::ImageCodecPlugin
This replaces the previous Web::ImageDecoding::Decoder interface. While we're doing this, also move the SerenityOS implementation of this interface from LibWebView to WebContent. That means we no longer have to link with LibImageDecoderClient in applications that use a web view.
This commit is contained in:
parent
412b2313f3
commit
cd7262ee56
14 changed files with 95 additions and 113 deletions
|
@ -12,9 +12,9 @@
|
|||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLLinkElement.h>
|
||||
#include <LibWeb/ImageDecoding.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Platform/ImageCodecPlugin.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -156,7 +156,7 @@ bool HTMLLinkElement::load_favicon_and_use_if_window_is_active()
|
|||
return false;
|
||||
|
||||
RefPtr<Gfx::Bitmap> favicon_bitmap;
|
||||
auto decoded_image = Web::ImageDecoding::Decoder::the().decode_image(resource()->encoded_data());
|
||||
auto decoded_image = Platform::ImageCodecPlugin::the().decode_image(resource()->encoded_data());
|
||||
if (!decoded_image.has_value() || decoded_image->frames.is_empty()) {
|
||||
dbgln("Could not decode favicon {}", resource()->url());
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue