[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
oliver at apple.com
oliver at apple.com
Wed Mar 17 17:59:59 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit d17c98d171fccfa2d00b29bdf2c2f3701e1135b7
Author: oliver at apple.com <oliver at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 26 01:06:30 2010 +0000
2010-02-25 Oliver Hunt <oliver at apple.com>
Reviewed by Simon Fraser.
Multiple repaints on apple.com
https://bugs.webkit.org/show_bug.cgi?id=35409
apple.com was triggering the fast scaling path for background images due to
repeated repaints as more content came in. This occured due to a two problems
in the logic to detect scaling. The first is that the main context is flipped
on mac so fails the identity or translation check. We work around this by adding
an function that allows the scaling for a flipped CTM. The other problem was that
we were looking at the destination rect size instead of the destination tile size
when deciding if the size we were drawn at would cause scaling.
* platform/graphics/transforms/AffineTransform.h:
(WebCore::AffineTransform::isIdentityOrTranslationOrFlipped):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9b36577..467877b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-02-25 Oliver Hunt <oliver at apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Multiple repaints on apple.com
+ https://bugs.webkit.org/show_bug.cgi?id=35409
+
+ apple.com was triggering the fast scaling path for background images due to
+ repeated repaints as more content came in. This occured due to a two problems
+ in the logic to detect scaling. The first is that the main context is flipped
+ on mac so fails the identity or translation check. We work around this by adding
+ an function that allows the scaling for a flipped CTM. The other problem was that
+ we were looking at the destination rect size instead of the destination tile size
+ when deciding if the size we were drawn at would cause scaling.
+
+ * platform/graphics/transforms/AffineTransform.h:
+ (WebCore::AffineTransform::isIdentityOrTranslationOrFlipped):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality):
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+
2010-02-25 Enrica Casucci <enrica at apple.com>
Reviewed by Adele Peterson.
diff --git a/WebCore/platform/graphics/transforms/AffineTransform.h b/WebCore/platform/graphics/transforms/AffineTransform.h
index 00631c2..45a19d7 100644
--- a/WebCore/platform/graphics/transforms/AffineTransform.h
+++ b/WebCore/platform/graphics/transforms/AffineTransform.h
@@ -120,6 +120,11 @@ public:
{
return m_transform[0] == 1 && m_transform[1] == 0 && m_transform[2] == 0 && m_transform[3] == 1;
}
+
+ bool isIdentityOrTranslationOrFlipped() const
+ {
+ return m_transform[0] == 1 && m_transform[1] == 0 && m_transform[2] == 0 && (m_transform[3] == 1 || m_transform[3] == -1);
+ }
bool operator== (const AffineTransform& m2) const
{
diff --git a/WebCore/rendering/RenderBoxModelObject.cpp b/WebCore/rendering/RenderBoxModelObject.cpp
index 2408796..1ae4775 100644
--- a/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/WebCore/rendering/RenderBoxModelObject.cpp
@@ -131,7 +131,7 @@ bool RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality(GraphicsCont
data = gBoxModelObjects->get(object);
const AffineTransform& currentTransform = context->getCTM();
- bool contextIsScaled = !currentTransform.isIdentityOrTranslation();
+ bool contextIsScaled = !currentTransform.isIdentityOrTranslationOrFlipped();
if (!contextIsScaled && imageSize == size) {
// There is no scale in effect. If we had a scale in effect before, we can just delete this data.
if (data) {
@@ -606,7 +606,7 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
CompositeOperator compositeOp = op == CompositeSourceOver ? bgLayer->composite() : op;
RenderObject* clientForBackgroundImage = backgroundObject ? backgroundObject : this;
Image* image = bg->image(clientForBackgroundImage, tileSize);
- bool useLowQualityScaling = RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality(context, this, image, destRect.size());
+ bool useLowQualityScaling = RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality(context, this, image, tileSize);
context->drawTiledImage(image, style()->colorSpace(), destRect, phase, tileSize, compositeOp, useLowQualityScaling);
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list