Skip to content
  • dino@apple.com's avatar
    Video -> pixel buffer output should not manage color spaces · dd98e3a7
    dino@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=122486
    
    Reviewed by Tim Horton.
    
    Source/WebCore:
    
    On Mac, when we draw a video into a canvas or WebGL, the
    output of the video should not be color managed. Instead, leave it
    as DeviceRGB so that it matches other colors in those elements.
    We'll hopefully solve this properly soon - making everything sRGB.
    
    Test: media/video-canvas-drawing-output.html
    
    * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
    (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Pass on
    a CGImageRef via CGImageCreateCopyWithColorSpace rather than the raw data.
    (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Tell CoreImage
    to allocate a pixel buffer that is unmanaged.
    
    LayoutTests:
    
    * media/video-canvas-drawing-output-expected.txt: Added.
    * media/video-canvas-drawing-output.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    dd98e3a7