Dedicate a special caching slot for the layer override buffer
By using a special caching slot, this avoids import/freeBuffer churn in the composer process which can occur when a layer is no longer using an override buffer. Previously the layer's buffer would have been cached by a previous setBuffer call, but since the override buffer was clobbering a caching slot, replacing the override buffer requires re-importing the buffer. To resolve this, increase the size of the hwc buffer cache so it's ever so slightly less tied to buffer queue sizes, which allows for room for the override buffer which improves caching hit rate. On devices that don't have layer caching turned on, this is a functional no-op because those devices will never use the additional caching slot. Bug: 185570241 Test: libcompositionengine_test Test: Perfetto trace of opening and closing calculator app shows fewer import/free buffers in the composer process Change-Id: I219b1a1f6a31c5405736cb06d4921f300fe4a3ee
Loading
Please register or sign in to comment