From edaab94c2bc5b131dabff440e7ff3dfde6a012b7 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 5 Oct 2011 15:00:22 -0700 Subject: Force a repaint when hwc invalidate hook is called without this prepare() would be called but not set() since the dirty region is empty. Change-Id: I038acfbdad4c16015357ccde4d1949391d6f989d --- services/surfaceflinger/DisplayHardware/HWComposer.cpp | 2 +- services/surfaceflinger/SurfaceFlinger.h | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'services/surfaceflinger') diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 879e858..be9b226 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -75,7 +75,7 @@ void HWComposer::hook_invalidate(struct hwc_procs* procs) { } void HWComposer::invalidate() { - mFlinger->signalEvent(); + mFlinger->repaintEverything(); } void HWComposer::setFrameBuffer(EGLDisplay dpy, EGLSurface sur) { diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index 43191b7..128a64d 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -256,12 +256,11 @@ private: public: // hack to work around gcc 4.0.3 bug const GraphicPlane& graphicPlane(int dpy) const; GraphicPlane& graphicPlane(int dpy); -private: + void signalEvent(); + void repaintEverything(); - void waitForEvent(); -public: // hack to work around gcc 4.0.3 bug - void signalEvent(); private: + void waitForEvent(); void handleConsoleEvents(); void handleTransaction(uint32_t transactionFlags); void handleTransactionLocked(uint32_t transactionFlags); @@ -279,7 +278,6 @@ private: void postFramebuffer(); void setupHardwareComposer(Region& dirtyInOut); void composeSurfaces(const Region& dirty); - void repaintEverything(); ssize_t addClientLayer(const sp& client, -- cgit v1.1