Don't dismiss picture buffers on rez change until they are available
This CL fixes a race where the code would call DismissPictureBuffer() on all output_picture_buffers_ once it detected a resolution change. However some of those picture buffers had yet to be displayed by the client. The client code, when asked to dismiss a picture buffer, only tries to detect if it is currently displaying that frame, and if not goes ahead and deletes the texture. This patch defers the dismissing of the picture buffers until the client calls RecyclePictureBuffer back with that stale buffer ID, meaning that the texture has been displayed and can be safely deleted. TEST: navigate to http://sr-repro.s3.amazonaws.com/gpudecode/repro-gpu-mbr.html, before CL there may be series of black frames when playing the video and it switches from 720p to 1080p. After the CL the black frames are gone. BUG=404817 Review URL: https://codereview.chromium.org/540043003 Cr-Commit-Position: refs/heads/master@{#293616}
Showing
Please register or sign in to comment