[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mrobinson at webkit.org
mrobinson at webkit.org
Wed Dec 22 12:22:43 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 87ed5ad00b399bd6ed967c785d71317c91795d59
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 20 16:01:06 2010 +0000
2010-08-20 Martin Robinson <mrobinson at igalia.com>
Reviewed by Dirk Schulze.
[Cairo] Eliminate full-surface copy from canvas.drawImage(...)
https://bugs.webkit.org/show_bug.cgi?id=44190
Covered by canvas layout tests.
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::drawsUsingCopy): Return false now.
(WebCore::ImageBuffer::clip): Add a link to the bug which tracks this feature.
(WebCore::ImageBuffer::draw): Construct the bitmap image without the full-surface copy.
(WebCore::ImageBuffer::drawPattern): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cccd33f..1500b54 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-20 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Dirk Schulze.
+
+ [Cairo] Eliminate full-surface copy from canvas.drawImage(...)
+ https://bugs.webkit.org/show_bug.cgi?id=44190
+
+ Covered by canvas layout tests.
+
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (WebCore::ImageBuffer::drawsUsingCopy): Return false now.
+ (WebCore::ImageBuffer::clip): Add a link to the bug which tracks this feature.
+ (WebCore::ImageBuffer::draw): Construct the bitmap image without the full-surface copy.
+ (WebCore::ImageBuffer::drawPattern): Ditto.
+
2010-08-20 Alejandro G. Castro <alex at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp b/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
index db66276..976dcb4 100644
--- a/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
+++ b/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
@@ -38,10 +38,8 @@
#include "NotImplemented.h"
#include "Pattern.h"
#include "PlatformString.h"
-
#include <cairo.h>
#include <wtf/Vector.h>
-#include <math.h>
using namespace std;
@@ -100,7 +98,7 @@ GraphicsContext* ImageBuffer::context() const
bool ImageBuffer::drawsUsingCopy() const
{
- return true;
+ return false;
}
PassRefPtr<Image> ImageBuffer::copyImage() const
@@ -112,20 +110,23 @@ PassRefPtr<Image> ImageBuffer::copyImage() const
void ImageBuffer::clip(GraphicsContext*, const FloatRect&) const
{
notImplemented();
+ // See https://bugs.webkit.org/show_bug.cgi?id=23526 for why this is unimplemented.
}
void ImageBuffer::draw(GraphicsContext* context, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect,
CompositeOperator op , bool useLowQualityScale)
{
- RefPtr<Image> imageCopy = copyImage();
- context->drawImage(imageCopy.get(), styleColorSpace, destRect, srcRect, op, useLowQualityScale);
+ // BitmapImage will release the passed in surface on destruction
+ RefPtr<Image> image = BitmapImage::create(cairo_surface_reference(m_data.m_surface));
+ context->drawImage(image.get(), styleColorSpace, destRect, srcRect, op, useLowQualityScale);
}
void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
{
- RefPtr<Image> imageCopy = copyImage();
- imageCopy->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
+ // BitmapImage will release the passed in surface on destruction
+ RefPtr<Image> image = BitmapImage::create(cairo_surface_reference(m_data.m_surface));
+ image->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
}
void ImageBuffer::platformTransformColorSpace(const Vector<int>& lookUpTable)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list