• Vasiliy Telezhnikov's avatar
    Fix freeing DirectContextProvider on wrong thread · 9457a610
    Vasiliy Telezhnikov authored
    GLPixelBufferRGBAResult in GLRendererCopier hold reference to context
    provider. When the results are sent to different thread we force all
    GPU work to happen before in ReadPixelsWorkflow::Finish, but we still
    hold the reference. If the results will outlive the
    SkiaOutputSurfaceImplOnGpu it will be the last reference and
    DirectContextProvider will be destroyed on a wrong thread.
    
    This CL fixes this by dropping reference to context_provider when we
    don't need it anymore.
    
    Bug: 1035881
    Change-Id: I6e0bfe7013a61f96ec7f33d40bae377d6831ffc9
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2041800Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
    Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#739030}
    9457a610
gl_renderer_copier.cc 39.9 KB