Changeset 55266 in webkit
- Timestamp:
- Feb 25, 2010 5:06:30 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r55263 r55266 1 2010-02-25 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 Multiple repaints on apple.com 6 https://bugs.webkit.org/show_bug.cgi?id=35409 7 8 apple.com was triggering the fast scaling path for background images due to 9 repeated repaints as more content came in. This occured due to a two problems 10 in the logic to detect scaling. The first is that the main context is flipped 11 on mac so fails the identity or translation check. We work around this by adding 12 an function that allows the scaling for a flipped CTM. The other problem was that 13 we were looking at the destination rect size instead of the destination tile size 14 when deciding if the size we were drawn at would cause scaling. 15 16 * platform/graphics/transforms/AffineTransform.h: 17 (WebCore::AffineTransform::isIdentityOrTranslationOrFlipped): 18 * rendering/RenderBoxModelObject.cpp: 19 (WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality): 20 (WebCore::RenderBoxModelObject::paintFillLayerExtended): 21 1 22 2010-02-25 Enrica Casucci <enrica@apple.com> 2 23 -
trunk/WebCore/platform/graphics/transforms/AffineTransform.h
r54564 r55266 121 121 return m_transform[0] == 1 && m_transform[1] == 0 && m_transform[2] == 0 && m_transform[3] == 1; 122 122 } 123 124 bool isIdentityOrTranslationOrFlipped() const 125 { 126 return m_transform[0] == 1 && m_transform[1] == 0 && m_transform[2] == 0 && (m_transform[3] == 1 || m_transform[3] == -1); 127 } 123 128 124 129 bool operator== (const AffineTransform& m2) const -
trunk/WebCore/rendering/RenderBoxModelObject.cpp
r55141 r55266 132 132 133 133 const AffineTransform& currentTransform = context->getCTM(); 134 bool contextIsScaled = !currentTransform.isIdentityOrTranslation ();134 bool contextIsScaled = !currentTransform.isIdentityOrTranslationOrFlipped(); 135 135 if (!contextIsScaled && imageSize == size) { 136 136 // There is no scale in effect. If we had a scale in effect before, we can just delete this data. … … 607 607 RenderObject* clientForBackgroundImage = backgroundObject ? backgroundObject : this; 608 608 Image* image = bg->image(clientForBackgroundImage, tileSize); 609 bool useLowQualityScaling = RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality(context, this, image, destRect.size());609 bool useLowQualityScaling = RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality(context, this, image, tileSize); 610 610 context->drawTiledImage(image, style()->colorSpace(), destRect, phase, tileSize, compositeOp, useLowQualityScaling); 611 611 }
Note: See TracChangeset
for help on using the changeset viewer.