summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Snapshot.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Snapshot.h')
-rw-r--r--libs/hwui/Snapshot.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/hwui/Snapshot.h b/libs/hwui/Snapshot.h
index 3d74b4c..35cdf6f 100644
--- a/libs/hwui/Snapshot.h
+++ b/libs/hwui/Snapshot.h
@@ -43,7 +43,7 @@ namespace uirenderer {
*/
class Snapshot: public LightRefBase<Snapshot> {
public:
- Snapshot(): flags(0), previous(NULL), layer(NULL), fbo(0) {
+ Snapshot(): flags(0), previous(NULL), layer(NULL), fbo(0), invisible(false) {
transform = &mTransformRoot;
clipRect = &mClipRectRoot;
}
@@ -53,8 +53,8 @@ public:
* the previous snapshot.
*/
Snapshot(const sp<Snapshot>& s, int saveFlags):
- flags(0), previous(s), layer(NULL),
- fbo(s->fbo), viewport(s->viewport), height(s->height) {
+ flags(0), previous(s), layer(NULL), fbo(s->fbo),
+ invisible(s->invisible), viewport(s->viewport), height(s->height) {
if (saveFlags & SkCanvas::kMatrix_SaveFlag) {
mTransformRoot.load(*s->transform);
transform = &mTransformRoot;
@@ -212,6 +212,12 @@ public:
GLuint fbo;
/**
+ * Indicates that this snapshot is invisible and nothing should be drawn
+ * inside it.
+ */
+ bool invisible;
+
+ /**
* Current viewport.
*/
Rect viewport;