summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.h')
-rw-r--r--Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.h27
1 files changed, 8 insertions, 19 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.h b/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.h
index 9d7b530..713d06e 100644
--- a/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.h
+++ b/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.h
@@ -28,9 +28,7 @@
#if USE(ACCELERATED_COMPOSITING)
-#include "Color.h"
#include "GraphicsOperation.h"
-#include "IntRect.h"
#include "SkRefCnt.h"
namespace WebCore {
@@ -39,32 +37,23 @@ class PlatformGraphicsContext;
class GraphicsOperationCollection : public SkRefCnt {
public:
- GraphicsOperationCollection(const IntRect& drawArea);
+ GraphicsOperationCollection();
~GraphicsOperationCollection();
- void apply(PlatformGraphicsContext* context);
- void append(GraphicsOperation::Operation* operation);
+ void apply(PlatformGraphicsContext* context) const;
+ void adoptAndAppend(GraphicsOperation::Operation* operation);
+
+ // Moves all the operations from moveFrom into this collection
+ // moveFrom will be empty after this call
+ void transferFrom(GraphicsOperationCollection& moveFrom);
bool isEmpty();
+ void clear();
private:
- IntRect m_drawArea;
Vector<GraphicsOperation::Operation*> m_operations;
};
-class AutoGraphicsOperationCollection {
-public:
- AutoGraphicsOperationCollection(const IntRect& area);
- ~AutoGraphicsOperationCollection();
- GraphicsContext* context() { return m_graphicsContext; }
- GraphicsOperationCollection* picture() { return m_graphicsOperationCollection; }
-
-private:
- GraphicsOperationCollection* m_graphicsOperationCollection;
- PlatformGraphicsContext* m_platformGraphicsContext;
- GraphicsContext* m_graphicsContext;
-};
-
}
#endif // USE(ACCELERATED_COMPOSITING)