[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
commit-queue at webkit.org
commit-queue at webkit.org
Fri Jan 21 14:44:08 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit b670a02284f3eb089cd009e718adcd30f96d4076
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 28 05:33:07 2010 +0000
2010-12-27 Helder Correia <helder at sencha.com>
Reviewed by Ariya Hidayat.
ContextShadow should use AffineTransform instead of TransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=51661
ContextShadow needs the CTM to make sure shadows are not affected by
transformations when drawing on a canvas. AffineTransform is sufficient
in this case.
Existing tests: fast/canvas/canvas*shadow*html
* platform/graphics/ContextShadow.cpp:
(WebCore::ContextShadow::mustUseContextShadow):
(WebCore::ContextShadow::adjustBlurDistance):
(WebCore::ContextShadow::calculateLayerBoundingRect):
* platform/graphics/ContextShadow.h:
* platform/graphics/cairo/ContextShadowCairo.cpp:
(WebCore::ContextShadow::getTransformationMatrixFromContext):
* platform/graphics/qt/ContextShadowQt.cpp:
(WebCore::ContextShadow::getTransformationMatrixFromContext):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1ddbb4d..a38cca4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-12-27 Helder Correia <helder at sencha.com>
+
+ Reviewed by Ariya Hidayat.
+
+ ContextShadow should use AffineTransform instead of TransformationMatrix
+ https://bugs.webkit.org/show_bug.cgi?id=51661
+
+ ContextShadow needs the CTM to make sure shadows are not affected by
+ transformations when drawing on a canvas. AffineTransform is sufficient
+ in this case.
+
+ Existing tests: fast/canvas/canvas*shadow*html
+
+ * platform/graphics/ContextShadow.cpp:
+ (WebCore::ContextShadow::mustUseContextShadow):
+ (WebCore::ContextShadow::adjustBlurDistance):
+ (WebCore::ContextShadow::calculateLayerBoundingRect):
+ * platform/graphics/ContextShadow.h:
+ * platform/graphics/cairo/ContextShadowCairo.cpp:
+ (WebCore::ContextShadow::getTransformationMatrixFromContext):
+ * platform/graphics/qt/ContextShadowQt.cpp:
+ (WebCore::ContextShadow::getTransformationMatrixFromContext):
+
2010-12-27 Daniel Bates <dbates at rim.com>
Reviewed by Antonio Gomes.
diff --git a/WebCore/platform/graphics/ContextShadow.cpp b/WebCore/platform/graphics/ContextShadow.cpp
index b34e546..95aad46 100644
--- a/WebCore/platform/graphics/ContextShadow.cpp
+++ b/WebCore/platform/graphics/ContextShadow.cpp
@@ -91,7 +91,7 @@ bool ContextShadow::mustUseContextShadow(PlatformContext context)
if (!shadowsIgnoreTransforms())
return false;
// We can avoid ContextShadow, since there are no transformations to apply to the canvas.
- const TransformationMatrix transform(getTransformationMatrixFromContext(context));
+ const AffineTransform transform(getTransformationMatrixFromContext(context));
if (transform.isIdentity())
return false;
// Otherwise, no chance avoiding ContextShadow.
@@ -173,7 +173,7 @@ void ContextShadow::blurLayerImage(unsigned char* imageData, const IntSize& size
void ContextShadow::adjustBlurDistance(const PlatformContext context)
{
// Adjust blur if we're scaling, since the radius must not be affected by transformations.
- const TransformationMatrix transform(getTransformationMatrixFromContext(context));
+ const AffineTransform transform(getTransformationMatrixFromContext(context));
if (transform.isIdentity())
return;
@@ -204,7 +204,7 @@ IntRect ContextShadow::calculateLayerBoundingRect(const PlatformContext context,
FloatRect layerFloatRect;
float inflation = 0;
- const TransformationMatrix transform(getTransformationMatrixFromContext(context));
+ const AffineTransform transform(getTransformationMatrixFromContext(context));
if (m_shadowsIgnoreTransforms && !transform.isIdentity()) {
FloatQuad transformedPolygon = transform.mapQuad(FloatQuad(layerArea));
transformedPolygon.move(m_offset);
diff --git a/WebCore/platform/graphics/ContextShadow.h b/WebCore/platform/graphics/ContextShadow.h
index 8f14229..a4c3f00 100644
--- a/WebCore/platform/graphics/ContextShadow.h
+++ b/WebCore/platform/graphics/ContextShadow.h
@@ -29,6 +29,7 @@
#ifndef ContextShadow_h
#define ContextShadow_h
+#include "AffineTransform.h"
#include "Color.h"
#include "FloatRect.h"
#include "GraphicsContext.h"
@@ -107,7 +108,7 @@ public:
PlatformContext beginShadowLayer(PlatformContext, const FloatRect& layerArea);
void endShadowLayer(PlatformContext);
static void purgeScratchBuffer();
- static TransformationMatrix getTransformationMatrixFromContext(PlatformContext);
+ static AffineTransform getTransformationMatrixFromContext(PlatformContext);
void setShadowsIgnoreTransforms(bool enable) { m_shadowsIgnoreTransforms = enable; }
bool shadowsIgnoreTransforms() const { return m_shadowsIgnoreTransforms; }
diff --git a/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp b/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp
index ae91282..c52cc3a 100644
--- a/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp
+++ b/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp
@@ -29,7 +29,6 @@
#include "config.h"
#include "ContextShadow.h"
-#include "AffineTransform.h"
#include "CairoUtilities.h"
#include "OwnPtrCairo.h"
#include "Path.h"
@@ -82,12 +81,12 @@ static cairo_surface_t* getScratchBuffer(const IntSize& size)
return scratchBuffer;
}
-TransformationMatrix ContextShadow::getTransformationMatrixFromContext(PlatformContext context)
+AffineTransform ContextShadow::getTransformationMatrixFromContext(PlatformContext context)
{
cairo_matrix_t transform;
cairo_get_matrix(context, &transform);
- return TransformationMatrix(transform.xx, transform.yx, transform.xy,
- transform.yy, transform.x0, transform.y0);
+ return AffineTransform(transform.xx, transform.yx, transform.xy,
+ transform.yy, transform.x0, transform.y0);
}
PlatformContext ContextShadow::beginShadowLayer(PlatformContext context, const FloatRect& layerArea)
diff --git a/WebCore/platform/graphics/qt/ContextShadowQt.cpp b/WebCore/platform/graphics/qt/ContextShadowQt.cpp
index cb53b24..e0e7422 100644
--- a/WebCore/platform/graphics/qt/ContextShadowQt.cpp
+++ b/WebCore/platform/graphics/qt/ContextShadowQt.cpp
@@ -100,11 +100,11 @@ void ShadowBuffer::timerEvent(QTimerEvent* event)
QObject::timerEvent(event);
}
-TransformationMatrix ContextShadow::getTransformationMatrixFromContext(PlatformContext context)
+AffineTransform ContextShadow::getTransformationMatrixFromContext(PlatformContext context)
{
const QTransform& transform = context->transform();
- return TransformationMatrix(transform.m11(), transform.m12(), transform.m21(),
- transform.m22(), transform.dx(), transform.dy());
+ return AffineTransform(transform.m11(), transform.m12(), transform.m21(),
+ transform.m22(), transform.dx(), transform.dy());
}
Q_GLOBAL_STATIC(ShadowBuffer, scratchShadowBuffer)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list