Revert http://trac.webkit.org/changeset/150047
It introduced unwanted behavioral differences between
Retina and non-Retina Mac hardware.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::computePixelAlignment):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 6e467be..02490ba 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2013-05-14 Simon Fraser <simon.fraser@apple.com>
+
+ Revert http://trac.webkit.org/changeset/150047
+
+ It introduced unwanted behavioral differences between
+ Retina and non-Retina Mac hardware.
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::requiresTiledLayer):
+ (WebCore::GraphicsLayerCA::computePixelAlignment):
+
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Remove the ClipboardMac class and header file
diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index 4b11ccd..ffcad87 100644
--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -2676,10 +2676,8 @@
if (!m_drawsContent || !m_allowTiledLayer || m_isPageTiledBackingLayer)
return false;
- float effectiveScale = pageScaleFactor * deviceScaleFactor();
-
// FIXME: catch zero-size height or width here (or earlier)?
- return m_size.width() * effectiveScale > cMaxPixelDimension || m_size.height() * effectiveScale > cMaxPixelDimension;
+ return m_size.width() * pageScaleFactor > cMaxPixelDimension || m_size.height() * pageScaleFactor > cMaxPixelDimension;
}
void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer)
@@ -3010,8 +3008,7 @@
void GraphicsLayerCA::computePixelAlignment(float pageScaleFactor, const FloatPoint& positionRelativeToBase,
FloatPoint& position, FloatSize& size, FloatPoint3D& anchorPoint, FloatSize& alignmentOffset) const
{
- float effectiveScale = pageScaleFactor * deviceScaleFactor();
- if (!m_maintainsPixelAlignment || isIntegral(effectiveScale) || !m_drawsContent || m_masksToBounds) {
+ if (!m_maintainsPixelAlignment || isIntegral(pageScaleFactor) || !m_drawsContent || m_masksToBounds) {
position = m_position;
size = m_size;
anchorPoint = m_anchorPoint;
@@ -3022,12 +3019,12 @@
FloatRect baseRelativeBounds(positionRelativeToBase, m_size);
FloatRect scaledBounds = baseRelativeBounds;
// Scale by the page scale factor to compute the screen-relative bounds.
- scaledBounds.scale(effectiveScale);
+ scaledBounds.scale(pageScaleFactor);
// Round to integer boundaries.
FloatRect alignedBounds = enclosingIntRect(scaledBounds);
// Convert back to layer coordinates.
- alignedBounds.scale(1 / effectiveScale);
+ alignedBounds.scale(1 / pageScaleFactor);
// Epsilon is necessary to ensure that backing store size computation in CA, which involves integer truncation,
// will match our aligned bounds.