Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
pagespeed::image_compression::MultipleFramePaddingReader Class Reference

#include "frame_interface_optimizer.h"

Inheritance diagram for pagespeed::image_compression::MultipleFramePaddingReader:
pagespeed::image_compression::MultipleFrameReader

Public Member Functions

 MultipleFramePaddingReader (MultipleFrameReader *reader)
 Takes ownership of reader.
 
virtual ScanlineStatus Reset ()
 Resets the MultipleFrameReader to its initial state.
 
virtual ScanlineStatus Initialize ()
 
virtual bool HasMoreFrames () const
 
virtual bool HasMoreScanlines () const
 
virtual ScanlineStatus PrepareNextFrame ()
 
virtual ScanlineStatus ReadNextScanline (const void **out_scanline_bytes)
 
virtual ScanlineStatus GetFrameSpec (FrameSpec *frame_spec) const
 
virtual ScanlineStatus GetImageSpec (ImageSpec *image_spec) const
 
MessageHandlermessage_handler () const
 
virtual ScanlineStatus set_quirks_mode (QuirksMode quirks_mode)
 
virtual QuirksMode quirks_mode () const
 
- Public Member Functions inherited from pagespeed::image_compression::MultipleFrameReader
 MultipleFrameReader (MessageHandler *handler)
 
ScanlineStatus Initialize (const void *image_buffer, size_t buffer_length)
 
MessageHandlermessage_handler () const
 
bool Reset (ScanlineStatus *status)
 
bool Initialize (const void *image_buffer, size_t buffer_length, ScanlineStatus *status)
 
bool Initialize (ScanlineStatus *status)
 
bool PrepareNextFrame (ScanlineStatus *status)
 
bool ReadNextScanline (const void **out_scanline_bytes, ScanlineStatus *status)
 
bool GetFrameSpec (FrameSpec *frame_spec, ScanlineStatus *status)
 
bool GetImageSpec (ImageSpec *image_spec, ScanlineStatus *status)
 
bool set_quirks_mode (QuirksMode quirks_mode, ScanlineStatus *status)
 

Additional Inherited Members

- Protected Attributes inherited from pagespeed::image_compression::MultipleFrameReader
const void * image_buffer_
 
size_t buffer_length_
 

Detailed Description

This class is an adapter that makes the frame size be the same as the image size, padding the frame with background color pixels.

Member Function Documentation

virtual ScanlineStatus pagespeed::image_compression::MultipleFramePaddingReader::GetFrameSpec ( FrameSpec frame_spec) const
virtual

Assigns to '*frame_spec' the FrameSpec describing the current frame.

Todo:
TODO(vchudnov): Consider simplifying this method to return frame_spec rather than the ScanlineStatus.

Implements pagespeed::image_compression::MultipleFrameReader.

virtual ScanlineStatus pagespeed::image_compression::MultipleFramePaddingReader::GetImageSpec ( ImageSpec image_spec) const
virtual

Copies into '*image_spec' the ImageSpec describing the image.

Implements pagespeed::image_compression::MultipleFrameReader.

virtual bool pagespeed::image_compression::MultipleFramePaddingReader::HasMoreFrames ( ) const
virtual

Returns true iff the image being read has additional frames beyond the current frame being read. For any well-formed image with at least one frame (or for a well-formed static image), this will return true before the first call to PrepareNextFrame().

Implements pagespeed::image_compression::MultipleFrameReader.

virtual bool pagespeed::image_compression::MultipleFramePaddingReader::HasMoreScanlines ( ) const
virtual

Returns true iff the current frame has more scanlines that have not yet been read.

Implements pagespeed::image_compression::MultipleFrameReader.

virtual ScanlineStatus pagespeed::image_compression::MultipleFramePaddingReader::Initialize ( )
virtual

Initializes MultipleFrameReader to read image data of length 'buffer_length_' from 'image_buffer_'. This function should take care of calling Reset() if necessary, so that the sequence "Reset(); Initialize();" is never needed.

Implements pagespeed::image_compression::MultipleFrameReader.

virtual ScanlineStatus pagespeed::image_compression::MultipleFramePaddingReader::PrepareNextFrame ( )
virtual

Prepares to read scanlines from the frame after the current one. Must be called before reading from the first frame.

Implements pagespeed::image_compression::MultipleFrameReader.

virtual ScanlineStatus pagespeed::image_compression::MultipleFramePaddingReader::ReadNextScanline ( const void **  out_scanline_bytes)
virtual

Reads the next available scanline in the current frame and copies a pointer to it into '*out_scanline_bytes'. This class retains ownership of the read scanline. The scanline encodes as many pixels as the width of the current frame, which is not necessarily the width of the whole image.

Implements pagespeed::image_compression::MultipleFrameReader.


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