[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

mdelaney at apple.com mdelaney at apple.com
Wed Dec 22 18:14:48 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2d30b0ca7fe490a84843053f9ebcd1ed9eb12f73
Author: mdelaney at apple.com <mdelaney at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 9 01:54:49 2010 +0000

    2010-12-08  Matthew Delaney  <mdelaney at apple.com>
    
            Reviewed by Simon Fraser.
    
            Add getter and setters for acceleratesRendering flag on layers
            https://bugs.webkit.org/show_bug.cgi?id=50717
    
            * platform/graphics/GraphicsLayer.cpp:
            * platform/graphics/ca/GraphicsLayerCA.cpp:
            * platform/graphics/ca/mac/PlatformCALayerMac.mm:
            Plumbed through acceleratedRendering flag.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f2977b4..df61262 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-08  Matthew Delaney  <mdelaney at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Add getter and setters for acceleratesRendering flag on layers
+        https://bugs.webkit.org/show_bug.cgi?id=50717
+
+        * platform/graphics/GraphicsLayer.cpp:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
+        Plumbed through acceleratedRendering flag.
+
 2010-12-07  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/WebCore/platform/graphics/GraphicsLayer.cpp b/WebCore/platform/graphics/GraphicsLayer.cpp
index 08b79ab..84905a9 100644
--- a/WebCore/platform/graphics/GraphicsLayer.cpp
+++ b/WebCore/platform/graphics/GraphicsLayer.cpp
@@ -73,6 +73,7 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
     , m_usingTiledLayer(false)
     , m_masksToBounds(false)
     , m_drawsContent(false)
+    , m_acceleratesDrawing(false)
     , m_paintingPhase(GraphicsLayerPaintAll)
     , m_contentsOrientation(CompositingCoordinatesTopDown)
     , m_parent(0)
diff --git a/WebCore/platform/graphics/GraphicsLayer.h b/WebCore/platform/graphics/GraphicsLayer.h
index 4153c74..60638e7 100644
--- a/WebCore/platform/graphics/GraphicsLayer.h
+++ b/WebCore/platform/graphics/GraphicsLayer.h
@@ -258,6 +258,9 @@ public:
     bool drawsContent() const { return m_drawsContent; }
     virtual void setDrawsContent(bool b) { m_drawsContent = b; }
 
+    bool acceleratesDrawing() const { return m_acceleratesDrawing; }
+    virtual void setAcceleratesDrawing(bool b) { m_acceleratesDrawing = b; }
+
     // The color used to paint the layer backgrounds
     const Color& backgroundColor() const { return m_backgroundColor; }
     virtual void setBackgroundColor(const Color&);
@@ -394,6 +397,7 @@ protected:
     bool m_usingTiledLayer : 1;
     bool m_masksToBounds : 1;
     bool m_drawsContent : 1;
+    bool m_acceleratesDrawing : 1;
 
     GraphicsLayerPaintingPhase m_paintingPhase;
     CompositingCoordinatesOrientation m_contentsOrientation; // affects orientation of layer contents
diff --git a/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index 4605168..7ab34f0 100644
--- a/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -482,6 +482,15 @@ void GraphicsLayerCA::setDrawsContent(bool drawsContent)
     noteLayerPropertyChanged(DrawsContentChanged);
 }
 
+void GraphicsLayerCA::setAcceleratesDrawing(bool acceleratesDrawing)
+{
+    if (acceleratesDrawing == m_acceleratesDrawing)
+        return;
+
+    GraphicsLayer::setAcceleratesDrawing(acceleratesDrawing);
+    noteLayerPropertyChanged(DrawsContentChanged);
+}
+
 void GraphicsLayerCA::setBackgroundColor(const Color& color)
 {
     if (m_backgroundColorSet && m_backgroundColor == color)
@@ -837,6 +846,9 @@ void GraphicsLayerCA::commitLayerChangesBeforeSublayers()
 
     if (m_uncommittedChanges & ContentsNeedsDisplay)
         updateContentsNeedsDisplay();
+    
+    if (m_uncommittedChanges & AcceleratesDrawingChanged)
+        updateAcceleratesDrawing();
 }
 
 void GraphicsLayerCA::commitLayerChangesAfterSublayers()
@@ -1178,6 +1190,11 @@ void GraphicsLayerCA::updateLayerDrawsContent()
     updateDebugIndicators();
 }
 
+void GraphicsLayerCA::updateAcceleratesDrawing()
+{
+    m_layer->setAcceleratesDrawing(m_acceleratesDrawing);
+}
+    
 void GraphicsLayerCA::updateLayerBackgroundColor()
 {
     if (!m_contentsLayer)
diff --git a/WebCore/platform/graphics/ca/GraphicsLayerCA.h b/WebCore/platform/graphics/ca/GraphicsLayerCA.h
index 9d6831d..22921c1 100644
--- a/WebCore/platform/graphics/ca/GraphicsLayerCA.h
+++ b/WebCore/platform/graphics/ca/GraphicsLayerCA.h
@@ -79,6 +79,7 @@ public:
     virtual void setPreserves3D(bool);
     virtual void setMasksToBounds(bool);
     virtual void setDrawsContent(bool);
+    virtual void setAcceleratesDrawing(bool);
 
     virtual void setBackgroundColor(const Color&);
     virtual void clearBackgroundColor();
@@ -261,6 +262,7 @@ private:
 
     void updateLayerAnimations();
     void updateContentsNeedsDisplay();
+    void updateAcceleratesDrawing();
     
     enum StructuralLayerPurpose {
         NoStructuralLayer = 0,
@@ -302,7 +304,8 @@ private:
         ContentsRectChanged = 1 << 20,
         MaskLayerChanged = 1 << 21,
         ReplicatedLayerChanged = 1 << 22,
-        ContentsNeedsDisplay = 1 << 23
+        ContentsNeedsDisplay = 1 << 23,
+        AcceleratesDrawingChanged = 1 << 24
     };
     typedef unsigned LayerChangeFlags;
     void noteLayerPropertyChanged(LayerChangeFlags flags);
diff --git a/WebCore/platform/graphics/ca/PlatformCALayer.h b/WebCore/platform/graphics/ca/PlatformCALayer.h
index 93ae80c..9cf0ccb 100644
--- a/WebCore/platform/graphics/ca/PlatformCALayer.h
+++ b/WebCore/platform/graphics/ca/PlatformCALayer.h
@@ -146,6 +146,9 @@ public:
 
     bool masksToBounds() const;
     void setMasksToBounds(bool);
+    
+    bool acceleratesDrawing() const;
+    void setAcceleratesDrawing(bool);
 
     void* contents() const;
     void setContents(void*);
diff --git a/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm b/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
index 9478632..3676adf 100644
--- a/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
+++ b/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
@@ -91,6 +91,10 @@ static double mediaTimeToCurrentTime(CFTimeInterval t)
 
 @interface CALayer(Private)
 - (void)setContentsChanged;
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+- (void)setAcceleratesDrawing:(BOOL)flag;
+- (BOOL)acceleratesDrawing;
+#endif
 @end
 
 static NSString * const platformCALayerPointer = @"WKPlatformCALayer";
@@ -542,6 +546,26 @@ void PlatformCALayer::setMasksToBounds(bool value)
     END_BLOCK_OBJC_EXCEPTIONS
 }
 
+bool PlatformCALayer::acceleratesDrawing() const
+{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+    return [m_layer.get() acceleratesDrawing];
+#else
+    return false;
+#endif
+}
+
+void PlatformCALayer::setAcceleratesDrawing(bool acceleratesDrawing)
+{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+    BEGIN_BLOCK_OBJC_EXCEPTIONS
+    [m_layer.get() setAcceleratesDrawing:acceleratesDrawing];
+    END_BLOCK_OBJC_EXCEPTIONS
+#else
+    UNUSED_PARAM(acceleratesDrawing);
+#endif
+}
+
 void* PlatformCALayer::contents() const
 {
     return [m_layer.get() contents];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list