Correctly set the viewport in layers.
Bug #2919295
Change-Id: I16ce79ab0d5747cb01c6c1abe531da3dfd93fb54
diff --git a/libs/hwui/Snapshot.h b/libs/hwui/Snapshot.h
index 9495bee..21b2bef 100644
--- a/libs/hwui/Snapshot.h
+++ b/libs/hwui/Snapshot.h
@@ -57,7 +57,8 @@
flags(0),
previous(s),
layer(NULL),
- fbo(s->fbo) {
+ fbo(s->fbo),
+ viewport(s->viewport) {
if ((s->flags & Snapshot::kFlagClipSet) &&
!(s->flags & Snapshot::kFlagDirtyLocalClip)) {
localClip.set(s->localClip);
@@ -180,6 +181,11 @@
GLuint fbo;
/**
+ * Current viewport.
+ */
+ Rect viewport;
+
+ /**
* Contains the previous ortho matrix.
*/
mat4 orthoMatrix;