Changeset 166644 in webkit


Ignore:
Timestamp:
Apr 2, 2014 7:37:22 AM (10 years ago)
Author:
Alan Bujtas
Message:

Subpixel rendering: Make GraphicsContext::drawTiledImage* functions float based.
https://bugs.webkit.org/show_bug.cgi?id=131062

Reviewed by Simon Fraser.

This is in preparation to support subpixel positioned/sized background images. Generated images
need to be able to sized on device pixels.

No change in behavior.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):

  • platform/graphics/GraphicsContext.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r166643 r166644  
     12014-04-02  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel rendering: Make GraphicsContext::drawTiledImage* functions float based.
     4        https://bugs.webkit.org/show_bug.cgi?id=131062
     5
     6        Reviewed by Simon Fraser.
     7
     8        This is in preparation to support subpixel positioned/sized background images. Generated images
     9        need to be able to sized on device pixels.
     10
     11        No change in behavior.
     12
     13        * platform/graphics/GraphicsContext.cpp:
     14        (WebCore::GraphicsContext::drawImage):
     15        (WebCore::GraphicsContext::drawTiledImage):
     16        * platform/graphics/GraphicsContext.h:
     17
    1182014-04-02  Alex Christensen  <achristensen@webkit.org>
    219
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp

    r166582 r166644  
    570570}
    571571
    572 void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatPoint& dest, const IntRect& srcRect, CompositeOperator op, ImageOrientationDescription description)
    573 {
    574     drawImage(image, styleColorSpace, FloatRect(dest, srcRect.size()), FloatRect(srcRect), op, description);
     572void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatPoint& dest, const FloatRect& srcRect, CompositeOperator op, ImageOrientationDescription description)
     573{
     574    drawImage(image, styleColorSpace, FloatRect(dest, srcRect.size()), srcRect, op, description);
    575575}
    576576
     
    598598}
    599599
    600 void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize, CompositeOperator op, bool useLowQualityScale, BlendMode blendMode)
     600void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& tileSize, CompositeOperator op, bool useLowQualityScale, BlendMode blendMode)
    601601{
    602602    if (paintingDisabled() || !image)
     
    612612}
    613613
    614 void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect,
     614void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& srcRect,
    615615    const FloatSize& tileScaleFactor, Image::TileRule hRule, Image::TileRule vRule, CompositeOperator op, bool useLowQualityScale)
    616616{
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.h

    r166582 r166644  
    305305        void drawImage(Image*, ColorSpace styleColorSpace, const FloatPoint&, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription());
    306306        void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect&, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false);
    307         void drawImage(Image*, ColorSpace styleColorSpace, const FloatPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription());
     307        void drawImage(Image*, ColorSpace styleColorSpace, const FloatPoint& destPoint, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription());
    308308        void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false);
    309309        void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false);
    310310       
    311         void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize,
     311        void drawTiledImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& tileSize,
    312312            CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false, BlendMode = BlendModeNormal);
    313         void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect,
     313        void drawTiledImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect,
    314314                            const FloatSize& tileScaleFactor, Image::TileRule hRule = Image::StretchTile, Image::TileRule vRule = Image::StretchTile,
    315315                            CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
Note: See TracChangeset for help on using the changeset viewer.