summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/image-decoders/ico/ICOImageDecoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/image-decoders/ico/ICOImageDecoder.h')
-rw-r--r--WebCore/platform/image-decoders/ico/ICOImageDecoder.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/WebCore/platform/image-decoders/ico/ICOImageDecoder.h b/WebCore/platform/image-decoders/ico/ICOImageDecoder.h
index 6117e06..c1f29c9 100644
--- a/WebCore/platform/image-decoders/ico/ICOImageDecoder.h
+++ b/WebCore/platform/image-decoders/ico/ICOImageDecoder.h
@@ -41,6 +41,7 @@ namespace WebCore {
class ICOImageDecoder : public ImageDecoder {
public:
ICOImageDecoder();
+ virtual ~ICOImageDecoder();
// ImageDecoder
virtual String filenameExtension() const { return "ico"; }
@@ -67,19 +68,16 @@ namespace WebCore {
// Returns true if |a| is a preferable icon entry to |b|.
// Larger sizes, or greater bitdepths at the same size, are preferable.
- static bool compareEntries(const IconDirectoryEntry& a,
- const IconDirectoryEntry& b);
+ static bool compareEntries(const IconDirectoryEntry& a, const IconDirectoryEntry& b);
inline uint16_t readUint16(int offset) const
{
- return BMPImageReader::readUint16(m_data.get(),
- m_decodedOffset + offset);
+ return BMPImageReader::readUint16(m_data.get(), m_decodedOffset + offset);
}
inline uint32_t readUint32(int offset) const
{
- return BMPImageReader::readUint32(m_data.get(),
- m_decodedOffset + offset);
+ return BMPImageReader::readUint32(m_data.get(), m_decodedOffset + offset);
}
// If the desired PNGImageDecoder exists, gives it the appropriate data.
@@ -88,12 +86,7 @@ namespace WebCore {
// Decodes the entry at |index|. If |onlySize| is true, stops decoding
// after calculating the image size. If decoding fails but there is no
// more data coming, sets the "decode failure" flag.
- //
- // NOTE: If the desired entry is a PNG, this doesn't actually trigger
- // decoding, it merely ensures the decoder is created and ready to
- // decode. The caller will then call a function on the PNGImageDecoder
- // that actually triggers decoding.
- void decodeWithCheckForDataEnded(size_t index, bool onlySize);
+ void decode(size_t index, bool onlySize);
// Decodes the directory and directory entries at the beginning of the
// data, and initializes members. Returns true if all decoding
@@ -120,9 +113,6 @@ namespace WebCore {
// if the type could be determined.
ImageType imageTypeAtIndex(size_t);
- // True if we've seen all the data.
- bool m_allDataReceived;
-
// An index into |m_data| representing how much we've already decoded.
// Note that this only tracks data _this_ class decodes; once the
// BMPImageReader takes over this will not be updated further.