summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2022-06-04 00:35:38 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-06-04 00:35:38 +0000
commit36cff7cc0aca7da2fc0ce1bec22b00a7b4a4aabf (patch)
tree99fabb283d5a0fe04c9bce37098e59bd8a09f1f5
parentc226dcf6a2e9793dde56a01e4621f3de83986e7d (diff)
parenta7c45f4f5aa275628c2ad6e72ef12bed84535d0e (diff)
Merge "DO NOT MERGE: SurfaceControl: Ensure unused fields are zeroed" into sc-qpr1-dev
-rw-r--r--libs/gui/SurfaceControl.cpp1
-rw-r--r--libs/gui/include/gui/SurfaceControl.h13
2 files changed, 8 insertions, 6 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index 6529a4e51c..f93b799757 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -70,6 +70,7 @@ SurfaceControl::SurfaceControl(const sp<SurfaceControl>& other) {
mLayerId = other->mLayerId;
mWidth = other->mWidth;
mHeight = other->mHeight;
+ mFormat = other->mFormat;
mCreateFlags = other->mCreateFlags;
}
diff --git a/libs/gui/include/gui/SurfaceControl.h b/libs/gui/include/gui/SurfaceControl.h
index 9ee4636ae1..ed14ec6744 100644
--- a/libs/gui/include/gui/SurfaceControl.h
+++ b/libs/gui/include/gui/SurfaceControl.h
@@ -118,12 +118,13 @@ private:
mutable sp<Surface> mSurfaceData;
mutable sp<BLASTBufferQueue> mBbq;
mutable sp<SurfaceControl> mBbqChild;
- int32_t mLayerId;
- uint32_t mTransformHint;
- uint32_t mWidth;
- uint32_t mHeight;
- PixelFormat mFormat;
- uint32_t mCreateFlags;
+
+ int32_t mLayerId = 0;
+ uint32_t mTransformHint = 0;
+ uint32_t mWidth = 0;
+ uint32_t mHeight = 0;
+ PixelFormat mFormat = PIXEL_FORMAT_NONE;
+ uint32_t mCreateFlags = 0;
};
}; // namespace android