summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/TimeLord.cpp
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2020-10-15 11:45:45 -0700
committerDaniel Norman <danielnorman@google.com>2020-10-27 13:09:24 -0700
commit449f659b21d039b8692602294b040038ac1e6ccb (patch)
tree8d7f4ce2697ad1b591d2f953e69656bc9b0a4080 /libs/hwui/renderthread/TimeLord.cpp
parent5cced294627474a5a42b42e442a50690d5c76661 (diff)
parentfb4ede1992df0344082bbdac60bcbc2a3a0a65ba (diff)
Merge SP1A.201015.001
Change-Id: Ie33f12a2f4c73443640c28ad128be96b3533fd8c
Diffstat (limited to 'libs/hwui/renderthread/TimeLord.cpp')
-rw-r--r--libs/hwui/renderthread/TimeLord.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/TimeLord.cpp b/libs/hwui/renderthread/TimeLord.cpp
index 7dc36c449568..abb633028363 100644
--- a/libs/hwui/renderthread/TimeLord.cpp
+++ b/libs/hwui/renderthread/TimeLord.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "TimeLord.h"
+#include <limits>
namespace android {
namespace uirenderer {
@@ -22,12 +23,15 @@ namespace renderthread {
TimeLord::TimeLord() : mFrameIntervalNanos(milliseconds_to_nanoseconds(16)),
mFrameTimeNanos(0),
mFrameIntendedTimeNanos(0),
- mFrameVsyncId(-1) {}
+ mFrameVsyncId(-1),
+ mFrameDeadline(std::numeric_limits<int64_t>::max()){}
-bool TimeLord::vsyncReceived(nsecs_t vsync, nsecs_t intendedVsync, int64_t vsyncId) {
+bool TimeLord::vsyncReceived(nsecs_t vsync, nsecs_t intendedVsync, int64_t vsyncId,
+ int64_t frameDeadline) {
if (intendedVsync > mFrameIntendedTimeNanos) {
mFrameIntendedTimeNanos = intendedVsync;
mFrameVsyncId = vsyncId;
+ mFrameDeadline = frameDeadline;
}
if (vsync > mFrameTimeNanos) {