mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-26 07:42:07 +00:00 
			
		
		
		
	 cd7262ee56
			
		
	
	
		cd7262ee56
		
	
	
	
	
		
			
			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.
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			516 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			516 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021-2022, Andreas Kling <kling@serenityos.org>
 | |
|  * Copyright (c) 2022, Dex♪ <dexes.ttp@gmail.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibWeb/Platform/ImageCodecPlugin.h>
 | |
| 
 | |
| namespace Web::Platform {
 | |
| 
 | |
| static ImageCodecPlugin* s_the;
 | |
| 
 | |
| ImageCodecPlugin::~ImageCodecPlugin() = default;
 | |
| 
 | |
| ImageCodecPlugin& ImageCodecPlugin::the()
 | |
| {
 | |
|     VERIFY(s_the);
 | |
|     return *s_the;
 | |
| }
 | |
| 
 | |
| void ImageCodecPlugin::install(ImageCodecPlugin& plugin)
 | |
| {
 | |
|     VERIFY(!s_the);
 | |
|     s_the = &plugin;
 | |
| }
 | |
| 
 | |
| }
 |