From 643ca7872b450ea4efacab6188849e5aac2ba161 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 15 Dec 2009 10:12:09 +0000 Subject: Merge webkit.org at r51976 : Initial merge by git. Change-Id: Ib0e7e2f0fb4bee5a186610272edf3186f0986b43 --- WebCore/platform/graphics/Image.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'WebCore/platform/graphics/Image.cpp') diff --git a/WebCore/platform/graphics/Image.cpp b/WebCore/platform/graphics/Image.cpp index 80b5457..611216a 100644 --- a/WebCore/platform/graphics/Image.cpp +++ b/WebCore/platform/graphics/Image.cpp @@ -75,14 +75,14 @@ bool Image::setData(PassRefPtr data, bool allDataReceived) return dataChanged(allDataReceived); } -void Image::fillWithSolidColor(GraphicsContext* ctxt, const FloatRect& dstRect, const Color& color, CompositeOperator op) +void Image::fillWithSolidColor(GraphicsContext* ctxt, const FloatRect& dstRect, const Color& color, ColorSpace styleColorSpace, CompositeOperator op) { if (color.alpha() <= 0) return; ctxt->save(); ctxt->setCompositeOperation(!color.hasAlpha() && op == CompositeSourceOver ? CompositeCopy : op); - ctxt->fillRect(dstRect, color); + ctxt->fillRect(dstRect, color, styleColorSpace); ctxt->restore(); } @@ -104,10 +104,10 @@ static inline FloatSize calculatePatternScale(const FloatRect& dstRect, const Fl } -void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& scaledTileSize, CompositeOperator op) +void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& scaledTileSize, ColorSpace styleColorSpace, CompositeOperator op) { if (mayFillWithSolidColor()) { - fillWithSolidColor(ctxt, destRect, solidColor(), op); + fillWithSolidColor(ctxt, destRect, solidColor(), styleColorSpace, op); return; } @@ -132,22 +132,22 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const Fl visibleSrcRect.setY((destRect.y() - oneTileRect.y()) / scale.height()); visibleSrcRect.setWidth(destRect.width() / scale.width()); visibleSrcRect.setHeight(destRect.height() / scale.height()); - draw(ctxt, destRect, visibleSrcRect, op); + draw(ctxt, destRect, visibleSrcRect, styleColorSpace, op); return; } TransformationMatrix patternTransform = TransformationMatrix().scaleNonUniform(scale.width(), scale.height()); FloatRect tileRect(FloatPoint(), intrinsicTileSize); - drawPattern(ctxt, tileRect, patternTransform, oneTileRect.location(), op, destRect); + drawPattern(ctxt, tileRect, patternTransform, oneTileRect.location(), styleColorSpace, op, destRect); startAnimation(); } // FIXME: Merge with the other drawTiled eventually, since we need a combination of both for some things. -void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, TileRule hRule, TileRule vRule, CompositeOperator op) +void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, TileRule hRule, TileRule vRule, ColorSpace styleColorSpace, CompositeOperator op) { if (mayFillWithSolidColor()) { - fillWithSolidColor(ctxt, dstRect, solidColor(), op); + fillWithSolidColor(ctxt, dstRect, solidColor(), styleColorSpace, op); return; } @@ -170,7 +170,7 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const Flo vPhase -= fmodf(dstRect.height(), scale.height() * srcRect.height()) / 2.0f; FloatPoint patternPhase(dstRect.x() - hPhase, dstRect.y() - vPhase); - drawPattern(ctxt, srcRect, patternTransform, patternPhase, op, dstRect); + drawPattern(ctxt, srcRect, patternTransform, patternPhase, styleColorSpace, op, dstRect); startAnimation(); } -- cgit v1.1