Use hasSyncFramework value from configStore
Change-Id: I41c6b1a26001eb6ba08cbc419dc8a683f5722aa3
diff --git a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
index c184cd2..38304f5 100644
--- a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
+++ b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
@@ -115,6 +115,7 @@
int64_t SurfaceFlinger::dispSyncPresentTimeOffset;
bool SurfaceFlinger::useHwcForRgbToYuv;
uint64_t SurfaceFlinger::maxVirtualDisplaySize;
+bool SurfaceFlinger::hasSyncFramework;
SurfaceFlinger::SurfaceFlinger()
: BnSurfaceComposer(),
@@ -151,7 +152,6 @@
mLastSwapTime(0),
mNumLayers(0)
{
-
ALOGI("SurfaceFlinger is starting");
vsyncPhaseOffsetNs = getInt64< ISurfaceFlingerConfigs,
@@ -163,6 +163,9 @@
maxVirtualDisplaySize = getUInt64<ISurfaceFlingerConfigs,
&ISurfaceFlingerConfigs::maxVirtualDisplaySize>(0);
+ hasSyncFramework = getBool< ISurfaceFlingerConfigs,
+ &ISurfaceFlingerConfigs::hasSyncFramework>(true);
+
useContextPriority = getBool< ISurfaceFlingerConfigs,
&ISurfaceFlingerConfigs::useContextPriority>(false);
@@ -1285,7 +1288,7 @@
}
}
- if (kIgnorePresentFences) {
+ if (!hasSyncFramework) {
if (hw->isDisplayOn()) {
enableHardwareVsync();
}
@@ -3021,6 +3024,7 @@
result.appendFormat(" PRESENT_TIME_OFFSET=%" PRId64, dispSyncPresentTimeOffset);
result.appendFormat(" FORCE_HWC_FOR_RBG_TO_YUV=%d", useHwcForRgbToYuv);
result.appendFormat(" MAX_VIRT_DISPLAY_DIM=%" PRIu64, maxVirtualDisplaySize);
+ result.appendFormat(" RUNNING_WITHOUT_SYNC_FRAMEWORK=%d", !hasSyncFramework);
result.append("]");
}