Loading services/surfaceflinger/Android.bp +0 −3 Original line number Original line Diff line number Diff line Loading @@ -31,9 +31,6 @@ cc_defaults { "-Wconversion", "-Wconversion", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", ], ], static_libs: [ "libsurfaceflingerflags", ], } } cc_defaults { cc_defaults { Loading services/surfaceflinger/CompositionEngine/Android.bp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -63,6 +63,7 @@ cc_defaults { cc_library { cc_library { name: "libcompositionengine", name: "libcompositionengine", defaults: ["libcompositionengine_defaults"], defaults: ["libcompositionengine_defaults"], static_libs: ["libsurfaceflingerflags"], srcs: [ srcs: [ "src/planner/CachedSet.cpp", "src/planner/CachedSet.cpp", "src/planner/Flattener.cpp", "src/planner/Flattener.cpp", Loading Loading @@ -107,6 +108,7 @@ cc_library { "libgtest", "libgtest", "libgmock", "libgmock", "libcompositionengine", "libcompositionengine", "libsurfaceflingerflags_test", ], ], local_include_dirs: ["include"], local_include_dirs: ["include"], export_include_dirs: ["include"], export_include_dirs: ["include"], Loading Loading @@ -141,6 +143,7 @@ cc_test { "librenderengine_mocks", "librenderengine_mocks", "libgmock", "libgmock", "libgtest", "libgtest", "libsurfaceflingerflags_test", ], ], // For some reason, libvulkan isn't picked up from librenderengine // For some reason, libvulkan isn't picked up from librenderengine // Probably ASAN related? // Probably ASAN related? Loading services/surfaceflinger/Scheduler/VSyncDispatchTimerQueue.cpp +11 −2 Original line number Original line Diff line number Diff line Loading @@ -28,10 +28,13 @@ #include "VSyncDispatchTimerQueue.h" #include "VSyncDispatchTimerQueue.h" #include "VSyncTracker.h" #include "VSyncTracker.h" #include <com_android_graphics_surfaceflinger_flags.h> #undef LOG_TAG #undef LOG_TAG #define LOG_TAG "VSyncDispatch" #define LOG_TAG "VSyncDispatch" namespace android::scheduler { namespace android::scheduler { using namespace com::android::graphics::surfaceflinger; using base::StringAppendF; using base::StringAppendF; Loading Loading @@ -100,9 +103,15 @@ ScheduleResult VSyncDispatchTimerQueueEntry::schedule(VSyncDispatch::ScheduleTim mArmedInfo && (nextVsyncTime > (mArmedInfo->mActualVsyncTime + mMinVsyncDistance)); mArmedInfo && (nextVsyncTime > (mArmedInfo->mActualVsyncTime + mMinVsyncDistance)); bool const wouldSkipAWakeup = bool const wouldSkipAWakeup = mArmedInfo && ((nextWakeupTime > (mArmedInfo->mActualWakeupTime + mMinVsyncDistance))); mArmedInfo && ((nextWakeupTime > (mArmedInfo->mActualWakeupTime + mMinVsyncDistance))); if (flags::dont_skip_on_early()) { if (wouldSkipAVsyncTarget || wouldSkipAWakeup) { return getExpectedCallbackTime(mArmedInfo->mActualVsyncTime, timing); } } else { if (wouldSkipAVsyncTarget && wouldSkipAWakeup) { if (wouldSkipAVsyncTarget && wouldSkipAWakeup) { return getExpectedCallbackTime(nextVsyncTime, timing); return getExpectedCallbackTime(nextVsyncTime, timing); } } } nextVsyncTime = adjustVsyncIfNeeded(tracker, nextVsyncTime); nextVsyncTime = adjustVsyncIfNeeded(tracker, nextVsyncTime); nextWakeupTime = nextVsyncTime - timing.workDuration - timing.readyDuration; nextWakeupTime = nextVsyncTime - timing.workDuration - timing.readyDuration; Loading services/surfaceflinger/SurfaceFlinger.cpp +2 −0 Original line number Original line Diff line number Diff line Loading @@ -6446,6 +6446,8 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, const std::string& comp mMisc2FlagEarlyBootValue == mMisc2FlagLateBootValue ? "stable" : "modified"); mMisc2FlagEarlyBootValue == mMisc2FlagLateBootValue ? "stable" : "modified"); StringAppendF(&result, "VrrConfigFlagValue: %s\n", StringAppendF(&result, "VrrConfigFlagValue: %s\n", flagutils::vrrConfigEnabled() ? "true" : "false"); flagutils::vrrConfigEnabled() ? "true" : "false"); StringAppendF(&result, "DontSkipOnEarlyFlagValue: %s\n", flags::dont_skip_on_early() ? "true" : "false"); getRenderEngine().dump(result); getRenderEngine().dump(result); Loading services/surfaceflinger/surfaceflinger_flags.aconfig +7 −0 Original line number Original line Diff line number Diff line Loading @@ -38,3 +38,10 @@ flag { bug: "283055450" bug: "283055450" is_fixed_read_only: true is_fixed_read_only: true } } flag { name: "dont_skip_on_early" namespace: "core_graphics" description: "This flag is guarding the behaviour where SurfaceFlinger is trying to opportunistically present a frame when the configuration change from late to early" bug: "273702768" } Loading
services/surfaceflinger/Android.bp +0 −3 Original line number Original line Diff line number Diff line Loading @@ -31,9 +31,6 @@ cc_defaults { "-Wconversion", "-Wconversion", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", ], ], static_libs: [ "libsurfaceflingerflags", ], } } cc_defaults { cc_defaults { Loading
services/surfaceflinger/CompositionEngine/Android.bp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -63,6 +63,7 @@ cc_defaults { cc_library { cc_library { name: "libcompositionengine", name: "libcompositionengine", defaults: ["libcompositionengine_defaults"], defaults: ["libcompositionengine_defaults"], static_libs: ["libsurfaceflingerflags"], srcs: [ srcs: [ "src/planner/CachedSet.cpp", "src/planner/CachedSet.cpp", "src/planner/Flattener.cpp", "src/planner/Flattener.cpp", Loading Loading @@ -107,6 +108,7 @@ cc_library { "libgtest", "libgtest", "libgmock", "libgmock", "libcompositionengine", "libcompositionengine", "libsurfaceflingerflags_test", ], ], local_include_dirs: ["include"], local_include_dirs: ["include"], export_include_dirs: ["include"], export_include_dirs: ["include"], Loading Loading @@ -141,6 +143,7 @@ cc_test { "librenderengine_mocks", "librenderengine_mocks", "libgmock", "libgmock", "libgtest", "libgtest", "libsurfaceflingerflags_test", ], ], // For some reason, libvulkan isn't picked up from librenderengine // For some reason, libvulkan isn't picked up from librenderengine // Probably ASAN related? // Probably ASAN related? Loading
services/surfaceflinger/Scheduler/VSyncDispatchTimerQueue.cpp +11 −2 Original line number Original line Diff line number Diff line Loading @@ -28,10 +28,13 @@ #include "VSyncDispatchTimerQueue.h" #include "VSyncDispatchTimerQueue.h" #include "VSyncTracker.h" #include "VSyncTracker.h" #include <com_android_graphics_surfaceflinger_flags.h> #undef LOG_TAG #undef LOG_TAG #define LOG_TAG "VSyncDispatch" #define LOG_TAG "VSyncDispatch" namespace android::scheduler { namespace android::scheduler { using namespace com::android::graphics::surfaceflinger; using base::StringAppendF; using base::StringAppendF; Loading Loading @@ -100,9 +103,15 @@ ScheduleResult VSyncDispatchTimerQueueEntry::schedule(VSyncDispatch::ScheduleTim mArmedInfo && (nextVsyncTime > (mArmedInfo->mActualVsyncTime + mMinVsyncDistance)); mArmedInfo && (nextVsyncTime > (mArmedInfo->mActualVsyncTime + mMinVsyncDistance)); bool const wouldSkipAWakeup = bool const wouldSkipAWakeup = mArmedInfo && ((nextWakeupTime > (mArmedInfo->mActualWakeupTime + mMinVsyncDistance))); mArmedInfo && ((nextWakeupTime > (mArmedInfo->mActualWakeupTime + mMinVsyncDistance))); if (flags::dont_skip_on_early()) { if (wouldSkipAVsyncTarget || wouldSkipAWakeup) { return getExpectedCallbackTime(mArmedInfo->mActualVsyncTime, timing); } } else { if (wouldSkipAVsyncTarget && wouldSkipAWakeup) { if (wouldSkipAVsyncTarget && wouldSkipAWakeup) { return getExpectedCallbackTime(nextVsyncTime, timing); return getExpectedCallbackTime(nextVsyncTime, timing); } } } nextVsyncTime = adjustVsyncIfNeeded(tracker, nextVsyncTime); nextVsyncTime = adjustVsyncIfNeeded(tracker, nextVsyncTime); nextWakeupTime = nextVsyncTime - timing.workDuration - timing.readyDuration; nextWakeupTime = nextVsyncTime - timing.workDuration - timing.readyDuration; Loading
services/surfaceflinger/SurfaceFlinger.cpp +2 −0 Original line number Original line Diff line number Diff line Loading @@ -6446,6 +6446,8 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, const std::string& comp mMisc2FlagEarlyBootValue == mMisc2FlagLateBootValue ? "stable" : "modified"); mMisc2FlagEarlyBootValue == mMisc2FlagLateBootValue ? "stable" : "modified"); StringAppendF(&result, "VrrConfigFlagValue: %s\n", StringAppendF(&result, "VrrConfigFlagValue: %s\n", flagutils::vrrConfigEnabled() ? "true" : "false"); flagutils::vrrConfigEnabled() ? "true" : "false"); StringAppendF(&result, "DontSkipOnEarlyFlagValue: %s\n", flags::dont_skip_on_early() ? "true" : "false"); getRenderEngine().dump(result); getRenderEngine().dump(result); Loading
services/surfaceflinger/surfaceflinger_flags.aconfig +7 −0 Original line number Original line Diff line number Diff line Loading @@ -38,3 +38,10 @@ flag { bug: "283055450" bug: "283055450" is_fixed_read_only: true is_fixed_read_only: true } } flag { name: "dont_skip_on_early" namespace: "core_graphics" description: "This flag is guarding the behaviour where SurfaceFlinger is trying to opportunistically present a frame when the configuration change from late to early" bug: "273702768" }