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

#include <GIFImageDecoder.h>

Inheritance diagram for WebCore::GIFImageDecoder:
WebCore::ImageDecoder

Public Types

enum  GIFQuery { GIFFullQuery, GIFSizeQuery, GIFFrameCountQuery }
 
- Public Types inherited from WebCore::ImageDecoder
enum  { iccColorProfileHeaderLength = 128 }
 

Public Member Functions

 GIFImageDecoder (AlphaOption, GammaAndColorProfileOption)
 
virtual ~GIFImageDecoder ()
 
String filenameExtension () const override
 
void setData (SharedBuffer &data, bool allDataReceived) override
 
bool isSizeAvailable () override
 
bool setSize (const IntSize &) override
 
size_t frameCount () const override
 
RepetitionCount repetitionCount () const override
 
ImageFrameframeBufferAtIndex (size_t index) override
 
bool setFailed () override
 
void clearFrameBufferCache (size_t clearBeforeFrame) override
 
bool haveDecodedRow (unsigned frameIndex, const Vector< unsigned char > &rowBuffer, size_t width, size_t rowNumber, unsigned repeatCount, bool writeTransparentPixels)
 
bool frameComplete (unsigned frameIndex, unsigned frameDuration, ImageFrame::DisposalMethod)
 
void gifComplete ()
 
- 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 IntSize size ()
 
IntSize scaledSize ()
 
virtual IntSize frameSizeAtIndex (size_t, SubsamplingLevel)
 
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 std::optional< IntPointhotSpot () const
 

Additional Inherited Members

- 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
 

Member Enumeration Documentation

◆ GIFQuery

Enumerator
GIFFullQuery 
GIFSizeQuery 
GIFFrameCountQuery 

Constructor & Destructor Documentation

◆ GIFImageDecoder()

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

◆ ~GIFImageDecoder()

WebCore::GIFImageDecoder::~GIFImageDecoder ( )
virtual

Member Function Documentation

◆ clearFrameBufferCache()

void WebCore::GIFImageDecoder::clearFrameBufferCache ( size_t  clearBeforeFrame)
overridevirtual

Reimplemented from WebCore::ImageDecoder.

◆ filenameExtension()

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

Implements WebCore::ImageDecoder.

◆ frameBufferAtIndex()

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

Implements WebCore::ImageDecoder.

◆ frameComplete()

bool WebCore::GIFImageDecoder::frameComplete ( unsigned  frameIndex,
unsigned  frameDuration,
ImageFrame::DisposalMethod  disposalMethod 
)

◆ frameCount()

size_t WebCore::GIFImageDecoder::frameCount ( ) const
overridevirtual

Reimplemented from WebCore::ImageDecoder.

◆ gifComplete()

void WebCore::GIFImageDecoder::gifComplete ( )

◆ haveDecodedRow()

bool WebCore::GIFImageDecoder::haveDecodedRow ( unsigned  frameIndex,
const Vector< unsigned char > &  rowBuffer,
size_t  width,
size_t  rowNumber,
unsigned  repeatCount,
bool  writeTransparentPixels 
)

◆ isSizeAvailable()

bool WebCore::GIFImageDecoder::isSizeAvailable ( )
overridevirtual

Reimplemented from WebCore::ImageDecoder.

◆ repetitionCount()

RepetitionCount WebCore::GIFImageDecoder::repetitionCount ( ) const
overridevirtual

Reimplemented from WebCore::ImageDecoder.

◆ setData()

void WebCore::GIFImageDecoder::setData ( SharedBuffer data,
bool  allDataReceived 
)
overridevirtual

Reimplemented from WebCore::ImageDecoder.

◆ setFailed()

bool WebCore::GIFImageDecoder::setFailed ( )
overridevirtual

Reimplemented from WebCore::ImageDecoder.

◆ setSize()

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

Reimplemented from WebCore::ImageDecoder.


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