PlatformCALayerRemoteCustom.h [plain text]
#ifndef PlatformCALayerRemoteCustom_h
#define PlatformCALayerRemoteCustom_h
#include "PlatformCALayerRemote.h"
namespace WebKit {
class LayerHostingContext;
class PlatformCALayerRemoteCustom final : public PlatformCALayerRemote {
friend class PlatformCALayerRemote;
public:
static PassRefPtr<PlatformCALayerRemote> create(PlatformLayer *, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext&);
virtual ~PlatformCALayerRemoteCustom();
virtual PlatformLayer* platformLayer() const override { return m_platformLayer.get(); }
virtual uint32_t hostingContextID() override;
virtual void setNeedsDisplayInRect(const WebCore::FloatRect& dirtyRect) override;
virtual void setNeedsDisplay() override;
private:
PlatformCALayerRemoteCustom(WebCore::PlatformCALayer::LayerType, PlatformLayer *, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext&);
virtual PassRefPtr<WebCore::PlatformCALayer> clone(WebCore::PlatformCALayerClient* owner) const override;
virtual bool isPlatformCALayerRemoteCustom() const override { return true; }
virtual CFTypeRef contents() const override;
virtual void setContents(CFTypeRef) override;
std::unique_ptr<LayerHostingContext> m_layerHostingContext;
RetainPtr<PlatformLayer> m_platformLayer;
bool m_providesContents;
};
}
SPECIALIZE_TYPE_TRAITS_PLATFORM_CALAYER(WebKit::PlatformCALayerRemoteCustom, isPlatformCALayerRemote())
#endif // PlatformCALayerRemoteCustom_h