mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	We actually include what we use where we use it. This change aims to improve the speed of incremental builds.
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			984 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			984 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 2023-2024, Lucas Chollet <lucas.chollet@serenityos.org>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier: BSD-2-Clause
 | 
						|
 */
 | 
						|
 | 
						|
#pragma once
 | 
						|
 | 
						|
#include <LibGfx/ImageFormats/ImageDecoder.h>
 | 
						|
 | 
						|
namespace Gfx {
 | 
						|
 | 
						|
class JPEGXLLoadingContext;
 | 
						|
 | 
						|
class JPEGXLImageDecoderPlugin : public ImageDecoderPlugin {
 | 
						|
public:
 | 
						|
    static bool sniff(ReadonlyBytes);
 | 
						|
    static ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> create(ReadonlyBytes);
 | 
						|
 | 
						|
    virtual ~JPEGXLImageDecoderPlugin() override;
 | 
						|
 | 
						|
    virtual IntSize size() override;
 | 
						|
    virtual bool is_animated() override;
 | 
						|
    virtual size_t loop_count() override;
 | 
						|
    virtual size_t frame_count() override;
 | 
						|
    virtual size_t first_animated_frame_index() override;
 | 
						|
    virtual ErrorOr<Optional<ReadonlyBytes>> icc_data() override;
 | 
						|
 | 
						|
    virtual ErrorOr<ImageFrameDescriptor> frame(size_t index, Optional<IntSize> ideal_size = {}) override;
 | 
						|
 | 
						|
private:
 | 
						|
    JPEGXLImageDecoderPlugin(OwnPtr<JPEGXLLoadingContext>);
 | 
						|
 | 
						|
    OwnPtr<JPEGXLLoadingContext> m_context;
 | 
						|
};
 | 
						|
 | 
						|
}
 |