summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 3070e45..441bad8 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -83,6 +83,10 @@
#include <cutils/compiler.h>
#include "DisplayUtils.h"
+#ifdef USES_HWC_SERVICES
+#include "ExynosHWCService.h"
+#endif
+
#define DISPLAY_COUNT 1
/*
@@ -131,6 +135,10 @@ static sp<Layer> lastSurfaceViewLayer;
// ---------------------------------------------------------------------------
+#ifdef USES_HWC_SERVICES
+static bool notifyPSRExit = true;
+#endif
+
SurfaceFlinger::SurfaceFlinger()
: BnSurfaceComposer(),
mTransactionFlags(0),
@@ -313,6 +321,14 @@ void SurfaceFlinger::bootFinished()
// formerly we would just kill the process, but we now ask it to exit so it
// can choose where to stop the animation.
property_set("service.bootanim.exit", "1");
+
+#ifdef USES_HWC_SERVICES
+ sp<IServiceManager> sm = defaultServiceManager();
+ sp<android::IExynosHWCService> hwc =
+ interface_cast<android::IExynosHWCService>(sm->getService(String16("Exynos.HWCService")));
+ ALOGD("boot finished. Inform HWC");
+ hwc->setBootFinished();
+#endif
}
void SurfaceFlinger::deleteTextureAsync(uint32_t texture) {
@@ -799,6 +815,19 @@ void SurfaceFlinger::signalTransaction() {
}
void SurfaceFlinger::signalLayerUpdate() {
+#ifdef USES_HWC_SERVICES
+ if (notifyPSRExit) {
+ notifyPSRExit = false;
+ sp<IServiceManager> sm = defaultServiceManager();
+ sp<IExynosHWCService> hwcService =
+ interface_cast<android::IExynosHWCService>(
+ sm->getService(String16("Exynos.HWCService")));
+ if (hwcService != NULL)
+ hwcService->notifyPSRExit();
+ else
+ ALOGE("HWCService::notifyPSRExit failed");
+ }
+#endif
mEventQueue.invalidate();
}
@@ -983,6 +1012,9 @@ void SurfaceFlinger::handleMessageRefresh() {
doDebugFlashRegions();
doComposition();
postComposition();
+#ifdef USES_HWC_SERVICES
+ notifyPSRExit = true;
+#endif
}
previousExpectedPresent = mPrimaryDispSync.computeNextRefresh(0);