From e088dcdce8ac7a947c2a2e4cd2ba6cea7a28e21c Mon Sep 17 00:00:00 2001 From: Ady Abraham Date: Thu, 10 Aug 2023 11:45:58 -0700 Subject: hwui: add reason for skipped frames .. so we could report the unintentional skipped frames to Perfetto, rather than report undrawn frames as well. Test: manual Bug: 294884928 Change-Id: Ic49f4050cb3028d7adb5c930947ff6b72655d832 --- libs/hwui/TreeInfo.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'libs/hwui/TreeInfo.h') diff --git a/libs/hwui/TreeInfo.h b/libs/hwui/TreeInfo.h index 2bff9cb74fa7..ea25f68d7170 100644 --- a/libs/hwui/TreeInfo.h +++ b/libs/hwui/TreeInfo.h @@ -16,14 +16,16 @@ #pragma once -#include "Properties.h" -#include "utils/Macros.h" - #include -#include "SkSize.h" +#include #include +#include "Properties.h" +#include "SkSize.h" +#include "SkippedFrameInfo.h" +#include "utils/Macros.h" + namespace android { namespace uirenderer { @@ -110,13 +112,13 @@ public: // animate itself, such as if hasFunctors is true // This is only set if hasAnimations is true bool requiresUiRedraw = false; - // This is set to true if draw() can be called this frame - // false means that we must delay until the next vsync pulse as frame + // This is set to nullopt if draw() can be called this frame + // A value means that we must delay until the next vsync pulse as frame // production is outrunning consumption - // NOTE that if this is false CanvasContext will set either requiresUiRedraw + // NOTE that if this has a value CanvasContext will set either requiresUiRedraw // *OR* will post itself for the next vsync automatically, use this // only to avoid calling draw() - bool canDrawThisFrame = true; + std::optional skippedFrameReason; // Sentinel for animatedImageDelay meaning there is no need to post such // a message. static constexpr nsecs_t kNoAnimatedImageDelay = -1; -- cgit v1.2.3-59-g8ed1b