[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

simon.fraser at apple.com simon.fraser at apple.com
Thu Oct 29 20:50:03 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 2132566ab8d0668b66bca64e4fa3ebe375d2da75
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 22 17:33:03 2009 +0000

    2009-10-20  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Darin Adler.
    
            Make accelerated compositing debug indicators work in release builds
            https://bugs.webkit.org/show_bug.cgi?id=30588
    
            Allow some debug indicators, that show which page elements go into compositing layers,
            to work in release builds, when the runtime prefs are set.
    
            * platform/graphics/GraphicsLayer.cpp:
            (WebCore::GraphicsLayer::GraphicsLayer):
            (WebCore::GraphicsLayer::setZPosition):
            * platform/graphics/GraphicsLayer.h:
            * platform/graphics/mac/GraphicsLayerCA.h:
            * platform/graphics/mac/GraphicsLayerCA.mm:
            (WebCore::clearBorderColor):
            (WebCore::GraphicsLayer::showRepaintCounter):
            (WebCore::GraphicsLayerCA::GraphicsLayerCA):
            (WebCore::GraphicsLayerCA::updateMasksToBounds):
            (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
            (WebCore::GraphicsLayerCA::setDebugBorder):
            (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
            (WebCore::GraphicsLayerCA::setupContentsLayer):
            * platform/graphics/mac/WebLayer.mm:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49945 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8bad288..0783e58 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2009-10-20  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Make accelerated compositing debug indicators work in release builds
+        https://bugs.webkit.org/show_bug.cgi?id=30588
+        
+        Allow some debug indicators, that show which page elements go into compositing layers,
+        to work in release builds, when the runtime prefs are set.
+
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::GraphicsLayer):
+        (WebCore::GraphicsLayer::setZPosition):
+        * platform/graphics/GraphicsLayer.h:
+        * platform/graphics/mac/GraphicsLayerCA.h:
+        * platform/graphics/mac/GraphicsLayerCA.mm:
+        (WebCore::clearBorderColor):
+        (WebCore::GraphicsLayer::showRepaintCounter):
+        (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+        (WebCore::GraphicsLayerCA::updateMasksToBounds):
+        (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
+        (WebCore::GraphicsLayerCA::setDebugBorder):
+        (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+        (WebCore::GraphicsLayerCA::setupContentsLayer):
+        * platform/graphics/mac/WebLayer.mm:
+
 2009-10-22  Keishi Hattori  <casey.hattori at gmail.com>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/platform/graphics/GraphicsLayer.cpp b/WebCore/platform/graphics/GraphicsLayer.cpp
index d196a0c..c8582bb 100644
--- a/WebCore/platform/graphics/GraphicsLayer.cpp
+++ b/WebCore/platform/graphics/GraphicsLayer.cpp
@@ -59,9 +59,7 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
     : m_client(client)
     , m_anchorPoint(0.5f, 0.5f, 0)
     , m_opacity(1)
-#ifndef NDEBUG
     , m_zPosition(0)
-#endif
     , m_backgroundColorSet(false)
     , m_contentsOpaque(false)
     , m_preserves3D(false)
@@ -74,9 +72,7 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
     , m_contentsOrientation(CompositingCoordinatesTopDown)
     , m_parent(0)
     , m_maskLayer(0)
-#ifndef NDEBUG
     , m_repaintCount(0)
-#endif
 {
 }
 
@@ -229,7 +225,6 @@ void GraphicsLayer::resumeAnimations()
 {
 }
 
-#ifndef NDEBUG
 void GraphicsLayer::updateDebugIndicators()
 {
     if (GraphicsLayer::showDebugBorders()) {
@@ -251,7 +246,6 @@ void GraphicsLayer::setZPosition(float position)
 {
     m_zPosition = position;
 }
-#endif
 
 float GraphicsLayer::accumulatedOpacity() const
 {
diff --git a/WebCore/platform/graphics/GraphicsLayer.h b/WebCore/platform/graphics/GraphicsLayer.h
index e5b17a6..85eace0 100644
--- a/WebCore/platform/graphics/GraphicsLayer.h
+++ b/WebCore/platform/graphics/GraphicsLayer.h
@@ -276,10 +276,8 @@ public:
     
     void dumpLayer(TextStream&, int indent = 0) const;
 
-#ifndef NDEBUG
     int repaintCount() const { return m_repaintCount; }
     int incrementRepaintCount() { return ++m_repaintCount; }
-#endif
 
     // Report whether the underlying compositing system uses a top-down
     // or a bottom-up coordinate system.
@@ -294,7 +292,6 @@ public:
     virtual void setContentsOrientation(CompositingCoordinatesOrientation orientation) { m_contentsOrientation = orientation; }
     CompositingCoordinatesOrientation contentsOrientation() const { return m_contentsOrientation; }
 
-#ifndef NDEBUG
     static bool showDebugBorders();
     static bool showRepaintCounter();
     
@@ -305,7 +302,6 @@ public:
     // z-position is the z-equivalent of position(). It's only used for debugging purposes.
     virtual float zPosition() const { return m_zPosition; }
     virtual void setZPosition(float);
-#endif
 
     virtual void distributeOpacity(float);
     virtual float accumulatedOpacity() const;
@@ -342,9 +338,7 @@ protected:
 
     Color m_backgroundColor;
     float m_opacity;
-#ifndef NDEBUG
     float m_zPosition;
-#endif
 
     bool m_backgroundColorSet : 1;
     bool m_contentsOpaque : 1;
@@ -365,9 +359,7 @@ protected:
 
     IntRect m_contentsRect;
 
-#ifndef NDEBUG
     int m_repaintCount;
-#endif
 };
 
 
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.h b/WebCore/platform/graphics/mac/GraphicsLayerCA.h
index d0e1108..8cf51b4 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.h
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.h
@@ -110,10 +110,8 @@ public:
     
     virtual PlatformLayer* platformLayer() const;
 
-#ifndef NDEBUG
     virtual void setDebugBackgroundColor(const Color&);
     virtual void setDebugBorder(const Color&, float borderWidth);
-#endif
 
     virtual void setGeometryOrientation(CompositingCoordinatesOrientation);
 
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
index eec9faa..b351956 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
@@ -274,7 +274,6 @@ static CAMediaTimingFunction* getCAMediaTimingFunction(const TimingFunction& tim
     return 0;
 }
 
-#ifndef NDEBUG
 static void setLayerBorderColor(PlatformLayer* layer, const Color& color)
 {
     CGColorRef borderColor = createCGColor(color);
@@ -286,7 +285,6 @@ static void clearBorderColor(PlatformLayer* layer)
 {
     [layer setBorderColor:nil];
 }
-#endif
 
 static void setLayerBackgroundColor(PlatformLayer* layer, const Color& color)
 {
@@ -317,7 +315,6 @@ GraphicsLayer::CompositingCoordinatesOrientation GraphicsLayer::compositingCoord
     return CompositingCoordinatesBottomUp;
 }
 
-#ifndef NDEBUG
 bool GraphicsLayer::showDebugBorders()
 {
     static bool showDebugBorders = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebCoreLayerBorders"];
@@ -329,7 +326,6 @@ bool GraphicsLayer::showRepaintCounter()
     static bool showRepaintCounter = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebCoreLayerRepaintCounter"];
     return showRepaintCounter;
 }
-#endif
 
 static NSDictionary* nullActionsDictionary()
 {
@@ -373,9 +369,7 @@ GraphicsLayerCA::GraphicsLayerCA(GraphicsLayerClient* client)
     setContentsOrientation(defaultContentsOrientation());
 #endif
 
-#ifndef NDEBUG
     updateDebugIndicators();
-#endif
 
     m_animationDelegate.adoptNS([[WebAnimationDelegate alloc] init]);
     [m_animationDelegate.get() setLayer:this];
@@ -964,9 +958,7 @@ void GraphicsLayerCA::updateChildrenTransform()
 void GraphicsLayerCA::updateMasksToBounds()
 {
     [m_layer.get() setMasksToBounds:m_masksToBounds];
-#ifndef NDEBUG
     updateDebugIndicators();
-#endif
 }
 
 void GraphicsLayerCA::updateContentsOpaque()
@@ -1051,9 +1043,7 @@ void GraphicsLayerCA::updateLayerDrawsContent()
     else
         [m_layer.get() setContents:nil];
 
-#ifndef NDEBUG
     updateDebugIndicators();
-#endif
 }
 
 void GraphicsLayerCA::updateLayerBackgroundColor()
@@ -1695,7 +1685,6 @@ PlatformLayer* GraphicsLayerCA::platformLayer() const
     return primaryLayer();
 }
 
-#ifndef NDEBUG
 void GraphicsLayerCA::setDebugBackgroundColor(const Color& color)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS
@@ -1722,7 +1711,6 @@ void GraphicsLayerCA::setDebugBorder(const Color& color, float borderWidth)
     
     END_BLOCK_OBJC_EXCEPTIONS
 }
-#endif // NDEBUG
 
 bool GraphicsLayerCA::requiresTiledLayer(const FloatSize& size) const
 {
@@ -1800,9 +1788,7 @@ void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer)
     // need to tell new layer to draw itself
     setNeedsDisplay();
     
-#ifndef NDEBUG
     updateDebugIndicators();
-#endif
 }
 
 GraphicsLayer::CompositingCoordinatesOrientation GraphicsLayerCA::defaultContentsOrientation() const
@@ -1846,12 +1832,10 @@ void GraphicsLayerCA::setupContentsLayer(CALayer* contentsLayer)
     } else
         [contentsLayer setAnchorPoint:CGPointZero];
 
-#ifndef NDEBUG
     if (showDebugBorders()) {
         setLayerBorderColor(contentsLayer, Color(0, 0, 128, 180));
         [contentsLayer setBorderWidth:1.0f];
     }
-#endif
 }
 
 void GraphicsLayerCA::setOpacityInternal(float accumulatedOpacity)
diff --git a/WebCore/platform/graphics/mac/WebLayer.mm b/WebCore/platform/graphics/mac/WebLayer.mm
index 2647466..56b28e6 100644
--- a/WebCore/platform/graphics/mac/WebLayer.mm
+++ b/WebCore/platform/graphics/mac/WebLayer.mm
@@ -80,7 +80,6 @@ using namespace WebCore;
     }
 #endif
 
-#ifndef NDEBUG
     if (layerContents->showRepaintCounter()) {
         bool isTiledLayer = [layer isKindOfClass:[CATiledLayer class]];
 
@@ -107,7 +106,6 @@ using namespace WebCore;
         
         CGContextRestoreGState(context);        
     }
-#endif
 
     CGContextRestoreGState(context);
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list