diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/cg')
-rw-r--r-- | Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp | 3 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp | 5 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/cg/PatternCG.cpp | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp index eddf735..bcfc37b 100644 --- a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp +++ b/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp @@ -625,8 +625,8 @@ void GraphicsContext::fillRect(const FloatRect& rect) if (m_state.fillGradient) { CGContextSaveGState(context); - CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform()); if (hasShadow()) { + CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform()); CGLayerRef layer = CGLayerCreateWithContext(context, CGSizeMake(rect.width(), rect.height()), 0); CGContextRef layerContext = CGLayerGetContext(layer); m_state.fillGradient->paint(layerContext); @@ -634,6 +634,7 @@ void GraphicsContext::fillRect(const FloatRect& rect) CGLayerRelease(layer); } else { CGContextClipToRect(context, rect); + CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform()); m_state.fillGradient->paint(this); } CGContextRestoreGState(context); diff --git a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp index 023d098..295f632 100644 --- a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp +++ b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp @@ -173,6 +173,11 @@ ImageBuffer::~ImageBuffer() { } +size_t ImageBuffer::dataSize() const +{ + return m_size.height() * m_data.m_bytesPerRow; +} + GraphicsContext* ImageBuffer::context() const { return m_context.get(); diff --git a/Source/WebCore/platform/graphics/cg/PatternCG.cpp b/Source/WebCore/platform/graphics/cg/PatternCG.cpp index 94f37b2..cfac15c 100644 --- a/Source/WebCore/platform/graphics/cg/PatternCG.cpp +++ b/Source/WebCore/platform/graphics/cg/PatternCG.cpp @@ -54,8 +54,7 @@ CGPatternRef Pattern::createPlatformPattern(const AffineTransform& userSpaceTran { IntRect tileRect = tileImage()->rect(); - AffineTransform patternTransform = m_patternSpaceTransformation; - patternTransform.multiply(userSpaceTransformation); + AffineTransform patternTransform = userSpaceTransformation * m_patternSpaceTransformation; patternTransform.scaleNonUniform(1, -1); patternTransform.translate(0, -tileRect.height()); |