diff options
| author | John Reck <jreck@google.com> | 2014-06-13 02:32:19 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-06-12 05:34:42 +0000 |
| commit | 816f71b7e0dc263362e9fc8d251c8d1944bff17c (patch) | |
| tree | 7f8dc82b247276502976e80945f5b86716d20b7e /libs/hwui/DamageAccumulator.h | |
| parent | c0daabbec3da4a39457ce62a15a909983a2368f1 (diff) | |
| parent | 25fbb3fa1138675379102a44405852555cefccbd (diff) | |
| download | frameworks_base-816f71b7e0dc263362e9fc8d251c8d1944bff17c.zip frameworks_base-816f71b7e0dc263362e9fc8d251c8d1944bff17c.tar.gz frameworks_base-816f71b7e0dc263362e9fc8d251c8d1944bff17c.tar.bz2 | |
Merge "Move LayerType to RenderNode"
Diffstat (limited to 'libs/hwui/DamageAccumulator.h')
| -rw-r--r-- | libs/hwui/DamageAccumulator.h | 10 |
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(); |
