• liberato@chromium.org's avatar
    Moved CodecImage init from image provider to VideoFrameFactoryImpl. · 108da561
    liberato@chromium.org authored
    VideoFrameFactoryImpl can call CodecImage::Initialize when it gets
    the CodecImage from the SharedImageVideoProvider.  Previously, it
    forwarded the output buffer, etc., to the provider instead.
    
    The reason that the provider was responsible for it was to hide the
    fact that a CodecImage was involved at all; this is an
    implementation detail of the current SharedImageVideo.  However,
    since VideoFrameFactory already has to have the CodecImage for early
    rendering, it might as well handle initialization too.
    
    If we can deprecate early rendering, then we could just provide a
    callback in the ImageRecord instead, to hide CodecImage entirely.
    
    When we introduce image pooling, it's convenient to allocate images
    from a provider without actually initializing them at all; the pool
    can handle it when it hands them out to clients.
    
    Change-Id: I6a7c9d61306fd126cb77ba087f82e5a6ccb8d968
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1707549
    Commit-Queue: Frank Liberato <liberato@chromium.org>
    Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#678876}
    108da561
BUILD.gn 16.4 KB