Add a flag to set whether the overlay has been initialized.  Commit needs to be called at least once on each overlay, and it appears that sometimes this
doesn't happen because the visibility never changes.  With this change
the overlay parameter and position will be committed when either the visibility
of the window changes, or on the first call to visibility resolved, if it
hasn't already been done.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h
index 746790b..8057219 100644
--- a/libs/surfaceflinger/LayerBuffer.h
+++ b/libs/surfaceflinger/LayerBuffer.h
@@ -175,6 +175,7 @@
         int32_t mWidthStride;
         int32_t mHeightStride;
         mutable Mutex mLock;
+        bool mInitialized;
     };