| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
#ifndef GraphicsLayerQt_h |
|---|
| 21 |
#define GraphicsLayerQt_h |
|---|
| 22 |
|
|---|
| 23 |
#if USE(ACCELERATED_COMPOSITING) |
|---|
| 24 |
|
|---|
| 25 |
#include "GraphicsLayer.h" |
|---|
| 26 |
|
|---|
| 27 |
#include <QtCore/qglobal.h> |
|---|
| 28 |
|
|---|
| 29 |
#if QT_VERSION >= 0x040600 |
|---|
| 30 |
|
|---|
| 31 |
#include "GraphicsLayerClient.h" |
|---|
| 32 |
|
|---|
| 33 |
namespace WebCore { |
|---|
| 34 |
|
|---|
| 35 |
class GraphicsLayerQtImpl; |
|---|
| 36 |
|
|---|
| 37 |
class GraphicsLayerQt : public GraphicsLayer { |
|---|
| 38 |
friend class GraphicsLayerQtImpl; |
|---|
| 39 |
|
|---|
| 40 |
public: |
|---|
| 41 |
GraphicsLayerQt(GraphicsLayerClient*); |
|---|
| 42 |
virtual ~GraphicsLayerQt(); |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
virtual NativeLayer nativeLayer() const; |
|---|
| 46 |
virtual PlatformLayer* platformLayer() const; |
|---|
| 47 |
virtual void setNeedsDisplay(); |
|---|
| 48 |
virtual void setNeedsDisplayInRect(const FloatRect&); |
|---|
| 49 |
virtual void setParent(GraphicsLayer* layer); |
|---|
| 50 |
virtual void setName(const String& name); |
|---|
| 51 |
virtual bool setChildren(const Vector<GraphicsLayer*>&); |
|---|
| 52 |
virtual void addChild(GraphicsLayer*); |
|---|
| 53 |
virtual void addChildAtIndex(GraphicsLayer*, int index); |
|---|
| 54 |
virtual void addChildAbove(GraphicsLayer* layer, GraphicsLayer* sibling); |
|---|
| 55 |
virtual void addChildBelow(GraphicsLayer* layer, GraphicsLayer* sibling); |
|---|
| 56 |
virtual bool replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newChild); |
|---|
| 57 |
virtual void removeFromParent(); |
|---|
| 58 |
virtual void setMaskLayer(GraphicsLayer* layer); |
|---|
| 59 |
virtual void setPosition(const FloatPoint& p); |
|---|
| 60 |
virtual void setAnchorPoint(const FloatPoint3D& p); |
|---|
| 61 |
virtual void setSize(const FloatSize& size); |
|---|
| 62 |
virtual void setTransform(const TransformationMatrix& t); |
|---|
| 63 |
virtual void setChildrenTransform(const TransformationMatrix& t); |
|---|
| 64 |
virtual void setPreserves3D(bool b); |
|---|
| 65 |
virtual void setMasksToBounds(bool b); |
|---|
| 66 |
virtual void setDrawsContent(bool b); |
|---|
| 67 |
virtual void setBackgroundColor(const Color&); |
|---|
| 68 |
virtual void clearBackgroundColor(); |
|---|
| 69 |
virtual void setContentsOpaque(bool b); |
|---|
| 70 |
virtual void setBackfaceVisibility(bool b); |
|---|
| 71 |
virtual void setOpacity(float opacity); |
|---|
| 72 |
virtual void setContentsRect(const IntRect& r); |
|---|
| 73 |
virtual bool addAnimation(const KeyframeValueList&, const IntSize& boxSize, const Animation*, const String& keyframesName, double timeOffset); |
|---|
| 74 |
virtual void removeAnimationsForProperty(AnimatedPropertyID); |
|---|
| 75 |
virtual void removeAnimationsForKeyframes(const String& keyframesName); |
|---|
| 76 |
virtual void pauseAnimation(const String& keyframesName, double timeOffset); |
|---|
| 77 |
virtual void suspendAnimations(double time); |
|---|
| 78 |
virtual void resumeAnimations(); |
|---|
| 79 |
virtual void setContentsToImage(Image*); |
|---|
| 80 |
virtual void setContentsToMedia(PlatformLayer*); |
|---|
| 81 |
virtual void setContentsBackgroundColor(const Color&); |
|---|
| 82 |
virtual void setGeometryOrientation(CompositingCoordinatesOrientation orientation); |
|---|
| 83 |
virtual void setContentsOrientation(CompositingCoordinatesOrientation orientation); |
|---|
| 84 |
virtual void distributeOpacity(float); |
|---|
| 85 |
virtual float accumulatedOpacity() const; |
|---|
| 86 |
virtual void syncCompositingState(); |
|---|
| 87 |
|
|---|
| 88 |
private: |
|---|
| 89 |
OwnPtr<GraphicsLayerQtImpl> m_impl; |
|---|
| 90 |
}; |
|---|
| 91 |
|
|---|
| 92 |
#else |
|---|
| 93 |
|
|---|
| 94 |
namespace WebCore { |
|---|
| 95 |
|
|---|
| 96 |
class FloatPoint3D; |
|---|
| 97 |
class FloatValueList; |
|---|
| 98 |
class GraphicsContext; |
|---|
| 99 |
class Image; |
|---|
| 100 |
class IntSize; |
|---|
| 101 |
class TextStream; |
|---|
| 102 |
class TimingFunction; |
|---|
| 103 |
class TransformValueList; |
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 |
class GraphicsLayerQt : public GraphicsLayer { |
|---|
| 109 |
public: |
|---|
| 110 |
GraphicsLayerQt(GraphicsLayerClient*); |
|---|
| 111 |
virtual ~GraphicsLayerQt(); |
|---|
| 112 |
|
|---|
| 113 |
virtual void setNeedsDisplay(); |
|---|
| 114 |
|
|---|
| 115 |
virtual void setNeedsDisplayInRect(const FloatRect&); |
|---|
| 116 |
|
|---|
| 117 |
virtual bool animateTransform(const TransformValueList&, const IntSize&, const Animation*, double beginTime, bool isTransition); |
|---|
| 118 |
virtual bool animateFloat(AnimatedPropertyID, const FloatValueList&, const Animation*, double beginTime); |
|---|
| 119 |
}; |
|---|
| 120 |
#endif |
|---|
| 121 |
|
|---|
| 122 |
} |
|---|
| 123 |
#endif |
|---|
| 124 |
#endif |
|---|
| 125 |
|
|---|