OSDN Git Service

INT_MAX nanoseconds is not very long
authorJohn Reck <jreck@google.com>
Tue, 24 Nov 2015 19:12:55 +0000 (11:12 -0800)
committerJohn Reck <jreck@google.com>
Tue, 24 Nov 2015 19:12:55 +0000 (11:12 -0800)
commit52b783f76af58a948dad4d3b4d1b7ad7979347ce
tree037e37a8502b6ffef9929f7de1dbdbddaee62dbf
parent1a3c1650ccc0b15668f44b2911f5daf93573c0e0
INT_MAX nanoseconds is not very long

Bug: 25843358

If the time between last swap & current vsync grew larger
than 2 seconds it would overflow when placed into an int, causing
frames to be dropped as negative numbers are definitely
less than 2_ms.

Change-Id: Icd2136989e5bbf5a0e21611b95a4d515b5ff9b14
libs/hwui/renderthread/CanvasContext.cpp