Changeset 88321 in webkit


Ignore:
Timestamp:
Jun 7, 2011 8:31:26 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-07 Ian Henderson <ianh@apple.com>

Reviewed by Dan Bernstein.

(CG) Sub-image drawing clips unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=62258

If destRect completely encompasses the adjustedDestRect into which we
draw, clipping to destRect will do nothing. Skip the call to
CGContextClipToRect in this case.

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88319 r88321  
     12011-06-07  Ian Henderson  <ianh@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        (CG) Sub-image drawing clips unnecessarily
     6        https://bugs.webkit.org/show_bug.cgi?id=62258
     7
     8        If destRect completely encompasses the adjustedDestRect into which we
     9        draw, clipping to destRect will do nothing.  Skip the call to
     10        CGContextClipToRect in this case.
     11
     12        * platform/graphics/cg/ImageCG.cpp:
     13        (WebCore::BitmapImage::draw):
     14
    1152011-06-07  Emil A Eklund  <eae@chromium.org>
    216
  • trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp

    r87598 r88321  
    242242        }
    243243
    244         CGContextClipToRect(context, destRect);
     244        if (!destRect.contains(adjustedDestRect))
     245            CGContextClipToRect(context, destRect);
    245246    }
    246247
Note: See TracChangeset for help on using the changeset viewer.