summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp')
-rw-r--r--Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp b/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
index a9f6d3c..b65b5bd 100644
--- a/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
+++ b/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
@@ -114,11 +114,12 @@ void ImageBuffer::draw(GraphicsContext* context, ColorSpace styleColorSpace, con
if (context->platformContext()->canAccelerate()) {
DrawingBuffer* sourceDrawingBuffer = m_data.m_platformContext.gpuCanvas()->drawingBuffer();
unsigned sourceTexture = static_cast<unsigned>(sourceDrawingBuffer->platformColorBuffer());
- FloatRect destRectFlipped(destRect);
- destRectFlipped.setY(destRect.y() + destRect.height());
- destRectFlipped.setHeight(-destRect.height());
+ FloatRect destRectNormalized(normalizeRect(destRect));
+ FloatRect srcRectFlipped(normalizeRect(srcRect));
+ srcRectFlipped.setY(m_size.height() - srcRect.y());
+ srcRectFlipped.setHeight(-srcRect.height());
context->platformContext()->prepareForHardwareDraw();
- context->platformContext()->gpuCanvas()->drawTexturedRect(sourceTexture, m_size, srcRect, destRectFlipped, styleColorSpace, op);
+ context->platformContext()->gpuCanvas()->drawTexturedRect(sourceTexture, m_size, srcRectFlipped, destRectNormalized, styleColorSpace, op);
return;
}
m_data.m_platformContext.syncSoftwareCanvas();