Fix drawing issues with layers.

Prior to this change layers would clip their content incorrectly. They would
also not apply alpha properly.

Change-Id: Id7b3aaa7dbdc51de68fe050e64458f68e40503fd
diff --git a/libs/hwui/Snapshot.h b/libs/hwui/Snapshot.h
index 21b2bef..97e7cae 100644
--- a/libs/hwui/Snapshot.h
+++ b/libs/hwui/Snapshot.h
@@ -42,7 +42,7 @@
  */
 class Snapshot: public LightRefBase<Snapshot> {
 public:
-    Snapshot(): flags(0), previous(NULL), layer(NULL), fbo(0) { }
+    Snapshot(): invisible(false), flags(0), previous(NULL), layer(NULL), fbo(0) { }
 
     /**
      * Copies the specified snapshot. Only the transform and clip rectangle
@@ -54,6 +54,7 @@
             height(s->height),
             transform(s->transform),
             clipRect(s->clipRect),
+            invisible(s->invisible),
             flags(0),
             previous(s),
             layer(NULL),
@@ -165,6 +166,11 @@
     Rect clipRect;
 
     /**
+     * If true, the layer won't be rendered.
+     */
+    bool invisible;
+
+    /**
      * Dirty flags.
      */
     int flags;