Dropping SurfaceFrames from Drawing State
Our assumption is that a buffer committed into drawing state will be latched and presented. Based on this assumption, we present a BufferSurfaceFrame only at latch time instead of commit time. However, during back to back invalidates, there is a chance that the first committed buffer is not latched. It could be replaced by another buffer in the second invalidate. This leads to the SurfaceFrame getting stuck in the pending classification list. To prevent this, have a check in commitTransaction that drops the SurfaceFrame properly if it hasn't been presented before. Back to back invalidate can currently be triggered by just flashing a clean build and launching the dialer. Bug: 182214053 Test: libsurfaceflinger_unittest Change-Id: I6cd9c4cbfb2ca50b96654ed240664758dad86f19
Loading
Please register or sign in to comment