Drop buffers for SurfaceFlinger properly

Drop buffers restrictively when consumer is SurfaceFlinger. When both
producer and consumer are controlled by app and timeout is not positive,
drop buffers for SurfaceFlinger.

Bug: 133214906
Change-Id: Ied102857673cbf36e51aac6abeea9abffbdcce67
(cherry picked from commit 45e9e0b133576dbfaf354ada2ab4179e9e4118b8)
2 files changed