[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

simon.fraser at apple.com simon.fraser at apple.com
Sun Feb 20 22:58:08 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 345bd05d7bc7c26af69c3f6dc6f763f73a2559b7
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 14 20:01:24 2011 +0000

    2011-01-14  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Adam Roben.
    
            Issues with contentsScale in GraphicsLayerCA
            https://bugs.webkit.org/show_bug.cgi?id=52463
    
            Fix various issues with the recent contentsScale changes:
    
            * platform/graphics/ca/GraphicsLayerCA.cpp:
            (WebCore::GraphicsLayerCA::GraphicsLayerCA): Initialize m_contentsScale to 1.
            (WebCore::GraphicsLayerCA::updateContentsScale): Only do a setNeedsDisplay()
            if the layer draws content, otherwise we'll create backing store for empty layers.
            (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Be sure to set contentsScale
            on the new (tiled or untiled) layer.
            (WebCore::GraphicsLayerCA::cloneLayer): Clones need contentsScale too.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75807 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index af1a98c..a944fcf 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,5 +1,22 @@
 2011-01-14  Simon Fraser  <simon.fraser at apple.com>
 
+        Reviewed by Adam Roben.
+
+        Issues with contentsScale in GraphicsLayerCA
+        https://bugs.webkit.org/show_bug.cgi?id=52463
+
+        Fix various issues with the recent contentsScale changes:
+
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::GraphicsLayerCA): Initialize m_contentsScale to 1.
+        (WebCore::GraphicsLayerCA::updateContentsScale): Only do a setNeedsDisplay()
+        if the layer draws content, otherwise we'll create backing store for empty layers.
+        (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Be sure to set contentsScale
+        on the new (tiled or untiled) layer.
+        (WebCore::GraphicsLayerCA::cloneLayer): Clones need contentsScale too.
+
+2011-01-14  Simon Fraser  <simon.fraser at apple.com>
+
         Let Xcode have it's way with the project file.
 
         * WebCore.xcodeproj/project.pbxproj:
diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index 509b6ac..b72d761 100644
--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -253,6 +253,7 @@ GraphicsLayerCA::GraphicsLayerCA(GraphicsLayerClient* client)
     , m_contentsLayerPurpose(NoContentsLayer)
     , m_contentsLayerHasBackgroundColor(false)
     , m_uncommittedChanges(NoChange)
+    , m_contentsScale(1)
 {
     m_layer = PlatformCALayer::create(PlatformCALayer::LayerTypeWebLayer, this);
 
@@ -1934,7 +1935,8 @@ void GraphicsLayerCA::updateContentsScale()
         swapFromOrToTiledLayer(needTiledLayer);
 
     m_layer->setContentsScale(m_contentsScale);
-    m_layer->setNeedsDisplay();
+    if (drawsContent())
+        m_layer->setNeedsDisplay();
 }
 
 void GraphicsLayerCA::setDebugBackgroundColor(const Color& color)
@@ -1994,6 +1996,7 @@ void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer)
     RefPtr<PlatformCALayer> oldLayer = m_layer;
     
     m_layer = PlatformCALayer::create(useTiledLayer ? PlatformCALayer::LayerTypeWebTiledLayer : PlatformCALayer::LayerTypeWebLayer, this);
+    m_layer->setContentsScale(m_contentsScale);
 
     m_usingTiledLayer = useTiledLayer;
     
@@ -2268,6 +2271,7 @@ PassRefPtr<PlatformCALayer> GraphicsLayerCA::cloneLayer(PlatformCALayer *layer,
     newLayer->setDoubleSided(layer->isDoubleSided());
     newLayer->setOpaque(layer->isOpaque());
     newLayer->setBackgroundColor(layer->backgroundColor());
+    newLayer->setContentsScale(layer->contentsScale());
 
     if (cloneLevel == IntermediateCloneLevel) {
         newLayer->setOpacity(layer->opacity());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list