Changeset 84321 in webkit


Ignore:
Timestamp:
Apr 19, 2011 5:35:58 PM (13 years ago)
Author:
psolanki@apple.com
Message:

BitmapImage::destroyMetadataAndNotify should clear m_checkedForSolidColor
https://bugs.webkit.org/show_bug.cgi?id=58926

Reviewed by Simon Fraser.

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::destroyMetadataAndNotify): Set m_checkedForSolidColor to false.

  • platform/graphics/BitmapImage.h:

(WebCore::BitmapImage::assertNotSolidColor):

  • platform/graphics/cg/ImageCG.cpp:

(WebCore::Image::drawPattern): Add assert to make sure this is not called for a 1x1 image.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r84320 r84321  
     12011-04-19  Pratik Solanki  <psolanki@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        BitmapImage::destroyMetadataAndNotify should clear m_checkedForSolidColor
     6        https://bugs.webkit.org/show_bug.cgi?id=58926
     7
     8        * platform/graphics/BitmapImage.cpp:
     9        (WebCore::BitmapImage::destroyMetadataAndNotify): Set m_checkedForSolidColor to false.
     10        * platform/graphics/BitmapImage.h:
     11        (WebCore::BitmapImage::assertNotSolidColor):
     12        * platform/graphics/cg/ImageCG.cpp:
     13        (WebCore::Image::drawPattern): Add assert to make sure this is not called for a 1x1 image.
     14
    1152011-04-19  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/Source/WebCore/platform/graphics/BitmapImage.cpp

    r78652 r84321  
    104104{
    105105    m_isSolidColor = false;
     106    m_checkedForSolidColor = false;
    106107    invalidatePlatformData();
    107108
  • trunk/Source/WebCore/platform/graphics/BitmapImage.h

    r84101 r84321  
    160160    bool frameHasAlphaAtIndex(size_t);
    161161
     162#if !ASSERT_DISABLED
     163    bool notSolidColor()
     164    {
     165        return size().width() != 1 || size().height() != 1 || frameCount() > 1;
     166    }
     167#endif
     168
    162169protected:
    163170    enum RepetitionCountStatus {
  • trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp

    r84101 r84321  
    269269        return;
    270270
     271#if !ASSERT_DISABLED
     272    if (this->isBitmapImage())
     273        ASSERT(static_cast<BitmapImage*>(this)->notSolidColor());
     274#endif
     275
    271276    CGContextRef context = ctxt->platformContext();
    272277    ctxt->save();
Note: See TracChangeset for help on using the changeset viewer.