diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h index 8a76d6b3fc7ae..6e3e43af8c6fb 100644 --- a/libs/hwui/renderthread/CanvasContext.h +++ b/libs/hwui/renderthread/CanvasContext.h @@ -242,7 +242,8 @@ private: nsecs_t queueDuration; }; - RingBuffer mSwapHistory; + // Need at least 4 because we do quad buffer. Add a 5th for good measure. + RingBuffer mSwapHistory; int64_t mFrameNumber = -1; // last vsync for a dropped frame due to stuffed queue