GraphicsLayerClient.h [plain text]
#ifndef GraphicsLayerClient_h
#define GraphicsLayerClient_h
#if USE(ACCELERATED_COMPOSITING)
#ifdef __OBJC__
@class CALayer;
#else
class CALayer;
#endif
typedef CALayer PlatformLayer;
namespace WebCore {
class GraphicsContext;
class GraphicsLayer;
class IntPoint;
class IntRect;
class FloatPoint;
enum GraphicsLayerPaintingPhaseFlags {
GraphicsLayerPaintBackground = (1 << 0),
GraphicsLayerPaintForeground = (1 << 1),
GraphicsLayerPaintMask = (1 << 2),
GraphicsLayerPaintOverflowContents = (1 << 3),
GraphicsLayerPaintAll = (GraphicsLayerPaintBackground | GraphicsLayerPaintForeground | GraphicsLayerPaintMask)
};
typedef unsigned GraphicsLayerPaintingPhase;
enum AnimatedPropertyID {
AnimatedPropertyInvalid,
AnimatedPropertyWebkitTransform,
AnimatedPropertyOpacity,
AnimatedPropertyBackgroundColor,
AnimatedPropertyWebkitFilter
};
class GraphicsLayerClient {
public:
virtual ~GraphicsLayerClient() {}
virtual bool shouldUseTileCache(const GraphicsLayer*) const { return false; }
virtual void notifyAnimationStarted(const GraphicsLayer*, double time) = 0;
virtual void notifySyncRequired(const GraphicsLayer*) = 0;
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) = 0;
virtual void didCommitChangesForLayer(const GraphicsLayer*) const { }
virtual float deviceScaleFactor() const { return 1; }
virtual float pageScaleFactor() const { return 1; }
virtual bool showDebugBorders(const GraphicsLayer*) const = 0;
virtual bool showRepaintCounter(const GraphicsLayer*) const = 0;
virtual void platformLayerChanged(GraphicsLayer*, PlatformLayer* oldPlatformLayer, PlatformLayer* newPlatformLayer) = 0;
virtual float minimumDocumentScale() const = 0;
virtual bool allowCompositingLayerVisualDegradation() const = 0;
#ifndef NDEBUG
virtual void verifyNotPainting() { }
#endif
};
}
#endif // USE(ACCELERATED_COMPOSITING)
#endif // GraphicsLayerClient_h