Guard showGraphicsLayerTree() with ENABLE(TREE_DEBUGGING)
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Apr 2016 06:13:55 +0000 (06:13 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Apr 2016 06:13:55 +0000 (06:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=156157

Reviewed by Simon Fraser.

Mimic r181166 and guard the showGraphicsLayerTree() function with
ENABLE(TREE_DEBUGGING) guards, instead of !defined(NDEBUG). This
would enable invoking the function in release builds when the
ENABLE_TREE_DEBUGGING option is enabled, not limiting the function
to only debug builds.

* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayer.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/platform/graphics/GraphicsLayer.h

index 65a1dec..1323624 100644 (file)
@@ -1,5 +1,21 @@
 2016-04-04  Zan Dobersek  <zdobersek@igalia.com>
 
+        Guard showGraphicsLayerTree() with ENABLE(TREE_DEBUGGING)
+        https://bugs.webkit.org/show_bug.cgi?id=156157
+
+        Reviewed by Simon Fraser.
+
+        Mimic r181166 and guard the showGraphicsLayerTree() function with
+        ENABLE(TREE_DEBUGGING) guards, instead of !defined(NDEBUG). This
+        would enable invoking the function in release builds when the
+        ENABLE_TREE_DEBUGGING option is enabled, not limiting the function
+        to only debug builds.
+
+        * platform/graphics/GraphicsLayer.cpp:
+        * platform/graphics/GraphicsLayer.h:
+
+2016-04-04  Zan Dobersek  <zdobersek@igalia.com>
+
         [TexMap] Improve viewport array access in TextureMapperGL::bindDefaultSurface()
         https://bugs.webkit.org/show_bug.cgi?id=156159
 
index 3411fe0..633a728 100644 (file)
@@ -911,7 +911,7 @@ String GraphicsLayer::layerTreeAsText(LayerTreeAsTextBehavior behavior) const
 
 } // namespace WebCore
 
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer)
 {
     if (!layer)
index 835f96a..121aae8 100644 (file)
@@ -666,7 +666,7 @@ SPECIALIZE_TYPE_TRAITS_BEGIN(ToValueTypeName) \
     static bool isType(const WebCore::GraphicsLayer& layer) { return layer.predicate; } \
 SPECIALIZE_TYPE_TRAITS_END()
 
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer);
 #endif