Page Speed Optimization Libraries
1.13.35.1
|
#include "scanline_interface_frame_adapter.h"
Public Member Functions | |
ScanlineToFrameWriterAdapter (ScanlineWriterInterface *scanline_writer, MessageHandler *handler) | |
Acquires ownership of 'scanline_writer'. | |
virtual ScanlineStatus | Initialize (const void *config, GoogleString *out) |
virtual ScanlineStatus | PrepareImage (const ImageSpec *image_spec) |
virtual ScanlineStatus | PrepareNextFrame (const FrameSpec *frame_spec) |
virtual ScanlineStatus | WriteNextScanline (const void *scanline_bytes) |
virtual ScanlineStatus | FinalizeWrite () |
Finalizes the image once all the frames have been written. | |
Public Member Functions inherited from pagespeed::image_compression::MultipleFrameWriter | |
MultipleFrameWriter (MessageHandler *handler) | |
MessageHandler * | message_handler () const |
bool | Initialize (const void *config, GoogleString *out, ScanlineStatus *status) |
bool | PrepareImage (const ImageSpec *image_spec, ScanlineStatus *status) |
bool | PrepareNextFrame (const FrameSpec *frame_spec, ScanlineStatus *status) |
bool | WriteNextScanline (const void *scanline_bytes, ScanlineStatus *status) |
bool | FinalizeWrite (ScanlineStatus *status) |
The class ScanlineToFrameWriterAdapter takes ownership of a ScanlineWriterInterface and exposes MultipleFrameWriter methods.
|
virtual |
Initializes the writer to use the format-specific configuration in 'config' to write an image to 'out'. It is up to the client to ensure 'config' points to data of the right type for the given child class it invokes.
Implements pagespeed::image_compression::MultipleFrameWriter.
|
virtual |
Prepares to write an image with the characteristics in 'image_spec'.
Implements pagespeed::image_compression::MultipleFrameWriter.
|
virtual |
Prepares to write scanlines to the frame after the current one by setting its properties to 'frame_spec'. Must be called before writing to the first frame.
Implements pagespeed::image_compression::MultipleFrameWriter.
|
virtual |
Writes 'scanline_bytes' to the next scanline of the current frame. The scanline's width in pixels and pixel format (and thus, its width in bytes) are as set in the preceding call to PrepareNextFrame(); that many bytes from '*scanline_bytes' are read.
Implements pagespeed::image_compression::MultipleFrameWriter.