Import GLFence in EndOverlayAccess for AHB
When using SurfaceControl after surface has been returned we need to wait until fence provided by system will be signaled. When using GL for compositing, this is implemented as importing provided file descriptor as egl fence and issue ServerWait(). GLRenderer does it when we get surface back. With SkiaRenderer it happens on next BeginWrite for the SharedImage. Import is expensive operation and BeginWrite is on critical path. This CL moves import to EndOverlayAccess as we will do it anyway. Then at BeginWrite time we only issue ServerWait(). In local tests with scrolling simple page it saves 200us in DrawToSwapUs metric. Change-Id: I6efb2783d0e287dc5e4fbb5707c507328e75a32f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2019607Reviewed-by:Jonathan Backer <backer@chromium.org> Reviewed-by:
Ken Buchanan <kenrb@chromium.org> Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org> Cr-Commit-Position: refs/heads/master@{#735577}
Showing
Please register or sign in to comment