Show
Ignore:
Timestamp:
08/15/08 13:25:16 (5 months ago)
Author:
mbensi
Message:

merge with webkit revision 35774

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/BAL/WKAL/Concretizations/Graphics/WK/BCImageWK.h

    r243 r437  
    7070class ImageObserver; 
    7171 
    72 class Image : Noncopyable
     72class Image : public RefCounted<Image>
    7373    friend class GeneratedImage; 
    7474    friend class GraphicsContext; 
    7575public: 
    76     Image(ImageObserver* = 0); 
    7776    virtual ~Image(); 
    7877     
    79     static Image* loadPlatformResource(const char* name); 
     78    static PassRefPtr<Image> create(ImageObserver* = 0); 
     79    static PassRefPtr<Image> loadPlatformResource(const char* name); 
    8080    static bool supportsType(const String&);  
    8181 
    8282    virtual bool isBitmapImage() const { return false; } 
    83      
     83 
     84    static Image* nullImage(); 
    8485    bool isNull() const; 
    8586 
     
    9798    bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived); 
    9899    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; 
    104103 
    105104    SharedBuffer* data() { return m_data.get(); } 
     
    138137 
    139138protected: 
     139    Image(ImageObserver* = 0); 
     140 
    140141    static void fillWithSolidColor(GraphicsContext* ctxt, const FloatRect& dstRect, const Color& color, CompositeOperator op); 
    141142 
    142 protected: 
    143143#if PLATFORM(WIN) 
    144144    virtual void drawFrameMatchingSourceSize(GraphicsContext*, const FloatRect& dstRect, const IntSize& srcSize, CompositeOperator) { }