diff options
Diffstat (limited to 'WebCore/platform/image-decoders/ImageDecoder.h')
-rw-r--r-- | WebCore/platform/image-decoders/ImageDecoder.h | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/WebCore/platform/image-decoders/ImageDecoder.h b/WebCore/platform/image-decoders/ImageDecoder.h index 9256afe..57f8735 100644 --- a/WebCore/platform/image-decoders/ImageDecoder.h +++ b/WebCore/platform/image-decoders/ImageDecoder.h @@ -1,6 +1,5 @@ /* * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * Copyright (C) 2008-2009 Torch Mobile, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -141,7 +140,7 @@ namespace WebCore { inline PixelData* getAddr(int x, int y) { -#if PLATFORM(CAIRO) || PLATFORM(WX) || PLATFORM(HAIKU) +#if PLATFORM(CAIRO) || PLATFORM(WX) return m_bytes.data() + (y * width()) + x; #elif (PLATFORM(SKIA) || PLATFORM(SGL)) return m_bitmap.getAddr32(x, y); @@ -167,7 +166,7 @@ namespace WebCore { } } -#if PLATFORM(CAIRO) || PLATFORM(WX) || PLATFORM(HAIKU) +#if PLATFORM(CAIRO) || PLATFORM(WX) Vector<PixelData> m_bytes; IntSize m_size; // The size of the buffer. This should be the // same as ImageDecoder::m_size. @@ -189,17 +188,9 @@ namespace WebCore { // and the base class manages the RGBA32 frame cache. class ImageDecoder { public: - // ENABLE(IMAGE_DECODER_DOWN_SAMPLING) allows image decoders to write directly to - // scaled output buffers by down sampling. Call setMaxNumPixels() to specify the - // biggest size that decoded images can have. Image decoders will deflate those - // images that are bigger than m_maxNumPixels. (Not supported by all image decoders yet) ImageDecoder() : m_failed(false) , m_sizeAvailable(false) -#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) - , m_maxNumPixels(-1) - , m_scaled(false) -#endif { } @@ -281,25 +272,8 @@ namespace WebCore { // since in practice only GIFs will ever use this. virtual void clearFrameBufferCache(size_t clearBeforeFrame) { } -#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) - void setMaxNumPixels(int m) { m_maxNumPixels = m; } -#endif - protected: -#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) - void prepareScaleDataIfNecessary(); - int upperBoundScaledX(int origX, int searchStart = 0); - int lowerBoundScaledX(int origX, int searchStart = 0); - int scaledY(int origY, int searchStart = 0); -#endif - RefPtr<SharedBuffer> m_data; // The encoded data. -#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) - int m_maxNumPixels; - Vector<int> m_scaledColumns; - Vector<int> m_scaledRows; - bool m_scaled; -#endif Vector<RGBA32Buffer> m_frameBufferCache; bool m_failed; |