• xidachen's avatar
    Return a transparent black ImageBitmap when mailbox is invalid · cf378d00
    xidachen authored
    In Webgl's transferToImageBitmap(), we create an ImageBitmap from the
    drawingBuffer's mailbox. When calling transferToImageBitmap() twice, the
    mailbox is invalid in the second call. In this case, we should return
    an ImageBitmap that is the same size as the drawingBuffer but should be
    transparent black.
    
    Corresponding layout test has been updated to reflect this case.
    
    BUG=627374
    CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel
    
    Review-Url: https://codereview.chromium.org/2139353003
    Cr-Commit-Position: refs/heads/master@{#405132}
    cf378d00
offscreenCanvas-transferToImageBitmap-invalid-mailbox.html 859 Bytes