Expose 'geometryFlipped' state for debugging/logging purposes
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Sep 2015 22:47:41 +0000 (22:47 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Sep 2015 22:47:41 +0000 (22:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149557

Reviewed by Simon Fraser.

Source/WebCore:

No new tests: No new behavior.

* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::geometryFlipped): Added.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::geometryFlipped): Added.
(printLayer): Log flipped state of geometry.
* platform/graphics/ca/win/PlatformCALayerWin.h:

Source/WebKit2:

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::geometryFlipped): Added.
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/PlatformCALayer.h
Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.h
Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h

index c395112..2ef0f3c 100644 (file)
@@ -1,3 +1,21 @@
+2015-09-28  Brent Fulgham  <bfulgham@apple.com>
+
+        Expose 'geometryFlipped' state for debugging/logging purposes
+        https://bugs.webkit.org/show_bug.cgi?id=149557
+
+        Reviewed by Simon Fraser.
+
+        No new tests: No new behavior.
+
+        * platform/graphics/ca/PlatformCALayer.h:
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+        (PlatformCALayerCocoa::geometryFlipped): Added.
+        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
+        (PlatformCALayerWin::geometryFlipped): Added.
+        (printLayer): Log flipped state of geometry.
+        * platform/graphics/ca/win/PlatformCALayerWin.h:
+
 2015-09-28  Brady Eidson  <beidson@apple.com>
 
         Add an IDB Server that can roundtrip a request back to the client.
index 1e59286..10a1037 100644 (file)
@@ -157,6 +157,7 @@ public:
 
     virtual void setHidden(bool) = 0;
 
+    virtual bool geometryFlipped() const = 0;
     virtual void setGeometryFlipped(bool) = 0;
 
     virtual bool isDoubleSided() const = 0;
index 1cbf442..2b101da 100644 (file)
@@ -92,7 +92,8 @@ public:
     virtual void setBackingStoreAttached(bool) override;
     virtual bool backingStoreAttached() const override;
 
-    WEBCORE_EXPORT virtual void setGeometryFlipped(bool) override;
+    bool geometryFlipped() const override;
+    WEBCORE_EXPORT void setGeometryFlipped(bool) override;
 
     virtual bool isDoubleSided() const override;
     virtual void setDoubleSided(bool) override;
index d8d0de0..da40d4b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2015 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -618,6 +618,11 @@ bool PlatformCALayerCocoa::backingStoreAttached() const
     return true;
 }
 
+bool PlatformCALayerCocoa::geometryFlipped() const
+{
+    return [m_layer isGeometryFlipped];
+}
+
 void PlatformCALayerCocoa::setGeometryFlipped(bool value)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS
index 2c6df1b..93d755d 100644 (file)
@@ -452,6 +452,11 @@ bool PlatformCALayerWin::backingStoreAttached() const
     return true;
 }
 
+bool PlatformCALayerWin::geometryFlipped() const
+{
+    return CACFLayerIsGeometryFlipped(m_layer.get());
+}
+
 void PlatformCALayerWin::setGeometryFlipped(bool value)
 {
     CACFLayerSetGeometryFlipped(m_layer.get(), value);
@@ -787,6 +792,12 @@ static void printLayer(StringBuilder& builder, const PlatformCALayer* layer, int
         builder.append("(masksToBounds true)");
     }
 
+    if (bool geometryFlipped = layer->geometryFlipped()) {
+        builder.append('\n');
+        printIndent(builder, indent + 1);
+        builder.append("(geometryFlipped true)");
+    }
+
     // Print opacity if needed
     float layerOpacity = layer->opacity();
     if (layerOpacity != 1) {
index b277c54..d20bbb3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013, 2015 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -84,7 +84,8 @@ public:
     virtual void setBackingStoreAttached(bool) override;
     virtual bool backingStoreAttached() const override;
 
-    virtual void setGeometryFlipped(bool) override;
+    bool geometryFlipped() const override;
+    void setGeometryFlipped(bool) override;
 
     virtual bool isDoubleSided() const override;
     virtual void setDoubleSided(bool) override;
index b498169..b425287 100644 (file)
@@ -1,3 +1,14 @@
+2015-09-28  Brent Fulgham  <bfulgham@apple.com>
+
+        Expose 'geometryFlipped' state for debugging/logging purposes
+        https://bugs.webkit.org/show_bug.cgi?id=149557
+
+        Reviewed by Simon Fraser.
+
+        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+        (WebKit::PlatformCALayerRemote::geometryFlipped): Added.
+        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
+
 2015-09-28  Brady Eidson  <beidson@apple.com>
 
         Add an IDB Server that can roundtrip a request back to the client.
index 9e1a3a3..30e2991 100644 (file)
@@ -522,6 +522,11 @@ void PlatformCALayerRemote::setGeometryFlipped(bool value)
     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::GeometryFlippedChanged);
 }
 
+bool PlatformCALayerRemote::geometryFlipped() const
+{
+    return m_properties.geometryFlipped;
+}
+
 bool PlatformCALayerRemote::isDoubleSided() const
 {
     return m_properties.doubleSided;
index d0f4c7d..e6aabd6 100644 (file)
@@ -98,6 +98,7 @@ public:
     virtual bool backingStoreAttached() const override;
     virtual bool backingContributesToMemoryEstimate() const override { return backingStoreAttached(); }
 
+    virtual bool geometryFlipped() const override;
     virtual void setGeometryFlipped(bool) override;
 
     virtual bool isDoubleSided() const override;