summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Eric Hassold <hassold@google.com> 2011-03-11 12:24:23 -0800
committer Eric Hassold <hassold@google.com> 2011-03-11 12:24:23 -0800
commit7ffe3807506da6f052535ca0c790636e41a8e310 (patch)
tree80f322a8b8cb02907e553c90b498d81a7d354cdb
parenta82078459073d52ae66c4ea1814a7b9d86696f86 (diff)
Default to NONE format in Layer
mFormat is not initialized with any value in Layer constructor, causing a call to requestFormat() with no explicit format specified to fallback to some uninitialized value. Such invalid path actually detected by valgrind. Change-Id: Ib7faabcd61eaa26fb0ae7a9a486d9e258ba31b63
-rw-r--r--services/surfaceflinger/Layer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 57af001fab..bf1e9aabf7 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -60,7 +60,8 @@ Layer::Layer(SurfaceFlinger* flinger,
mProtectedByDRM(false),
mTextureManager(),
mBufferManager(mTextureManager),
- mWidth(0), mHeight(0), mNeedsScaling(false), mFixedSize(false)
+ mWidth(0), mHeight(0), mFormat(PIXEL_FORMAT_NONE),
+ mNeedsScaling(false), mFixedSize(false)
{
}