Changeset 36446 in webkit


Ignore:
Timestamp:
Sep 15, 2008 10:10:48 AM (16 years ago)
Author:
Simon Fraser
Message:

2008-09-15 Simon Fraser <Simon Fraser>

Reviewed by Dan Bernstein

Fix assertion and integral pixel issue when creating subimages.
https://bugs.webkit.org/show_bug.cgi?id=20786

  • platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::draw):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r36444 r36446  
     12008-09-15  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Reviewed by Dan Bernstein
     4
     5        Fix assertion and integral pixel issue when creating subimages.
     6        https://bugs.webkit.org/show_bug.cgi?id=20786
     7
     8        * platform/graphics/cg/ImageCG.cpp:
     9        (WebCore::BitmapImage::draw):
     10
    1112008-09-15  Tor Arne Vestbø  <tavestbo@trolltech.com>
    212
  • trunk/WebCore/platform/graphics/cg/ImageCG.cpp

    r36069 r36446  
    164164            image = CGImageCreateWithImageInRect(image, srcRect);
    165165            if (currHeight < srcRect.bottom()) {
    166                 ASSERT(CGImageGetHeight(image) == currHeight - srcRect.y());
    167                 adjustedDestRect.setHeight(destRect.height() / srcRect.height() * (currHeight - srcRect.y()));
     166                ASSERT(CGImageGetHeight(image) == currHeight - CGRectIntegral(srcRect).origin.y);
     167                adjustedDestRect.setHeight(destRect.height() / srcRect.height() * CGImageGetHeight(image));
    168168            }
    169169        } else {
Note: See TracChangeset for help on using the changeset viewer.