webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
WebCore::PNGImageDecoder Class Referencefinal

#include <PNGImageDecoder.h>

Inheritance diagram for WebCore::PNGImageDecoder:
WebCore::ImageDecoder

Public Member Functions

 PNGImageDecoder (AlphaOption, GammaAndColorProfileOption)
 
virtual ~PNGImageDecoder ()
 
String filenameExtension () const override
 
bool isSizeAvailable () override
 
bool setSize (const IntSize &) override
 
ImageFrameframeBufferAtIndex (size_t index) override
 
bool setFailed () override
 
void headerAvailable ()
 
void rowAvailable (unsigned char *rowBuffer, unsigned rowIndex, int interlacePass)
 
void pngComplete ()
 
bool isComplete () const
 
bool isCompleteAtIndex (size_t index)
 
- Public Member Functions inherited from WebCore::ImageDecoder
 ImageDecoder (AlphaOption, GammaAndColorProfileOption)
 
bool isSizeAvailable () const
 
size_t frameCount () const
 
RepetitionCount repetitionCount () const
 
String filenameExtension () const
 
std::optional< IntPointhotSpot () const
 
IntSize frameSizeAtIndex (size_t, SubsamplingLevel=SubsamplingLevel::Default) const
 
bool frameIsCompleteAtIndex (size_t) const
 
ImageOrientation frameOrientationAtIndex (size_t) const
 
float frameDurationAtIndex (size_t) const
 
bool frameHasAlphaAtIndex (size_t) const
 
bool frameAllowSubsamplingAtIndex (size_t) const
 
unsigned frameBytesAtIndex (size_t, SubsamplingLevel=SubsamplingLevel::Default) const
 
NativeImagePtr createFrameImageAtIndex (size_t, SubsamplingLevel=SubsamplingLevel::Default, DecodingMode=DecodingMode::OnDemand) const
 
void setData (SharedBuffer &, bool allDataReceived)
 
bool isAllDataReceived () const
 
void clearFrameBufferCache (size_t)
 
 ImageDecoder ()
 
String filenameExtension () const
 
bool isSizeAvailable () const
 
IntSize size () const
 
size_t frameCount () const
 
RepetitionCount repetitionCount () const
 
std::optional< IntPointhotSpot () const
 
IntSize frameSizeAtIndex (size_t, SubsamplingLevel=SubsamplingLevel::Default) const
 
bool frameIsCompleteAtIndex (size_t) const
 
ImageOrientation frameOrientationAtIndex (size_t) const
 
float frameDurationAtIndex (size_t) const
 
bool frameHasAlphaAtIndex (size_t) const
 
bool frameAllowSubsamplingAtIndex (size_t) const
 
unsigned frameBytesAtIndex (size_t, SubsamplingLevel=SubsamplingLevel::Default) const
 
NativeImagePtr createFrameImageAtIndex (size_t, SubsamplingLevel=SubsamplingLevel::Default, DecodingMode=DecodingMode::OnDemand) const
 
void setData (SharedBuffer &, bool allDataReceived)
 
bool isAllDataReceived () const
 
void clearFrameBufferCache (size_t)
 
void setTargetContext (ID2D1RenderTarget *)
 
 ImageDecoder (AlphaOption alphaOption, GammaAndColorProfileOption gammaAndColorProfileOption)
 
virtual ~ImageDecoder ()
 
bool premultiplyAlpha () const
 
bool isAllDataReceived () const
 
virtual void setData (SharedBuffer &data, bool allDataReceived)
 
virtual IntSize size ()
 
IntSize scaledSize ()
 
virtual IntSize frameSizeAtIndex (size_t, SubsamplingLevel)
 
virtual size_t frameCount () const
 
virtual RepetitionCount repetitionCount () const
 
bool frameIsCompleteAtIndex (size_t)
 
bool frameHasAlphaAtIndex (size_t) const
 
unsigned frameBytesAtIndex (size_t) const
 
float frameDurationAtIndex (size_t)
 
NativeImagePtr createFrameImageAtIndex (size_t, SubsamplingLevel=SubsamplingLevel::Default, DecodingMode=DecodingMode::OnDemand)
 
void setIgnoreGammaAndColorProfile (bool flag)
 
bool ignoresGammaAndColorProfile () const
 
ImageOrientation frameOrientationAtIndex (size_t) const
 
bool frameAllowSubsamplingAtIndex (size_t) const
 
bool failed () const
 
virtual void clearFrameBufferCache (size_t)
 
virtual std::optional< IntPointhotSpot () const
 

Additional Inherited Members

- Public Types inherited from WebCore::ImageDecoder
enum  { iccColorProfileHeaderLength = 128 }
 
- Static Public Member Functions inherited from WebCore::ImageDecoder
static std::unique_ptr< ImageDecodercreate (const SharedBuffer &, AlphaOption alphaOption, GammaAndColorProfileOption gammaAndColorProfileOption)
 
static size_t bytesDecodedToDetermineProperties ()
 
static std::unique_ptr< ImageDecodercreate (const SharedBuffer &, AlphaOption, GammaAndColorProfileOption)
 
static size_t bytesDecodedToDetermineProperties ()
 
static IWICImagingFactory * systemImagingFactory ()
 
static std::unique_ptr< ImageDecodercreate (const SharedBuffer &data, AlphaOption, GammaAndColorProfileOption)
 
static bool rgbColorProfile (const char *profileData, unsigned profileLength)
 
static size_t bytesDecodedToDetermineProperties ()
 
static SubsamplingLevel subsamplingLevelForScale (float, SubsamplingLevel)
 
static bool inputDeviceColorProfile (const char *profileData, unsigned profileLength)
 
- Protected Member Functions inherited from WebCore::ImageDecoder
void prepareScaleDataIfNecessary ()
 
int upperBoundScaledX (int origX, int searchStart=0)
 
int lowerBoundScaledX (int origX, int searchStart=0)
 
int upperBoundScaledY (int origY, int searchStart=0)
 
int lowerBoundScaledY (int origY, int searchStart=0)
 
int scaledY (int origY, int searchStart=0)
 
- Protected Attributes inherited from WebCore::ImageDecoder
bool m_isAllDataReceived { false }
 
RetainPtr< CGImageSourceRefm_nativeDecoder
 
IntSize m_size
 
COMPtr< IWICBitmapDecoder > m_nativeDecoder
 
COMPtr< ID2D1RenderTarget > m_renderTarget
 
RefPtr< SharedBufferm_data
 
Vector< ImageFrame, 1 > m_frameBufferCache
 
bool m_scaled { false }
 
Vector< int > m_scaledColumns
 
Vector< int > m_scaledRows
 
bool m_premultiplyAlpha
 
bool m_ignoreGammaAndColorProfile
 
ImageOrientation m_orientation
 

Constructor & Destructor Documentation

◆ PNGImageDecoder()

WebCore::PNGImageDecoder::PNGImageDecoder ( AlphaOption  alphaOption,
GammaAndColorProfileOption  gammaAndColorProfileOption 
)

◆ ~PNGImageDecoder()

WebCore::PNGImageDecoder::~PNGImageDecoder ( )
virtual

Member Function Documentation

◆ filenameExtension()

String WebCore::PNGImageDecoder::filenameExtension ( ) const
inlineoverridevirtual

Implements WebCore::ImageDecoder.

◆ frameBufferAtIndex()

ImageFrame * WebCore::PNGImageDecoder::frameBufferAtIndex ( size_t  index)
overridevirtual

Implements WebCore::ImageDecoder.

◆ headerAvailable()

void WebCore::PNGImageDecoder::headerAvailable ( )

◆ isComplete()

bool WebCore::PNGImageDecoder::isComplete ( ) const
inline

◆ isCompleteAtIndex()

bool WebCore::PNGImageDecoder::isCompleteAtIndex ( size_t  index)
inline

◆ isSizeAvailable()

bool WebCore::PNGImageDecoder::isSizeAvailable ( )
overridevirtual

Reimplemented from WebCore::ImageDecoder.

◆ pngComplete()

void WebCore::PNGImageDecoder::pngComplete ( )

◆ rowAvailable()

void WebCore::PNGImageDecoder::rowAvailable ( unsigned char *  rowBuffer,
unsigned  rowIndex,
int  interlacePass 
)

◆ setFailed()

bool WebCore::PNGImageDecoder::setFailed ( )
overridevirtual

Reimplemented from WebCore::ImageDecoder.

◆ setSize()

bool WebCore::PNGImageDecoder::setSize ( const IntSize size)
overridevirtual

Reimplemented from WebCore::ImageDecoder.


The documentation for this class was generated from the following files: