surfaceflinger: refresh after latching any buffer am: a36bf92663
am: 81876de166
Change-Id: I6a62ab9052f47f9d97bc30029aa20546094ab9a7
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 6ed372c..392479f 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -408,6 +408,7 @@
* to figure out if the content or size of a surface has changed.
*/
Region latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime);
+ bool isBufferLatched() const { return mRefreshPending; }
bool isPotentialCursor() const { return mPotentialCursor;}
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 8ae091c..3fba609 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2456,7 +2456,7 @@
const Region dirty(layer->latchBuffer(visibleRegions, latchTime));
layer->useSurfaceDamage();
invalidateLayerStack(layer->getLayerStack(), dirty);
- if (!dirty.isEmpty()) {
+ if (layer->isBufferLatched()) {
newDataLatched = true;
}
}
@@ -2466,7 +2466,7 @@
// If we will need to wake up at some time in the future to deal with a
// queued frame that shouldn't be displayed during this vsync period, wake
// up during the next vsync period to check again.
- if (frameQueued && mLayersWithQueuedFrames.empty()) {
+ if (frameQueued && (mLayersWithQueuedFrames.empty() || !newDataLatched)) {
signalLayerUpdate();
}