summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DamageAccumulator.h
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-06-12 13:46:45 -0700
committerJohn Reck <jreck@google.com>2014-06-12 19:25:33 -0700
commit25fbb3fa1138675379102a44405852555cefccbd (patch)
tree510d62715f870f85fc4eea8a781c0265e7eebae5 /libs/hwui/DamageAccumulator.h
parenta447d29c65fb811cd184775a3476101a1cede929 (diff)
downloadframeworks_base-25fbb3fa1138675379102a44405852555cefccbd.zip
frameworks_base-25fbb3fa1138675379102a44405852555cefccbd.tar.gz
frameworks_base-25fbb3fa1138675379102a44405852555cefccbd.tar.bz2
Move LayerType to RenderNode
Change-Id: Icb79a5015cb0362b1f3a66d09007450730135a97
Diffstat (limited to 'libs/hwui/DamageAccumulator.h')
-rw-r--r--libs/hwui/DamageAccumulator.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/hwui/DamageAccumulator.h b/libs/hwui/DamageAccumulator.h
index 2ca30d4..fc9b41b 100644
--- a/libs/hwui/DamageAccumulator.h
+++ b/libs/hwui/DamageAccumulator.h
@@ -35,8 +35,10 @@ class IDamageAccumulator {
public:
virtual void pushTransform(const RenderNode* transform) = 0;
virtual void pushTransform(const Matrix4* transform) = 0;
+ virtual void pushNullTransform() = 0;
virtual void popTransform() = 0;
virtual void dirty(float left, float top, float right, float bottom) = 0;
+ virtual void peekAtDirty(SkRect* dest) = 0;
protected:
virtual ~IDamageAccumulator() {}
};
@@ -52,6 +54,9 @@ public:
// will be affected by the transform when popTransform() is called.
virtual void pushTransform(const RenderNode* transform);
virtual void pushTransform(const Matrix4* transform);
+ // This is used in combination with peekAtDirty to inspect the damage
+ // area of a subtree
+ virtual void pushNullTransform();
// Pops a transform node from the stack, propagating the dirty rect
// up to the parent node. Returns the IDamageTransform that was just applied
@@ -59,6 +64,9 @@ public:
virtual void dirty(float left, float top, float right, float bottom);
+ // Returns the current dirty area, *NOT* transformed by pushed transforms
+ virtual void peekAtDirty(SkRect* dest);
+
void finish(SkRect* totalDirty);
private:
@@ -75,8 +83,10 @@ class NullDamageAccumulator : public IDamageAccumulator {
public:
virtual void pushTransform(const RenderNode* transform) { }
virtual void pushTransform(const Matrix4* transform) { }
+ virtual void pushNullTransform() { }
virtual void popTransform() { }
virtual void dirty(float left, float top, float right, float bottom) { }
+ virtual void peekAtDirty(SkRect* dest) { dest->setEmpty(); }
ANDROID_API static NullDamageAccumulator* instance();