Merge "composer: Trigger refresh at the end of animation"
diff --git a/composer/hwc_display.cpp b/composer/hwc_display.cpp
index ac5a04b..a2a73d4 100755
--- a/composer/hwc_display.cpp
+++ b/composer/hwc_display.cpp
@@ -1217,6 +1217,16 @@
return HWC2::Error::None;
}
+HWC2::Error HWCDisplay::SetDisplayAnimating(bool animating) {
+ // Trigger refresh, when animation ends.
+ if (!animating) {
+ callbacks_->Refresh(id_);
+ }
+
+ animating_ = animating;
+ return HWC2::Error::None;
+}
+
HWC2::Error HWCDisplay::GetActiveConfig(hwc2_config_t *out_config) {
if (out_config == nullptr) {
return HWC2::Error::BadDisplay;
diff --git a/composer/hwc_display.h b/composer/hwc_display.h
index e5e40b5..758ee1c 100644
--- a/composer/hwc_display.h
+++ b/composer/hwc_display.h
@@ -406,10 +406,7 @@
float* out_min_luminance);
virtual HWC2::Error GetPerFrameMetadataKeys(uint32_t *out_num_keys,
PerFrameMetadataKey *out_keys);
- virtual HWC2::Error SetDisplayAnimating(bool animating) {
- animating_ = animating;
- return HWC2::Error::None;
- }
+ virtual HWC2::Error SetDisplayAnimating(bool animating);
virtual bool IsDisplayCommandMode();
virtual HWC2::Error SetQSyncMode(QSyncMode qsync_mode) {
return HWC2::Error::Unsupported;