graphics: require validateDisplay after onRefresh
After initialization or onRefresh, we want to make sure
validateDisplay is called before presentDisplay.
Bug: 67505273
Test: manual
Change-Id: Id876d9251586aaaf552ca82c52f8f902af364251
diff --git a/graphics/composer/2.1/default/Hwc.h b/graphics/composer/2.1/default/Hwc.h
index 7561327..cf6a72a 100644
--- a/graphics/composer/2.1/default/Hwc.h
+++ b/graphics/composer/2.1/default/Hwc.h
@@ -17,6 +17,7 @@
#ifndef ANDROID_HARDWARE_GRAPHICS_COMPOSER_V2_1_HWC_H
#define ANDROID_HARDWARE_GRAPHICS_COMPOSER_V2_1_HWC_H
+#include <atomic>
#include <condition_variable>
#include <memory>
#include <mutex>
@@ -215,6 +216,8 @@
std::condition_variable mClientDestroyedWait;
wp<ComposerClient> mClient;
+ std::atomic<bool> mMustValidateDisplay;
+
// If the HWC implementation version is < 2.0, use an adapter to interface
// between HWC 2.0 <-> HWC 1.X.
std::unique_ptr<HWC2On1Adapter> mAdapter;