Combine event and touch action regions into a single class
[WebKit-https.git] / Source / WebCore / platform / graphics / ca / win / PlatformCALayerWin.h
index 5535c83..99bc0ce 100644 (file)
@@ -23,8 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef PlatformCALayerWin_h
-#define PlatformCALayerWin_h
+#pragma once
 
 #include "PlatformCALayer.h"
 #include <wtf/HashMap.h>
@@ -33,8 +32,8 @@ namespace WebCore {
 
 class PlatformCALayerWin final : public PlatformCALayer {
 public:
-    static PassRefPtr<PlatformCALayer> create(LayerType, PlatformCALayerClient*);
-    static PassRefPtr<PlatformCALayer> create(PlatformLayer*, PlatformCALayerClient*);
+    static Ref<PlatformCALayer> create(LayerType, PlatformCALayerClient*);
+    static Ref<PlatformCALayer> create(PlatformLayer*, PlatformCALayerClient*);
     
     ~PlatformCALayerWin();
 
@@ -55,8 +54,8 @@ public:
 
     void addAnimationForKey(const String& key, PlatformCAAnimation&) override;
     void removeAnimationForKey(const String& key) override;
-    PassRefPtr<PlatformCAAnimation> animationForKey(const String& key) override;
-    void animationStarted(const String& key, CFTimeInterval beginTime) override;
+    RefPtr<PlatformCAAnimation> animationForKey(const String& key) override;
+    void animationStarted(const String& key, MonotonicTime beginTime) override;
     void animationEnded(const String& key) override;
 
     void setMask(PlatformCALayer*) override;
@@ -64,9 +63,6 @@ public:
     bool isOpaque() const override;
     void setOpaque(bool) override;
 
-    void setContentsFormat(ContentsFormatFlags) override;
-    ContentsFormatFlags contentsFormat() const override;
-
     FloatRect bounds() const override;
     void setBounds(const FloatRect&) override;
 
@@ -82,8 +78,15 @@ public:
     TransformationMatrix sublayerTransform() const override;
     void setSublayerTransform(const TransformationMatrix&) override;
 
+    bool isHidden() const override;
     void setHidden(bool) override;
 
+    bool contentsHidden() const override;
+    void setContentsHidden(bool) override;
+
+    bool userInteractionEnabled() const override;
+    void setUserInteractionEnabled(bool) override;
+
     void setBackingStoreAttached(bool) override;
     bool backingStoreAttached() const override;
 
@@ -99,6 +102,13 @@ public:
     bool acceleratesDrawing() const override;
     void setAcceleratesDrawing(bool) override;
 
+    bool wantsDeepColorBackingStore() const override;
+    void setWantsDeepColorBackingStore(bool) override;
+
+    bool supportsSubpixelAntialiasedText() const override;
+    void setSupportsSubpixelAntialiasedText(bool) override;
+
+    bool hasContents() const override;
     CFTypeRef contents() const override;
     void setContents(CFTypeRef) override;
 
@@ -147,28 +157,29 @@ public:
     GraphicsLayer::CustomAppearance customAppearance() const override { return m_customAppearance; }
     void updateCustomAppearance(GraphicsLayer::CustomAppearance customAppearance) override { m_customAppearance = customAppearance; }
 
+    void setEventRegion(const EventRegion&) override { }
+
+    GraphicsLayer::EmbeddedViewID embeddedViewID() const override;
+
     TiledBacking* tiledBacking() override;
     
     PlatformCALayer* rootLayer() const override;
     void setNeedsLayout() override;
     void setNeedsCommit() override;
-    void drawTextAtPoint(CGContextRef, CGFloat x, CGFloat y, CGSize scale, CGFloat fontSize, const char* text, size_t length) const override;
+    void drawTextAtPoint(CGContextRef, CGFloat x, CGFloat y, CGSize scale, CGFloat fontSize, const char* text, size_t length, CGFloat strokeWidth, Color strokeColor) const override;
 
     String layerTreeAsString() const override;
 
-    PassRefPtr<PlatformCALayer> clone(PlatformCALayerClient* owner) const override;
+    Ref<PlatformCALayer> clone(PlatformCALayerClient* owner) const override;
 
-    PassRefPtr<PlatformCALayer> createCompatibleLayer(PlatformCALayer::LayerType, PlatformCALayerClient*) const override;
+    Ref<PlatformCALayer> createCompatibleLayer(PlatformCALayer::LayerType, PlatformCALayerClient*) const override;
 
 private:
     PlatformCALayerWin(LayerType, PlatformLayer*, PlatformCALayerClient* owner);
 
     HashMap<String, RefPtr<PlatformCAAnimation>> m_animations;
     std::unique_ptr<PlatformCALayerList> m_customSublayers;
-    GraphicsLayer::CustomAppearance m_customAppearance;
-    ContentsFormatFlags m_contentsFormat { 0 };
+    GraphicsLayer::CustomAppearance m_customAppearance { GraphicsLayer::CustomAppearance::None };
 };
 
 }
-
-#endif // PlatformCALayerWin_h