Changeset 437 for trunk/BAL/WKAL/Concretizations/Graphics/WK/BCImageWK.h
- Timestamp:
- 08/15/08 13:25:16 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/BAL/WKAL/Concretizations/Graphics/WK/BCImageWK.h
r243 r437 70 70 class ImageObserver; 71 71 72 class Image : Noncopyable{72 class Image : public RefCounted<Image> { 73 73 friend class GeneratedImage; 74 74 friend class GraphicsContext; 75 75 public: 76 Image(ImageObserver* = 0);77 76 virtual ~Image(); 78 77 79 static Image* loadPlatformResource(const char* name); 78 static PassRefPtr<Image> create(ImageObserver* = 0); 79 static PassRefPtr<Image> loadPlatformResource(const char* name); 80 80 static bool supportsType(const String&); 81 81 82 82 virtual bool isBitmapImage() const { return false; } 83 83 84 static Image* nullImage(); 84 85 bool isNull() const; 85 86 … … 97 98 bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived); 98 99 virtual bool dataChanged(bool allDataReceived) { return false; } 99 100 // FIXME: PDF/SVG will be underreporting decoded sizes and will be unable to prune because these functions are not 101 // implemented yet for those image types. 102 virtual void destroyDecodedData(bool incremental = false) {}; 103 virtual unsigned decodedSize() const { return 0; } 100 101 virtual void destroyDecodedData(bool incremental = false) = 0; 102 virtual unsigned decodedSize() const = 0; 104 103 105 104 SharedBuffer* data() { return m_data.get(); } … … 138 137 139 138 protected: 139 Image(ImageObserver* = 0); 140 140 141 static void fillWithSolidColor(GraphicsContext* ctxt, const FloatRect& dstRect, const Color& color, CompositeOperator op); 141 142 142 protected:143 143 #if PLATFORM(WIN) 144 144 virtual void drawFrameMatchingSourceSize(GraphicsContext*, const FloatRect& dstRect, const IntSize& srcSize, CompositeOperator) { }
