summaryrefslogtreecommitdiff
path: root/libs/hwui/TreeInfo.h
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2023-08-10 11:45:58 -0700
committer Ady Abraham <adyabr@google.com> 2023-08-10 22:58:02 +0000
commite088dcdce8ac7a947c2a2e4cd2ba6cea7a28e21c (patch)
treeae30522dd57246a56251368789c8a6402f519ffd /libs/hwui/TreeInfo.h
parentafce62fb455d3790f328b3582e681c6e27e86224 (diff)
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
Diffstat (limited to 'libs/hwui/TreeInfo.h')
-rw-r--r--libs/hwui/TreeInfo.h18
1 files changed, 10 insertions, 8 deletions
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 <utils/Timers.h>
-#include "SkSize.h"
+#include <optional>
#include <string>
+#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> skippedFrameReason;
// Sentinel for animatedImageDelay meaning there is no need to post such
// a message.
static constexpr nsecs_t kNoAnimatedImageDelay = -1;