Isolate tiling clip state from snapshot
bug:8409891
Snapshots frequently have their clip overwritten due to applying
deferred state - now, store tiling clip information in a separate
rect, outside of the snapshot so it isn't overwritten.
Change-Id: I21ca4c45dcd802eae99e8de86f11525196777ccb
diff --git a/libs/hwui/Snapshot.cpp b/libs/hwui/Snapshot.cpp
index 923913e..d26ee38 100644
--- a/libs/hwui/Snapshot.cpp
+++ b/libs/hwui/Snapshot.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#define LOG_TAG "OpenGLRenderer"
+
#include "Snapshot.h"
#include <SkCanvas.h>
@@ -199,5 +201,14 @@
return invisible || empty;
}
+void Snapshot::dump() const {
+ ALOGD("Snapshot %p, flags %x, prev %p, height %d, ignored %d, hasComplexClip %d",
+ this, flags, previous.get(), height, isIgnored(), clipRegion && !clipRegion->isEmpty());
+ ALOGD(" ClipRect (at %p) %.1f %.1f %.1f %.1f",
+ clipRect, clipRect->left, clipRect->top, clipRect->right, clipRect->bottom);
+ ALOGD(" Transform (at %p):", transform);
+ transform->dump();
+}
+
}; // namespace uirenderer
}; // namespace android