• liberato@chromium.org's avatar
    CodecImage should fail rather than dcheck if it's been recycled. · eede381b
    liberato@chromium.org authored
    Previously, CodecImage::Render...Buffer() methods would dcheck if
    there was no wait coordinator; this would indicate that it has
    been recycled before all uses were done.  It turns out, however,
    that it doesn't quite always imply that.
    
    During teardown of VideoFrameSubmitter (possibly when the renderer
    is destroyed, or just the video element), the VideoFrames held by
    the renderer are dropped.  This triggers recycling on the gpu side,
    and calls CodecImage::NotifyUnused.  Unfortunately, nobody ever
    got any returned resources from viz, so viz might still try to
    draw with the CodecImage.
    
    This CL just makes those calls fail, so we'll just use whatever
    was in the texture already.
    
    Bug: 1054528
    Change-Id: Iabe40d92e48f972381145a83e20ce35d1e0bf443
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078800
    Commit-Queue: Frank Liberato <liberato@chromium.org>
    Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
    Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#745295}
    eede381b
codec_image_unittest.cc 16.1 KB