Skip to content
  • tguilbert's avatar
    Add "repaint" option to PaintSingleFrame · 3a03dae9
    tguilbert authored
    The VideoFrameCompositor currently ignores calls to PaintSingleFrame()
    if the passed frame is the same as the last frame.
    
    StreamTextureWrapper's (STW) GetCurrentFrame() always returns the same
    frame, whilst the underlying texture information has been updated. This
    means that it is impossible to use STW's frame with the
    PaintSingleFrame() method.
    
    This change adds a "repaint_duplicate_frame" boolean to the
    PaintSingleFrame() method, allowing the MediaPlayerRendererClient to
    pass the STW's frame directly.
    
    Instead of using the VideoRendererSink interface:
    It would have been possible to have STW implement the
    VideoFrameProvider interface. This meant that WMPI would have had to
    own a STW and create a different VideoLayer, which would have been
    more complex to understand, and likely harder to maintain.
    
    Instead of using the PaintSingleFrame method:
    It would have also been possible to have STW implement the
    RenderCallback interface. However, this would lead to issues due the
    different rate at which Render() is called, versus the rate at which
    MediaPlayer actuall outputs frames (and would probably degrade
    performance).
    
    BUG=636002
    
    Review-Url: https://codereview.chromium.org/2239163002
    Cr-Commit-Position: refs/heads/master@{#411773}
    3a03dae9