| Differences between
and this patch
- a/Source/WTF/ChangeLog +10 lines
Lines 1-3 a/Source/WTF/ChangeLog_sec1
1
2021-10-03  Cameron McCormack  <heycam@apple.com>
2
3
        Ensure CanvasRenderingContext2D.drawImage(video) uses the right color space
4
        https://bugs.webkit.org/show_bug.cgi?id=229025
5
        <rdar://problem/81828490>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        * wtf/PlatformHave.h: Add HAVE_CVBUFFERCOPYATTACHMENTS.
10
1
2021-10-03  Cameron McCormack  <heycam@apple.com>
11
2021-10-03  Cameron McCormack  <heycam@apple.com>
2
12
3
        Enable 2D canvas color space support on Apple platforms
13
        Enable 2D canvas color space support on Apple platforms
- a/Source/WebCore/ChangeLog +111 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2021-09-21  Cameron McCormack  <heycam@apple.com>
2
3
        Ensure CanvasRenderingContext2D.drawImage(video) uses the right color space
4
        https://bugs.webkit.org/show_bug.cgi?id=229025
5
        <rdar://problem/81828490>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        When GPU process media handling is disabled (and in the GPU process
10
        when it is handling a NativeImageForCurrentTime message),
11
        MediaPlayer::nativeImageForCurrentTime is used to get the video frame
12
        image. We make this return an image with the right color space on
13
        Apple platforms in PixelBufferConformerCV::createImageFromPixelBuffer.
14
15
        For now, we avoid using the correct color space when passing
16
        HTMLVideoElements to WebGLRenderingContext.texImage2D. The
17
        specification is unclear about what color space the texture data
18
        should be in, and implementations are currently interoperable in not
19
        converting the RGB color space of the video (such as Rec.601, Rec.709,
20
        etc.) into sRGB. To avoid the conversion, and effectively reinterpret
21
        the video RGB colors as sRGB, we make the ImageBuffer the video is
22
        drawn into have a matching color space, as it's the raw RGB values
23
        from the ImageBuffer that are uploade as the texture.
24
25
        (An alternative to this could be passing an argument through
26
        nativeImageForCurrentTime and paintCurrentFrameInContext, which says
27
        to avoid doing the conversion from video RGB to sRGB, but that needs a
28
        fair amount of plumbing.)
29
30
        If https://github.com/KhronosGroup/WebGL/issues/2165 is resolved, the
31
        changes to LRUImageBufferCache in this commit can be reverted, so that
32
        video frames are drawn into sRGB ImageBuffers again. (We'd also need
33
        something to make the copyToPlatformTexture() call in
34
        texImageSourceHelper do the correct color conversion somehow.)
35
36
        The now differing behavior between CanvasRenderingContext2D.drawImage
37
        and WebGLRenderingContext.texImage2D means that the WebGL conformance
38
        suite textures/misc/texture-corner-case-videos.html test fails, since
39
        it checks for incorrect 2D canvas video frame color conversion.
40
41
        Tests: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html
42
               imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html
43
44
        * html/HTMLVideoElement.cpp:
45
        (WebCore::HTMLVideoElement::colorSpace const): New function that
46
        exposes the color space of the current frame of the video.
47
        * html/HTMLVideoElement.h:
48
        * html/ImageBitmap.cpp:
49
        (WebCore::ImageBitmap::createPromise): Create the ImageBuffer in a
50
        color space that matches the video, not always sRGB.
51
        * html/canvas/WebGLRenderingContextBase.cpp:
52
        (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
53
        (WebCore::WebGLRenderingContextBase::videoFrameToImage): Use an
54
        ImageBuffer whose color space matches the video frame's color space.
55
        (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
56
        Add a DestinationColorSpace argument, so that the LRU cache is keyed
57
        off both size and color space.
58
        * html/canvas/WebGLRenderingContextBase.h:
59
        * platform/cocoa/CoreVideoSoftLink.cpp:
60
        * platform/cocoa/CoreVideoSoftLink.h: Add SPIs that let us get or
61
        compute a CGColorSpace from a CVPixelBuffer. Remove
62
        CVImageBufferGetColorSpace, which is unsused.
63
        * platform/graphics/MediaPlayer.cpp:
64
        (WebCore::MediaPlayer::colorSpace):
65
        * platform/graphics/MediaPlayer.h:
66
        * platform/graphics/MediaPlayerPrivate.h:
67
        (WebCore::MediaPlayerPrivateInterface::colorSpace):
68
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
69
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
70
        (WebCore::MediaPlayerPrivateAVFoundationCF::colorSpace):
71
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
72
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
73
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
74
        (WebCore::MediaPlayerPrivateAVFoundationObjC::colorSpace): Expose the
75
        color space of the current image. While we strictly only need the pixel
76
        buffer to be up to date, we call updateLastImage() since it has the
77
        UpdateSynchronously behavior, and the caller to colorSpace() will use
78
        the image soon anyway.
79
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
80
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
81
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::colorSpace):
82
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
83
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
84
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::colorSpace):
85
        * platform/graphics/cg/ColorSpaceCG.h:
86
        * platform/graphics/cv/CVUtilities.h:
87
        * platform/graphics/cv/CVUtilities.mm:
88
        (WebCore::createCGColorSpaceForCVPixelBuffer): New function to produce
89
        a CGColorSpace for a CVPixelBuffer. On macOS, this is stored as an
90
        attachment on the CVPixelBuffer. On iOS, we must call SPI to create a
91
        CGColorSpace based on the other color space information in the
92
        attachments. (It's possible we should cache the results of this
93
        function for a given set of color space attachments, since
94
        CVImageBufferCreateColorSpaceFromAttachments can end up creating a new
95
        CGColorSpace object every time it's called.)
96
        * platform/graphics/cv/PixelBufferConformerCV.cpp:
97
        (WebCore::PixelBufferConformerCV::createImageFromPixelBuffer): Create
98
        the CGImage in a color space matching the CVPixelBuffer.
99
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
100
        (WebCore::MediaPlayerPrivateGStreamer::colorSpace):
101
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
102
        * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
103
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
104
        (WebCore::MediaPlayerPrivateMediaFoundation::colorSpace):
105
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
106
        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
107
        (WebCore::MockMediaPlayerMediaSource::colorSpace):
108
        * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
109
        * svg/graphics/SVGImage.cpp:
110
        (WebCore::SVGImage::drawInternal):
111
1
2021-10-13  Sihui Liu  <sihui_liu@apple.com>
112
2021-10-13  Sihui Liu  <sihui_liu@apple.com>
2
113
3
        Implement FileSystemHandle move()
114
        Implement FileSystemHandle move()
- a/Source/WebKit/ChangeLog +44 lines
Lines 1-3 a/Source/WebKit/ChangeLog_sec1
1
2021-09-21  Cameron McCormack  <heycam@apple.com>
2
3
        Ensure CanvasRenderingContext2D.drawImage(video) uses the right color space
4
        https://bugs.webkit.org/show_bug.cgi?id=229025
5
        <rdar://problem/81828490>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        When GPU process media handling is enabled, ctx.drawImage(video)
10
        calls work by sending a NativeImageForCurrentTime message to the GPU
11
        process, which returns an IOSurface around which a CGImage is created.
12
        There's no good way to get the color space off the IOSurface, so we
13
        add a second return argument to NativeImageForCurrentTime to indicate
14
        the color space used.
15
16
        ImageBitmap creates an ImageBuffer for that image to be painted into,
17
        and for that we also need to know the color space of the video. The
18
        code that sends NativeImageForCurrentTime and then paints the
19
        resulting image into the GraphicsContext is further down. So we add
20
        a separate IPC message that gets the color space of the video's
21
        current frame. (It would be better if we could avoid a second
22
        synchronous IPC message call, but either ImageBitmap's scaling and
23
        cropping code, or the ImageBuffer creation call, would need to be moved
24
        down into MediaPlayerPrivateRemote::paintCurrentFrameInContext, which
25
        doesn't seem like the right place for it.)
26
27
        * GPUProcess/media/RemoteImageDecoderAVFProxy.cpp:
28
        (WebKit::RemoteImageDecoderAVFProxy::createFrameImageAtIndex):
29
        * GPUProcess/media/RemoteImageDecoderAVFProxy.h:
30
        * GPUProcess/media/RemoteMediaPlayerProxy.h:
31
        * GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
32
        * GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:
33
        (WebKit::RemoteMediaPlayerProxy::nativeImageForCurrentTime):
34
        (WebKit::RemoteMediaPlayerProxy::colorSpace):
35
        * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
36
        (WebKit::MediaPlayerPrivateRemote::colorSpace):
37
        * WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
38
        * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
39
        (WebKit::MediaPlayerPrivateRemote::nativeImageForCurrentTime): Add a
40
        second return argument to NativeImageForCurrentTime to indicate the
41
        color space of the returned IOSurface.
42
        (WebKit::MediaPlayerPrivateRemote::colorSpace): Add a new IPC message to
43
        get the color space of a video's current frame.
44
1
2021-10-13  Sihui Liu  <sihui_liu@apple.com>
45
2021-10-13  Sihui Liu  <sihui_liu@apple.com>
2
46
3
        Implement FileSystemHandle move()
47
        Implement FileSystemHandle move()
- a/Source/WTF/wtf/PlatformHave.h +7 lines
Lines 1057-1059 a/Source/WTF/wtf/PlatformHave.h_sec1
1057
#if PLATFORM(IOS)
1057
#if PLATFORM(IOS)
1058
#define HAVE_PUACTIVITYPROGRESSCONTROLLER 1
1058
#define HAVE_PUACTIVITYPROGRESSCONTROLLER 1
1059
#endif
1059
#endif
1060
1061
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) \
1062
    || (((PLATFORM(IOS) && !PLATFORM(IOS_FAMILY_SIMULATOR)) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000) \
1063
    || (PLATFORM(WATCHOS) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __WATCH_OS_VERSION_MIN_REQUIRED >= 80000) \
1064
    || (PLATFORM(APPLETV) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __TV_OS_VERSION_MIN_REQUIRED >= 150000)
1065
#define HAVE_CVBUFFERCOPYATTACHMENTS 1
1066
#endif
- a/Source/WebCore/html/HTMLVideoElement.cpp +9 lines
Lines 284-289 void HTMLVideoElement::mediaPlayerFirstVideoFrameAvailable() a/Source/WebCore/html/HTMLVideoElement.cpp_sec1
284
        renderer->updateFromElement();
284
        renderer->updateFromElement();
285
}
285
}
286
286
287
std::optional<DestinationColorSpace> HTMLVideoElement::colorSpace() const
288
{
289
    RefPtr<MediaPlayer> player = HTMLMediaElement::player();
290
    if (!player)
291
        return std::nullopt;
292
293
    return player->colorSpace();
294
}
295
287
RefPtr<ImageBuffer> HTMLVideoElement::createBufferForPainting(const FloatSize& size, RenderingMode renderingMode, const DestinationColorSpace& colorSpace, PixelFormat pixelFormat) const
296
RefPtr<ImageBuffer> HTMLVideoElement::createBufferForPainting(const FloatSize& size, RenderingMode renderingMode, const DestinationColorSpace& colorSpace, PixelFormat pixelFormat) const
288
{
297
{
289
    auto* hostWindow = document().view() && document().view()->root() ? document().view()->root()->hostWindow() : nullptr;
298
    auto* hostWindow = document().view() && document().view()->root() ? document().view()->root()->hostWindow() : nullptr;
- a/Source/WebCore/html/HTMLVideoElement.h +1 lines
Lines 78-83 public: a/Source/WebCore/html/HTMLVideoElement.h_sec1
78
    void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&);
78
    void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&);
79
79
80
    WEBCORE_EXPORT RefPtr<NativeImage> nativeImageForCurrentTime();
80
    WEBCORE_EXPORT RefPtr<NativeImage> nativeImageForCurrentTime();
81
    std::optional<DestinationColorSpace> colorSpace() const;
81
82
82
    WEBCORE_EXPORT bool shouldDisplayPosterImage() const;
83
    WEBCORE_EXPORT bool shouldDisplayPosterImage() const;
83
84
- a/Source/WebCore/html/ImageBitmap.cpp -2 / +6 lines
Lines 512-519 void ImageBitmap::createPromise(ScriptExecutionContext& scriptExecutionContext, a/Source/WebCore/html/ImageBitmap.cpp_sec1
512
512
513
    auto outputSize = outputSizeForSourceRectangle(sourceRectangle, options);
513
    auto outputSize = outputSizeForSourceRectangle(sourceRectangle, options);
514
514
515
    // FIXME: Add support for color spaces / pixel formats to ImageBitmap.
515
    auto colorSpace = video->colorSpace();
516
    auto bitmapData = video->createBufferForPainting(outputSize, bufferRenderingMode, DestinationColorSpace::SRGB(), PixelFormat::BGRA8);
516
    if (!colorSpace)
517
        colorSpace = DestinationColorSpace::SRGB();
518
519
    // FIXME: Add support for pixel formats to ImageBitmap.
520
    auto bitmapData = video->createBufferForPainting(outputSize, bufferRenderingMode, *colorSpace, PixelFormat::BGRA8);
517
    if (!bitmapData) {
521
    if (!bitmapData) {
518
        resolveWithBlankImageBuffer(scriptExecutionContext, !taintsOrigin(scriptExecutionContext.securityOrigin(), *video), WTFMove(promise));
522
        resolveWithBlankImageBuffer(scriptExecutionContext, !taintsOrigin(scriptExecutionContext.securityOrigin(), *video), WTFMove(promise));
519
        return;
523
        return;
- a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp -13 / +26 lines
Lines 5885-5891 RefPtr<Image> WebGLRenderingContextBase::drawImageIntoBuffer(Image& image, int w a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp_sec1
5885
{
5885
{
5886
    IntSize size(width, height);
5886
    IntSize size(width, height);
5887
    size.scale(deviceScaleFactor);
5887
    size.scale(deviceScaleFactor);
5888
    ImageBuffer* buf = m_generatedImageCache.imageBuffer(size);
5888
    ImageBuffer* buf = m_generatedImageCache.imageBuffer(size, DestinationColorSpace::SRGB());
5889
    if (!buf) {
5889
    if (!buf) {
5890
        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, functionName, "out of memory");
5890
        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, functionName, "out of memory");
5891
        return nullptr;
5891
        return nullptr;
Lines 5901-5906 RefPtr<Image> WebGLRenderingContextBase::drawImageIntoBuffer(Image& image, int w a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp_sec2
5901
5901
5902
RefPtr<Image> WebGLRenderingContextBase::videoFrameToImage(HTMLVideoElement* video, BackingStoreCopy backingStoreCopy, const char* functionName)
5902
RefPtr<Image> WebGLRenderingContextBase::videoFrameToImage(HTMLVideoElement* video, BackingStoreCopy backingStoreCopy, const char* functionName)
5903
{
5903
{
5904
    // FIXME: When texImage2D is passed an HTMLVideoElement, implementations
5905
    // interoperably use the native RGB color values of the video frame (e.g.
5906
    // Rec.601 color space values) for the texture. But nativeImageForCurrentTime
5907
    // and paintCurrentFrameInContext return and use an image with its color space
5908
    // correctly matching the video.
5909
    //
5910
    // https://github.com/KhronosGroup/WebGL/issues/2165 is open on converting
5911
    // the video element image source to sRGB instead of leaving it in its
5912
    // native RGB color space. For now, we make sure to paint into an
5913
    // ImageBuffer with a matching color space, to avoid the conversion.
5904
#if USE(AVFOUNDATION)
5914
#if USE(AVFOUNDATION)
5905
    auto nativeImage = video->nativeImageForCurrentTime();
5915
    auto nativeImage = video->nativeImageForCurrentTime();
5906
    // Currently we might be missing an image due to MSE not being able to provide the first requested frame.
5916
    // Currently we might be missing an image due to MSE not being able to provide the first requested frame.
Lines 5913-5919 RefPtr<Image> WebGLRenderingContextBase::videoFrameToImage(HTMLVideoElement* vid a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp_sec3
5913
        return nullptr;
5923
        return nullptr;
5914
    }
5924
    }
5915
    FloatRect imageRect { { }, imageSize };
5925
    FloatRect imageRect { { }, imageSize };
5916
    ImageBuffer* imageBuffer = m_generatedImageCache.imageBuffer(imageSize, CompositeOperator::Copy);
5926
    ImageBuffer* imageBuffer = m_generatedImageCache.imageBuffer(imageSize, nativeImage->colorSpace(), CompositeOperator::Copy);
5917
    if (!imageBuffer) {
5927
    if (!imageBuffer) {
5918
        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, functionName, "out of memory");
5928
        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, functionName, "out of memory");
5919
        return nullptr;
5929
        return nullptr;
Lines 5924-5930 RefPtr<Image> WebGLRenderingContextBase::videoFrameToImage(HTMLVideoElement* vid a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp_sec4
5924
    // video visible size is different to the natural size. This should be removed
5934
    // video visible size is different to the natural size. This should be removed
5925
    // once all platforms implement nativeImageForCurrentTime().
5935
    // once all platforms implement nativeImageForCurrentTime().
5926
    IntSize videoSize { static_cast<int>(video->videoWidth()), static_cast<int>(video->videoHeight()) };
5936
    IntSize videoSize { static_cast<int>(video->videoWidth()), static_cast<int>(video->videoHeight()) };
5927
    ImageBuffer* imageBuffer = m_generatedImageCache.imageBuffer(videoSize);
5937
    auto colorSpace = video->colorSpace();
5938
    if (!colorSpace)
5939
        colorSpace = DestinationColorSpace::SRGB();
5940
    ImageBuffer* imageBuffer = m_generatedImageCache.imageBuffer(videoSize, *colorSpace);
5928
    if (!imageBuffer) {
5941
    if (!imageBuffer) {
5929
        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, functionName, "out of memory");
5942
        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, functionName, "out of memory");
5930
        return nullptr;
5943
        return nullptr;
Lines 7778-7809 WebGLRenderingContextBase::LRUImageBufferCache::LRUImageBufferCache(int capacity a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp_sec5
7778
{
7791
{
7779
}
7792
}
7780
7793
7781
ImageBuffer* WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer(const IntSize& size, CompositeOperator fillOperator)
7794
ImageBuffer* WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer(const IntSize& size, DestinationColorSpace colorSpace, CompositeOperator fillOperator)
7782
{
7795
{
7783
    size_t i;
7796
    size_t i;
7784
    for (i = 0; i < m_buffers.size(); ++i) {
7797
    for (i = 0; i < m_buffers.size(); ++i) {
7785
        ImageBuffer* buf = m_buffers[i].get();
7798
        if (!m_buffers[i])
7786
        if (!buf)
7787
            break;
7799
            break;
7788
        if (buf->logicalSize() != size)
7800
        ImageBuffer& buf = m_buffers[i]->second.get();
7801
        if (m_buffers[i]->first != colorSpace || buf.logicalSize() != size)
7789
            continue;
7802
            continue;
7790
        bubbleToFront(i);
7803
        bubbleToFront(i);
7791
        if (fillOperator != CompositeOperator::Copy && fillOperator != CompositeOperator::Clear)
7804
        if (fillOperator != CompositeOperator::Copy && fillOperator != CompositeOperator::Clear)
7792
            buf->context().clearRect({ { }, size });
7805
            buf.context().clearRect({ { }, size });
7793
        return buf;
7806
        return &buf;
7794
    }
7807
    }
7795
7808
7796
    // FIXME (149423): Should this ImageBuffer be unconditionally unaccelerated?
7809
    // FIXME (149423): Should this ImageBuffer be unconditionally unaccelerated?
7797
    auto temp = ImageBuffer::create(size, RenderingMode::Unaccelerated, 1, DestinationColorSpace::SRGB(), PixelFormat::BGRA8);
7810
    auto temp = ImageBuffer::create(size, RenderingMode::Unaccelerated, 1, colorSpace, PixelFormat::BGRA8);
7798
    if (!temp)
7811
    if (!temp)
7799
        return nullptr;
7812
        return nullptr;
7800
    ASSERT(m_buffers.size() > 0);
7813
    ASSERT(m_buffers.size() > 0);
7801
    i = std::min(m_buffers.size() - 1, i);
7814
    i = std::min(m_buffers.size() - 1, i);
7802
    m_buffers[i] = WTFMove(temp);
7815
    m_buffers[i] = { colorSpace, temp.releaseNonNull() };
7803
7816
7804
    ImageBuffer* buf = m_buffers[i].get();
7817
    ImageBuffer& buf = m_buffers[i]->second.get();
7805
    bubbleToFront(i);
7818
    bubbleToFront(i);
7806
    return buf;
7819
    return &buf;
7807
}
7820
}
7808
7821
7809
void WebGLRenderingContextBase::LRUImageBufferCache::bubbleToFront(size_t idx)
7822
void WebGLRenderingContextBase::LRUImageBufferCache::bubbleToFront(size_t idx)
- a/Source/WebCore/html/canvas/WebGLRenderingContextBase.h -2 / +2 lines
Lines 621-630 protected: a/Source/WebCore/html/canvas/WebGLRenderingContextBase.h_sec1
621
        LRUImageBufferCache(int capacity);
621
        LRUImageBufferCache(int capacity);
622
        // Returns pointer to a cleared image buffer that is owned by the cache. The pointer is valid until next call.
622
        // Returns pointer to a cleared image buffer that is owned by the cache. The pointer is valid until next call.
623
        // Using fillOperator == CompositeOperator::Copy can be used to omit the clear of the buffer.
623
        // Using fillOperator == CompositeOperator::Copy can be used to omit the clear of the buffer.
624
        ImageBuffer* imageBuffer(const IntSize&, CompositeOperator fillOperator = CompositeOperator::SourceOver);
624
        ImageBuffer* imageBuffer(const IntSize&, DestinationColorSpace, CompositeOperator fillOperator = CompositeOperator::SourceOver);
625
    private:
625
    private:
626
        void bubbleToFront(size_t idx);
626
        void bubbleToFront(size_t idx);
627
        Vector<RefPtr<ImageBuffer>> m_buffers;
627
        Vector<std::optional<std::pair<DestinationColorSpace, Ref<ImageBuffer>>>> m_buffers;
628
    };
628
    };
629
    LRUImageBufferCache m_generatedImageCache { 0 };
629
    LRUImageBufferCache m_generatedImageCache { 0 };
630
630
- a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp -1 / +6 lines
Lines 32-38 typedef struct __IOSurface* IOSurfaceRef; a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp_sec1
32
32
33
SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, CoreVideo)
33
SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, CoreVideo)
34
34
35
#if HAVE(CVBUFFERCOPYATTACHMENTS)
36
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVBufferCopyAttachments, CFDictionaryRef, (CVBufferRef buffer, CVAttachmentMode mode), (buffer, mode))
37
#endif
35
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVBufferGetAttachment, CFTypeRef, (CVBufferRef buffer, CFStringRef key, CVAttachmentMode* attachmentMode), (buffer, key, attachmentMode))
38
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVBufferGetAttachment, CFTypeRef, (CVBufferRef buffer, CFStringRef key, CVAttachmentMode* attachmentMode), (buffer, key, attachmentMode))
39
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVBufferGetAttachments, CFDictionaryRef, (CVBufferRef buffer, CVAttachmentMode mode), (buffer, mode))
36
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetTypeID, CFTypeID, (), ())
40
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetTypeID, CFTypeID, (), ())
37
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetWidth, size_t, (CVPixelBufferRef pixelBuffer), (pixelBuffer))
41
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetWidth, size_t, (CVPixelBufferRef pixelBuffer), (pixelBuffer))
38
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetHeight, size_t, (CVPixelBufferRef pixelBuffer), (pixelBuffer))
42
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetHeight, size_t, (CVPixelBufferRef pixelBuffer), (pixelBuffer))
Lines 46-52 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferUnlockBaseAddress a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp_sec2
46
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferPoolCreate, CVReturn,(CFAllocatorRef allocator, CFDictionaryRef poolAttributes, CFDictionaryRef pixelBufferAttributes, CVPixelBufferPoolRef* poolOut), (allocator, poolAttributes, pixelBufferAttributes, poolOut))
50
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferPoolCreate, CVReturn,(CFAllocatorRef allocator, CFDictionaryRef poolAttributes, CFDictionaryRef pixelBufferAttributes, CVPixelBufferPoolRef* poolOut), (allocator, poolAttributes, pixelBufferAttributes, poolOut))
47
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferPoolCreatePixelBuffer, CVReturn, (CFAllocatorRef allocator, CVPixelBufferPoolRef pixelBufferPool, CVPixelBufferRef* pixelBufferOut), (allocator, pixelBufferPool, pixelBufferOut))
51
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferPoolCreatePixelBuffer, CVReturn, (CFAllocatorRef allocator, CVPixelBufferPoolRef pixelBufferPool, CVPixelBufferRef* pixelBufferOut), (allocator, pixelBufferPool, pixelBufferOut))
48
SOFT_LINK_FUNCTION_FOR_SOURCE_WITH_EXPORT(WebCore, CoreVideo, CVPixelBufferGetIOSurface, IOSurfaceRef, (CVPixelBufferRef pixelBuffer), (pixelBuffer), WEBCORE_EXPORT)
52
SOFT_LINK_FUNCTION_FOR_SOURCE_WITH_EXPORT(WebCore, CoreVideo, CVPixelBufferGetIOSurface, IOSurfaceRef, (CVPixelBufferRef pixelBuffer), (pixelBuffer), WEBCORE_EXPORT)
49
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVImageBufferGetColorSpace, CGColorSpaceRef, (CVImageBufferRef pixelBuffer), (pixelBuffer))
53
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVImageBufferCreateColorSpaceFromAttachments, CGColorSpaceRef, (CFDictionaryRef attachments), (attachments))
50
54
51
SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(WebCore, CoreVideo, kCVPixelBufferPixelFormatTypeKey, CFStringRef, WEBCORE_EXPORT)
55
SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(WebCore, CoreVideo, kCVPixelBufferPixelFormatTypeKey, CFStringRef, WEBCORE_EXPORT)
52
SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreVideo, kCVPixelBufferCGBitmapContextCompatibilityKey, CFStringRef)
56
SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreVideo, kCVPixelBufferCGBitmapContextCompatibilityKey, CFStringRef)
Lines 72-77 SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreVideo, kCVImageBufferTransferFunction a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp_sec3
72
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(WebCore, CoreVideo, kCVImageBufferYCbCrMatrix_DCI_P3, CFStringRef)
76
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(WebCore, CoreVideo, kCVImageBufferYCbCrMatrix_DCI_P3, CFStringRef)
73
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(WebCore, CoreVideo, kCVImageBufferYCbCrMatrix_P3_D65, CFStringRef)
77
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(WebCore, CoreVideo, kCVImageBufferYCbCrMatrix_P3_D65, CFStringRef)
74
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(WebCore, CoreVideo, kCVImageBufferYCbCrMatrix_ITU_R_2020, CFStringRef)
78
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(WebCore, CoreVideo, kCVImageBufferYCbCrMatrix_ITU_R_2020, CFStringRef)
79
SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreVideo, kCVImageBufferCGColorSpaceKey, CFStringRef)
75
80
76
#if USE(OPENGL_ES)
81
#if USE(OPENGL_ES)
77
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVOpenGLESTextureCacheCreate, CVReturn, (CFAllocatorRef allocator, CFDictionaryRef cacheAttributes, CVEAGLContext eaglContext, CFDictionaryRef textureAttributes, CVOpenGLESTextureCacheRef* cacheOut), (allocator, cacheAttributes, eaglContext, textureAttributes, cacheOut))
82
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVOpenGLESTextureCacheCreate, CVReturn, (CFAllocatorRef allocator, CFDictionaryRef cacheAttributes, CVEAGLContext eaglContext, CFDictionaryRef textureAttributes, CVOpenGLESTextureCacheRef* cacheOut), (allocator, cacheAttributes, eaglContext, textureAttributes, cacheOut))
- a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h -2 / +10 lines
Lines 32-39 typedef struct __IOSurface* IOSurfaceRef; a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h_sec1
32
32
33
SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, CoreVideo)
33
SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, CoreVideo)
34
34
35
#if HAVE(CVBUFFERCOPYATTACHMENTS)
36
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVBufferCopyAttachments, CFDictionaryRef, (CVBufferRef buffer, CVAttachmentMode mode), (buffer, mode))
37
#define CVBufferCopyAttachments softLink_CoreVideo_CVBufferCopyAttachments
38
#endif
35
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVBufferGetAttachment, CFTypeRef, (CVBufferRef buffer, CFStringRef key, CVAttachmentMode* attachmentMode), (buffer, key, attachmentMode))
39
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVBufferGetAttachment, CFTypeRef, (CVBufferRef buffer, CFStringRef key, CVAttachmentMode* attachmentMode), (buffer, key, attachmentMode))
36
#define CVBufferGetAttachment softLink_CoreVideo_CVBufferGetAttachment
40
#define CVBufferGetAttachment softLink_CoreVideo_CVBufferGetAttachment
41
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVBufferGetAttachments, CFDictionaryRef, (CVBufferRef buffer, CVAttachmentMode mode), (buffer, mode))
42
#define CVBufferGetAttachments softLink_CoreVideo_CVBufferGetAttachments
37
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferGetTypeID, CFTypeID, (), ())
43
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferGetTypeID, CFTypeID, (), ())
38
#define CVPixelBufferGetTypeID softLink_CoreVideo_CVPixelBufferGetTypeID
44
#define CVPixelBufferGetTypeID softLink_CoreVideo_CVPixelBufferGetTypeID
39
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferGetWidth, size_t, (CVPixelBufferRef pixelBuffer), (pixelBuffer))
45
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferGetWidth, size_t, (CVPixelBufferRef pixelBuffer), (pixelBuffer))
Lines 62-69 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferGetIOSurface, IOS a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h_sec2
62
#define CVPixelBufferGetIOSurface softLink_CoreVideo_CVPixelBufferGetIOSurface
68
#define CVPixelBufferGetIOSurface softLink_CoreVideo_CVPixelBufferGetIOSurface
63
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferPoolGetPixelBufferAttributes, CFDictionaryRef, (CVPixelBufferPoolRef pool), (pool))
69
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferPoolGetPixelBufferAttributes, CFDictionaryRef, (CVPixelBufferPoolRef pool), (pool))
64
#define CVPixelBufferPoolGetPixelBufferAttributes softLink_CoreVideo_CVPixelBufferPoolGetPixelBufferAttributes
70
#define CVPixelBufferPoolGetPixelBufferAttributes softLink_CoreVideo_CVPixelBufferPoolGetPixelBufferAttributes
65
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVImageBufferGetColorSpace, CGColorSpaceRef, (CVImageBufferRef pixelBuffer), (pixelBuffer))
71
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVImageBufferCreateColorSpaceFromAttachments, CGColorSpaceRef, (CFDictionaryRef attachments), (attachments))
66
#define CVImageBufferGetColorSpace softLink_CoreVideo_CVImageBufferGetColorSpace
72
#define CVImageBufferCreateColorSpaceFromAttachments softLink_CoreVideo_CVImageBufferCreateColorSpaceFromAttachments
67
73
68
SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, CoreVideo, kCVPixelBufferPixelFormatTypeKey, CFStringRef)
74
SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, CoreVideo, kCVPixelBufferPixelFormatTypeKey, CFStringRef)
69
#define kCVPixelBufferPixelFormatTypeKey get_CoreVideo_kCVPixelBufferPixelFormatTypeKey()
75
#define kCVPixelBufferPixelFormatTypeKey get_CoreVideo_kCVPixelBufferPixelFormatTypeKey()
Lines 111-116 SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, CoreVideo, kCVImageBufferTransferFunction a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h_sec3
111
#define kCVImageBufferTransferFunction_ITU_R_709_2 get_CoreVideo_kCVImageBufferTransferFunction_ITU_R_709_2()
117
#define kCVImageBufferTransferFunction_ITU_R_709_2 get_CoreVideo_kCVImageBufferTransferFunction_ITU_R_709_2()
112
SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, CoreVideo, kCVImageBufferTransferFunction_SMPTE_240M_1995, CFStringRef)
118
SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, CoreVideo, kCVImageBufferTransferFunction_SMPTE_240M_1995, CFStringRef)
113
#define kCVImageBufferTransferFunction_SMPTE_240M_1995 get_CoreVideo_kCVImageBufferTransferFunction_SMPTE_240M_1995()
119
#define kCVImageBufferTransferFunction_SMPTE_240M_1995 get_CoreVideo_kCVImageBufferTransferFunction_SMPTE_240M_1995()
120
SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, CoreVideo, kCVImageBufferCGColorSpaceKey, CFStringRef)
121
#define kCVImageBufferCGColorSpaceKey get_CoreVideo_kCVImageBufferCGColorSpaceKey()
114
122
115
#if USE(OPENGL_ES)
123
#if USE(OPENGL_ES)
116
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVOpenGLESTextureCacheCreate, CVReturn, (CFAllocatorRef allocator, CFDictionaryRef cacheAttributes, CVEAGLContext eaglContext, CFDictionaryRef textureAttributes, CVOpenGLESTextureCacheRef* cacheOut), (allocator, cacheAttributes, eaglContext, textureAttributes, cacheOut))
124
SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVOpenGLESTextureCacheCreate, CVReturn, (CFAllocatorRef allocator, CFDictionaryRef cacheAttributes, CVEAGLContext eaglContext, CFDictionaryRef textureAttributes, CVOpenGLESTextureCacheRef* cacheOut), (allocator, cacheAttributes, eaglContext, textureAttributes, cacheOut))
- a/Source/WebCore/platform/graphics/MediaPlayer.cpp +6 lines
Lines 157-162 public: a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec1
157
    void setSize(const IntSize&) final { }
157
    void setSize(const IntSize&) final { }
158
158
159
    void paint(GraphicsContext&, const FloatRect&) final { }
159
    void paint(GraphicsContext&, const FloatRect&) final { }
160
    DestinationColorSpace colorSpace() final { return DestinationColorSpace::SRGB(); }
160
161
161
    bool hasSingleSecurityOrigin() const final { return true; }
162
    bool hasSingleSecurityOrigin() const final { return true; }
162
};
163
};
Lines 1073-1078 RefPtr<NativeImage> MediaPlayer::nativeImageForCurrentTime() a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec2
1073
    return m_private->nativeImageForCurrentTime();
1074
    return m_private->nativeImageForCurrentTime();
1074
}
1075
}
1075
1076
1077
DestinationColorSpace MediaPlayer::colorSpace()
1078
{
1079
    return m_private->colorSpace();
1080
}
1081
1076
MediaPlayer::SupportsType MediaPlayer::supportsType(const MediaEngineSupportParameters& parameters)
1082
MediaPlayer::SupportsType MediaPlayer::supportsType(const MediaEngineSupportParameters& parameters)
1077
{
1083
{
1078
    // 4.8.10.3 MIME types - The canPlayType(type) method must return the empty string if type is a type that the 
1084
    // 4.8.10.3 MIME types - The canPlayType(type) method must return the empty string if type is a type that the 
- a/Source/WebCore/platform/graphics/MediaPlayer.h +1 lines
Lines 469-474 public: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec1
469
#endif
469
#endif
470
470
471
    RefPtr<NativeImage> nativeImageForCurrentTime();
471
    RefPtr<NativeImage> nativeImageForCurrentTime();
472
    DestinationColorSpace colorSpace();
472
473
473
    using MediaPlayerEnums::NetworkState;
474
    using MediaPlayerEnums::NetworkState;
474
    NetworkState networkState();
475
    NetworkState networkState();
- a/Source/WebCore/platform/graphics/MediaPlayerPrivate.h +1 lines
Lines 182-187 public: a/Source/WebCore/platform/graphics/MediaPlayerPrivate.h_sec1
182
    virtual RetainPtr<CVPixelBufferRef> pixelBufferForCurrentTime() { return nullptr; }
182
    virtual RetainPtr<CVPixelBufferRef> pixelBufferForCurrentTime() { return nullptr; }
183
#endif
183
#endif
184
    virtual RefPtr<NativeImage> nativeImageForCurrentTime() { return nullptr; }
184
    virtual RefPtr<NativeImage> nativeImageForCurrentTime() { return nullptr; }
185
    virtual DestinationColorSpace colorSpace() = 0;
185
186
186
    virtual void setPreload(MediaPlayer::Preload) { }
187
    virtual void setPreload(MediaPlayer::Preload) { }
187
188
- a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h +1 lines
Lines 191-196 protected: a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h_sec1
191
    std::unique_ptr<PlatformTimeRanges> buffered() const override;
191
    std::unique_ptr<PlatformTimeRanges> buffered() const override;
192
    bool didLoadingProgress() const override;
192
    bool didLoadingProgress() const override;
193
    void paint(GraphicsContext&, const FloatRect&) override = 0;
193
    void paint(GraphicsContext&, const FloatRect&) override = 0;
194
    DestinationColorSpace colorSpace() override = 0;
194
    void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&) override = 0;
195
    void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&) override = 0;
195
    void setPreload(MediaPlayer::Preload) override;
196
    void setPreload(MediaPlayer::Preload) override;
196
    PlatformLayer* platformLayer() const override { return 0; }
197
    PlatformLayer* platformLayer() const override { return 0; }
- a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp +5 lines
Lines 907-912 void MediaPlayerPrivateAVFoundationCF::paint(GraphicsContext& context, const Flo a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp_sec1
907
    m_videoFrameHasDrawn = true;
907
    m_videoFrameHasDrawn = true;
908
}
908
}
909
909
910
DestinationColorSpace MediaPlayerPrivateAVFoundationCF::colorSpace()
911
{
912
    return DestinationColorSpace::SRGB();
913
}
914
910
#if HAVE(AVFOUNDATION_LOADER_DELEGATE) && ENABLE(LEGACY_ENCRYPTED_MEDIA)
915
#if HAVE(AVFOUNDATION_LOADER_DELEGATE) && ENABLE(LEGACY_ENCRYPTED_MEDIA)
911
916
912
static bool keySystemIsSupported(const String& keySystem)
917
static bool keySystemIsSupported(const String& keySystem)
- a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h +1 lines
Lines 76-81 private: a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h_sec1
76
    virtual void setVolume(float);
76
    virtual void setVolume(float);
77
    void setClosedCaptionsVisible(bool) override;
77
    void setClosedCaptionsVisible(bool) override;
78
    virtual void paint(GraphicsContext&, const FloatRect&);
78
    virtual void paint(GraphicsContext&, const FloatRect&);
79
    DestinationColorSpace colorSpace() override;
79
    virtual void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&);
80
    virtual void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&);
80
    virtual PlatformLayer* platformLayer() const;
81
    virtual PlatformLayer* platformLayer() const;
81
    virtual bool supportsAcceleratedRendering() const { return true; }
82
    virtual bool supportsAcceleratedRendering() const { return true; }
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h +1 lines
Lines 259-264 private: a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h_sec1
259
    bool videoOutputHasAvailableFrame();
259
    bool videoOutputHasAvailableFrame();
260
    void paintWithVideoOutput(GraphicsContext&, const FloatRect&);
260
    void paintWithVideoOutput(GraphicsContext&, const FloatRect&);
261
    RefPtr<NativeImage> nativeImageForCurrentTime() final;
261
    RefPtr<NativeImage> nativeImageForCurrentTime() final;
262
    DestinationColorSpace colorSpace() final;
262
    void waitForVideoOutputMediaDataWillChange();
263
    void waitForVideoOutputMediaDataWillChange();
263
264
264
    RetainPtr<CVPixelBufferRef> pixelBufferForCurrentTime() final;
265
    RetainPtr<CVPixelBufferRef> pixelBufferForCurrentTime() final;
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm +10 lines
Lines 36-41 a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec1
36
#import "AuthenticationChallenge.h"
36
#import "AuthenticationChallenge.h"
37
#import "CDMInstanceFairPlayStreamingAVFObjC.h"
37
#import "CDMInstanceFairPlayStreamingAVFObjC.h"
38
#import "CDMSessionAVFoundationObjC.h"
38
#import "CDMSessionAVFoundationObjC.h"
39
#import "CVUtilities.h"
39
#import "ColorSpaceCG.h"
40
#import "ColorSpaceCG.h"
40
#import "Cookie.h"
41
#import "Cookie.h"
41
#import "DeprecatedGlobalSettings.h"
42
#import "DeprecatedGlobalSettings.h"
Lines 2591-2596 RefPtr<NativeImage> MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTim a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec2
2591
    return m_lastImage;
2592
    return m_lastImage;
2592
}
2593
}
2593
2594
2595
DestinationColorSpace MediaPlayerPrivateAVFoundationObjC::colorSpace()
2596
{
2597
    updateLastImage(UpdateType::UpdateSynchronously);
2598
    if (!m_lastPixelBuffer)
2599
        return DestinationColorSpace::SRGB();
2600
2601
    return DestinationColorSpace(createCGColorSpaceForCVPixelBuffer(m_lastPixelBuffer.get()));
2602
}
2603
2594
void MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange()
2604
void MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange()
2595
{
2605
{
2596
    if (m_waitForVideoOutputMediaDataWillChangeTimedOut)
2606
    if (m_waitForVideoOutputMediaDataWillChangeTimedOut)
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h +1 lines
Lines 222-227 private: a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h_sec1
222
    void paint(GraphicsContext&, const FloatRect&) override;
222
    void paint(GraphicsContext&, const FloatRect&) override;
223
    void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&) override;
223
    void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&) override;
224
    RetainPtr<CVPixelBufferRef> pixelBufferForCurrentTime() final;
224
    RetainPtr<CVPixelBufferRef> pixelBufferForCurrentTime() final;
225
    DestinationColorSpace colorSpace() final;
225
226
226
    bool supportsAcceleratedRendering() const override;
227
    bool supportsAcceleratedRendering() const override;
227
    // called when the rendering system flips the into or out of accelerated rendering mode.
228
    // called when the rendering system flips the into or out of accelerated rendering mode.
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm +6 lines
Lines 731-736 RetainPtr<CVPixelBufferRef> MediaPlayerPrivateMediaSourceAVFObjC::pixelBufferFor a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm_sec1
731
    return m_lastPixelBuffer;
731
    return m_lastPixelBuffer;
732
}
732
}
733
733
734
DestinationColorSpace MediaPlayerPrivateMediaSourceAVFObjC::colorSpace()
735
{
736
    updateLastImage();
737
    return m_lastImage ? m_lastImage->colorSpace() : DestinationColorSpace::SRGB();
738
}
739
734
bool MediaPlayerPrivateMediaSourceAVFObjC::hasAvailableVideoFrame() const
740
bool MediaPlayerPrivateMediaSourceAVFObjC::hasAvailableVideoFrame() const
735
{
741
{
736
    return m_hasAvailableVideoFrame;
742
    return m_hasAvailableVideoFrame;
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h +1 lines
Lines 142-147 private: a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h_sec1
142
142
143
    void paint(GraphicsContext&, const FloatRect&) override;
143
    void paint(GraphicsContext&, const FloatRect&) override;
144
    void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&) override;
144
    void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&) override;
145
    DestinationColorSpace colorSpace() override;
145
    bool metaDataAvailable() const { return m_mediaStreamPrivate && m_readyState >= MediaPlayer::ReadyState::HaveMetadata; }
146
    bool metaDataAvailable() const { return m_mediaStreamPrivate && m_readyState >= MediaPlayer::ReadyState::HaveMetadata; }
146
147
147
    void acceleratedRenderingStateChanged() final { updateLayersAsNeeded(); }
148
    void acceleratedRenderingStateChanged() final { updateLayersAsNeeded(); }
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm +6 lines
Lines 1007-1012 void MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext(GraphicsCo a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm_sec1
1007
    context.drawNativeImage(*image, imageRect.size(), transformedDestRect, imageRect);
1007
    context.drawNativeImage(*image, imageRect.size(), transformedDestRect, imageRect);
1008
}
1008
}
1009
1009
1010
DestinationColorSpace MediaPlayerPrivateMediaStreamAVFObjC::colorSpace()
1011
{
1012
    updateCurrentFrameImage();
1013
    return m_imagePainter.cgImage ? m_imagePainter.cgImage->colorSpace() : DestinationColorSpace::SRGB();
1014
}
1015
1010
void MediaPlayerPrivateMediaStreamAVFObjC::updateLayersAsNeeded()
1016
void MediaPlayerPrivateMediaStreamAVFObjC::updateLayersAsNeeded()
1011
{
1017
{
1012
    if (m_player->renderingCanBeAccelerated())
1018
    if (m_player->renderingCanBeAccelerated())
- a/Source/WebCore/platform/graphics/cg/ColorSpaceCG.h -1 / +3 lines
Lines 26-34 a/Source/WebCore/platform/graphics/cg/ColorSpaceCG.h_sec1
26
#pragma once
26
#pragma once
27
27
28
#include "ColorSpace.h"
28
#include "ColorSpace.h"
29
#include <CoreGraphics/CoreGraphics.h>
29
#include <optional>
30
#include <optional>
31
#include <wtf/cf/TypeCastsCF.h>
30
32
31
typedef struct CGColorSpace *CGColorSpaceRef;
33
WTF_DECLARE_CF_TYPE_TRAIT(CGColorSpace);
32
34
33
namespace WebCore {
35
namespace WebCore {
34
36
- a/Source/WebCore/platform/graphics/cv/CVUtilities.h +2 lines
Lines 30-35 a/Source/WebCore/platform/graphics/cv/CVUtilities.h_sec1
30
#include <wtf/Expected.h>
30
#include <wtf/Expected.h>
31
#include <wtf/RetainPtr.h>
31
#include <wtf/RetainPtr.h>
32
32
33
using CGColorSpaceRef = struct CGColorSpace*;
33
using CVPixelBufferPoolRef = struct __CVPixelBufferPool*;
34
using CVPixelBufferPoolRef = struct __CVPixelBufferPool*;
34
using CVPixelBufferRef = struct __CVBuffer*;
35
using CVPixelBufferRef = struct __CVBuffer*;
35
36
Lines 43-46 WEBCORE_EXPORT Expected<RetainPtr<CVPixelBufferRef>, CVReturn> createCVPixelBuff a/Source/WebCore/platform/graphics/cv/CVUtilities.h_sec2
43
44
44
WEBCORE_EXPORT Expected<RetainPtr<CVPixelBufferRef>, CVReturn> createCVPixelBuffer(IOSurfaceRef);
45
WEBCORE_EXPORT Expected<RetainPtr<CVPixelBufferRef>, CVReturn> createCVPixelBuffer(IOSurfaceRef);
45
46
47
RetainPtr<CGColorSpaceRef> createCGColorSpaceForCVPixelBuffer(CVPixelBufferRef);
46
}
48
}
- a/Source/WebCore/platform/graphics/cv/CVUtilities.mm +23 lines
Lines 107-110 Expected<RetainPtr<CVPixelBufferRef>, CVReturn> createCVPixelBuffer(IOSurfaceRef a/Source/WebCore/platform/graphics/cv/CVUtilities.mm_sec1
107
    return adoptCF(pixelBuffer);
107
    return adoptCF(pixelBuffer);
108
}
108
}
109
109
110
RetainPtr<CGColorSpaceRef> createCGColorSpaceForCVPixelBuffer(CVPixelBufferRef buffer)
111
{
112
    if (CGColorSpaceRef colorSpace = dynamic_cf_cast<CGColorSpaceRef>(CVBufferGetAttachment(buffer, kCVImageBufferCGColorSpaceKey, nullptr)))
113
        return colorSpace;
114
115
    RetainPtr<CFDictionaryRef> attachments;
116
#if HAVE(CVBUFFERCOPYATTACHMENTS)
117
    attachments = adoptCF(CVBufferCopyAttachments(buffer, kCVAttachmentMode_ShouldPropagate));
118
#else
119
    attachments = CVBufferGetAttachments(buffer, kCVAttachmentMode_ShouldPropagate);
120
#endif
121
    if (auto colorSpace = adoptCF(CVImageBufferCreateColorSpaceFromAttachments(attachments.get())))
122
        return colorSpace;
123
124
    // We should only get here with content that has a broken embedded ICC
125
    // profile; in all other cases VideoToolbox should have put either known
126
    // accurate or guessed color space attachments on the pixel buffer. Content
127
    // that requires an embedded ICC profile is unlikely to be presented
128
    // correctly with any particular fallback color space we choose, so we
129
    // choose sRGB for ease.
130
    return sRGBColorSpaceRef();
131
}
132
110
}
133
}
- a/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp -1 / +4 lines
Lines 26-31 a/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "PixelBufferConformerCV.h"
27
#include "PixelBufferConformerCV.h"
28
28
29
#include "CVUtilities.h"
29
#include "GraphicsContextCG.h"
30
#include "GraphicsContextCG.h"
30
#include "ImageBufferUtilitiesCG.h"
31
#include "ImageBufferUtilitiesCG.h"
31
#include "Logging.h"
32
#include "Logging.h"
Lines 165-170 RetainPtr<CGImageRef> PixelBufferConformerCV::createImageFromPixelBuffer(CVPixel a/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp_sec2
165
    if (!byteLength)
166
    if (!byteLength)
166
        return nullptr;
167
        return nullptr;
167
168
169
    auto colorSpace = createCGColorSpaceForCVPixelBuffer(rawBuffer);
170
168
    CVPixelBufferInfo* info = new CVPixelBufferInfo();
171
    CVPixelBufferInfo* info = new CVPixelBufferInfo();
169
    info->pixelBuffer = WTFMove(buffer);
172
    info->pixelBuffer = WTFMove(buffer);
170
    info->lockCount = 0;
173
    info->lockCount = 0;
Lines 172-178 RetainPtr<CGImageRef> PixelBufferConformerCV::createImageFromPixelBuffer(CVPixel a/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp_sec3
172
    CGDataProviderDirectCallbacks providerCallbacks = { 0, CVPixelBufferGetBytePointerCallback, CVPixelBufferReleaseBytePointerCallback, 0, CVPixelBufferReleaseInfoCallback };
175
    CGDataProviderDirectCallbacks providerCallbacks = { 0, CVPixelBufferGetBytePointerCallback, CVPixelBufferReleaseBytePointerCallback, 0, CVPixelBufferReleaseInfoCallback };
173
    RetainPtr<CGDataProviderRef> provider = adoptCF(CGDataProviderCreateDirect(info, byteLength, &providerCallbacks));
176
    RetainPtr<CGDataProviderRef> provider = adoptCF(CGDataProviderCreateDirect(info, byteLength, &providerCallbacks));
174
177
175
    return adoptCF(CGImageCreate(width, height, 8, 32, bytesPerRow, sRGBColorSpaceRef(), bitmapInfo, provider.get(), nullptr, false, kCGRenderingIntentDefault));
178
    return adoptCF(CGImageCreate(width, height, 8, 32, bytesPerRow, colorSpace.get(), bitmapInfo, provider.get(), nullptr, false, kCGRenderingIntentDefault));
176
}
179
}
177
180
178
}
181
}
- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +5 lines
Lines 3264-3269 void MediaPlayerPrivateGStreamer::paint(GraphicsContext& context, const FloatRec a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp_sec1
3264
    context.drawImage(gstImage->image(), rect, imageRect, { gstImage->hasAlpha() ? CompositeOperator::SourceOver : CompositeOperator::Copy, m_videoSourceOrientation });
3264
    context.drawImage(gstImage->image(), rect, imageRect, { gstImage->hasAlpha() ? CompositeOperator::SourceOver : CompositeOperator::Copy, m_videoSourceOrientation });
3265
}
3265
}
3266
3266
3267
DestinationColorSpace MediaPlayerPrivateGStreamer::colorSpace()
3268
{
3269
    return DestinationColorSpace::SRGB();
3270
}
3271
3267
#if USE(GSTREAMER_GL)
3272
#if USE(GSTREAMER_GL)
3268
bool MediaPlayerPrivateGStreamer::copyVideoTextureToPlatformTexture(GraphicsContextGL* context, PlatformGLObject outputTexture, GCGLenum outputTarget, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY)
3273
bool MediaPlayerPrivateGStreamer::copyVideoTextureToPlatformTexture(GraphicsContextGL* context, PlatformGLObject outputTexture, GCGLenum outputTarget, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY)
3269
{
3274
{
- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h +1 lines
Lines 181-186 public: a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h_sec1
181
    AudioSourceProvider* audioSourceProvider() final;
181
    AudioSourceProvider* audioSourceProvider() final;
182
#endif
182
#endif
183
    void paint(GraphicsContext&, const FloatRect&) final;
183
    void paint(GraphicsContext&, const FloatRect&) final;
184
    DestinationColorSpace colorSpace() final;
184
    bool supportsFullscreen() const final;
185
    bool supportsFullscreen() const final;
185
    MediaPlayer::MovieLoadType movieLoadType() const final;
186
    MediaPlayer::MovieLoadType movieLoadType() const final;
186
187
- a/Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h +2 lines
Lines 87-92 public: a/Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h_sec1
87
87
88
    void paint(GraphicsContext&, const FloatRect&) final { };
88
    void paint(GraphicsContext&, const FloatRect&) final { };
89
89
90
    DestinationColorSpace colorSpace() final { return DestinationColorSpace::SRGB(); }
91
90
    bool supportsAcceleratedRendering() const final { return true; }
92
    bool supportsAcceleratedRendering() const final { return true; }
91
93
92
    bool shouldIgnoreIntrinsicSize() final { return true; }
94
    bool shouldIgnoreIntrinsicSize() final { return true; }
- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp +5 lines
Lines 358-363 void MediaPlayerPrivateMediaFoundation::paint(GraphicsContext& context, const Fl a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp_sec1
358
        m_presenter->paintCurrentFrame(context, rect);
358
        m_presenter->paintCurrentFrame(context, rect);
359
}
359
}
360
360
361
DestinationColorSpace MediaPlayerPrivateMediaFoundation::colorSpace()
362
{
363
    return DestinationColorSpace::SRGB();
364
}
365
361
bool MediaPlayerPrivateMediaFoundation::createSession()
366
bool MediaPlayerPrivateMediaFoundation::createSession()
362
{
367
{
363
    if (FAILED(MFStartup(MF_VERSION, MFSTARTUP_FULL)))
368
    if (FAILED(MFStartup(MF_VERSION, MFSTARTUP_FULL)))
- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h +2 lines
Lines 100-105 public: a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h_sec1
100
100
101
    void paint(GraphicsContext&, const FloatRect&) final;
101
    void paint(GraphicsContext&, const FloatRect&) final;
102
102
103
    DestinationColorSpace colorSpace() final;
104
103
private:
105
private:
104
    float maxTimeLoaded() const { return m_maxTimeLoaded; }
106
    float maxTimeLoaded() const { return m_maxTimeLoaded; }
105
107
- a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp +5 lines
Lines 298-303 std::optional<VideoPlaybackQualityMetrics> MockMediaPlayerMediaSource::videoPlay a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp_sec1
298
    return m_mediaSourcePrivate ? m_mediaSourcePrivate->videoPlaybackQualityMetrics() : std::nullopt;
298
    return m_mediaSourcePrivate ? m_mediaSourcePrivate->videoPlaybackQualityMetrics() : std::nullopt;
299
}
299
}
300
300
301
DestinationColorSpace MockMediaPlayerMediaSource::colorSpace()
302
{
303
    return DestinationColorSpace::SRGB();
304
}
305
301
}
306
}
302
307
303
#endif
308
#endif
- a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h +1 lines
Lines 89-94 private: a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h_sec1
89
    MediaTime durationMediaTime() const override;
89
    MediaTime durationMediaTime() const override;
90
    void seekWithTolerance(const MediaTime&, const MediaTime&, const MediaTime&) override;
90
    void seekWithTolerance(const MediaTime&, const MediaTime&, const MediaTime&) override;
91
    std::optional<VideoPlaybackQualityMetrics> videoPlaybackQualityMetrics() override;
91
    std::optional<VideoPlaybackQualityMetrics> videoPlaybackQualityMetrics() override;
92
    DestinationColorSpace colorSpace() override;
92
93
93
    MediaPlayer* m_player;
94
    MediaPlayer* m_player;
94
    RefPtr<MockMediaSourcePrivate> m_mediaSourcePrivate;
95
    RefPtr<MockMediaSourcePrivate> m_mediaSourcePrivate;
- a/Source/WebCore/svg/graphics/SVGImage.cpp +1 lines
Lines 320-325 ImageDrawResult SVGImage::drawInternal(GraphicsContext& context, const FloatRect a/Source/WebCore/svg/graphics/SVGImage.cpp_sec1
320
        context.setCompositeOperation(CompositeOperator::SourceOver, BlendMode::Normal);
320
        context.setCompositeOperation(CompositeOperator::SourceOver, BlendMode::Normal);
321
    }
321
    }
322
322
323
    // FIXME: We should honor options.orientation(), since ImageBitmap's flipY handling relies on it. https://bugs.webkit.org/show_bug.cgi?id=231001
323
    FloatSize scale(dstRect.size() / srcRect.size());
324
    FloatSize scale(dstRect.size() / srcRect.size());
324
    
325
    
325
    // We can only draw the entire frame, clipped to the rect we want. So compute where the top left
326
    // We can only draw the entire frame, clipped to the rect we want. So compute where the top left
- a/Source/WebKit/GPUProcess/media/RemoteImageDecoderAVFProxy.cpp -9 / +8 lines
Lines 113-140 void RemoteImageDecoderAVFProxy::setData(ImageDecoderIdentifier identifier, cons a/Source/WebKit/GPUProcess/media/RemoteImageDecoderAVFProxy.cpp_sec1
113
    completionHandler(frameCount, imageDecoder->size(), imageDecoder->hasTrack(), WTFMove(frameInfos));
113
    completionHandler(frameCount, imageDecoder->size(), imageDecoder->hasTrack(), WTFMove(frameInfos));
114
}
114
}
115
115
116
void RemoteImageDecoderAVFProxy::createFrameImageAtIndex(ImageDecoderIdentifier identifier, size_t index, CompletionHandler<void(std::optional<WTF::MachSendRight>&&, std::optional<WebCore::DestinationColorSpace>&&)>&& completionHandler)
116
void RemoteImageDecoderAVFProxy::createFrameImageAtIndex(ImageDecoderIdentifier identifier, size_t index, CompletionHandler<void(std::optional<WTF::MachSendRight>&&, WebCore::DestinationColorSpace)>&& completionHandler)
117
{
117
{
118
    ASSERT(m_imageDecoders.contains(identifier));
118
    ASSERT(m_imageDecoders.contains(identifier));
119
    std::optional<WTF::MachSendRight> sendRight;
120
    std::optional<WebCore::DestinationColorSpace> colorSpace;
121
    if (!m_imageDecoders.contains(identifier)) {
119
    if (!m_imageDecoders.contains(identifier)) {
122
        completionHandler(WTFMove(sendRight), WTFMove(colorSpace));
120
        completionHandler(std::nullopt, DestinationColorSpace::SRGB());
123
        return;
121
        return;
124
    }
122
    }
125
123
126
    auto frameImage = m_imageDecoders.get(identifier)->createFrameImageAtIndex(index);
124
    auto frameImage = m_imageDecoders.get(identifier)->createFrameImageAtIndex(index);
127
    if (!frameImage) {
125
    if (!frameImage) {
128
        completionHandler(WTFMove(sendRight), WTFMove(colorSpace));
126
        completionHandler(std::nullopt, DestinationColorSpace::SRGB());
129
        return;
127
        return;
130
    }
128
    }
131
129
132
    if (auto surface = IOSurface::createFromImage(frameImage.get())) {
130
    auto surface = IOSurface::createFromImage(frameImage.get());
133
        sendRight = surface->createSendRight();
131
    if (!surface) {
134
        colorSpace = surface->colorSpace();
132
        completionHandler(std::nullopt, DestinationColorSpace::SRGB());
133
        return;
135
    }
134
    }
136
135
137
    completionHandler(WTFMove(sendRight), WTFMove(colorSpace));
136
    completionHandler(surface->createSendRight(), surface->colorSpace());
138
}
137
}
139
138
140
void RemoteImageDecoderAVFProxy::clearFrameBufferCache(ImageDecoderIdentifier identifier, size_t index)
139
void RemoteImageDecoderAVFProxy::clearFrameBufferCache(ImageDecoderIdentifier identifier, size_t index)
- a/Source/WebKit/GPUProcess/media/RemoteImageDecoderAVFProxy.h -1 / +1 lines
Lines 56-62 private: a/Source/WebKit/GPUProcess/media/RemoteImageDecoderAVFProxy.h_sec1
56
    void deleteDecoder(WebCore::ImageDecoderIdentifier);
56
    void deleteDecoder(WebCore::ImageDecoderIdentifier);
57
    void setExpectedContentSize(WebCore::ImageDecoderIdentifier, long long expectedContentSize);
57
    void setExpectedContentSize(WebCore::ImageDecoderIdentifier, long long expectedContentSize);
58
    void setData(WebCore::ImageDecoderIdentifier, const IPC::DataReference&, bool allDataReceived, CompletionHandler<void(size_t frameCount, const WebCore::IntSize& size, bool hasTrack, std::optional<Vector<WebCore::ImageDecoder::FrameInfo>>&&)>&&);
58
    void setData(WebCore::ImageDecoderIdentifier, const IPC::DataReference&, bool allDataReceived, CompletionHandler<void(size_t frameCount, const WebCore::IntSize& size, bool hasTrack, std::optional<Vector<WebCore::ImageDecoder::FrameInfo>>&&)>&&);
59
    void createFrameImageAtIndex(WebCore::ImageDecoderIdentifier, size_t index, CompletionHandler<void(std::optional<WTF::MachSendRight>&&, std::optional<WebCore::DestinationColorSpace>&&)>&&);
59
    void createFrameImageAtIndex(WebCore::ImageDecoderIdentifier, size_t index, CompletionHandler<void(std::optional<WTF::MachSendRight>&&, WebCore::DestinationColorSpace)>&&);
60
    void clearFrameBufferCache(WebCore::ImageDecoderIdentifier, size_t index);
60
    void clearFrameBufferCache(WebCore::ImageDecoderIdentifier, size_t index);
61
61
62
    void encodedDataStatusChanged(WebCore::ImageDecoderIdentifier);
62
    void encodedDataStatusChanged(WebCore::ImageDecoderIdentifier);
- a/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h -1 / +2 lines
Lines 311-317 private: a/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h_sec1
311
    void currentTimeChanged(const MediaTime&);
311
    void currentTimeChanged(const MediaTime&);
312
312
313
#if PLATFORM(COCOA)
313
#if PLATFORM(COCOA)
314
    void nativeImageForCurrentTime(CompletionHandler<void(std::optional<WTF::MachSendRight>&&)>&&);
314
    void nativeImageForCurrentTime(CompletionHandler<void(std::optional<WTF::MachSendRight>&&, WebCore::DestinationColorSpace)>&&);
315
    void colorSpace(CompletionHandler<void(WebCore::DestinationColorSpace)>&&);
315
#endif
316
#endif
316
#if USE(AVFOUNDATION)
317
#if USE(AVFOUNDATION)
317
    void pixelBufferForCurrentTimeIfChanged(CompletionHandler<void(std::optional<RetainPtr<CVPixelBufferRef>>&&)>&&);
318
    void pixelBufferForCurrentTimeIfChanged(CompletionHandler<void(std::optional<RetainPtr<CVPixelBufferRef>>&&)>&&);
- a/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in -1 / +2 lines
Lines 123-129 messages -> RemoteMediaPlayerProxy NotRefCounted { a/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in_sec1
123
#endif
123
#endif
124
124
125
#if PLATFORM(COCOA)
125
#if PLATFORM(COCOA)
126
    NativeImageForCurrentTime() -> (std::optional<MachSendRight> sendRight) Synchronous
126
    NativeImageForCurrentTime() -> (std::optional<MachSendRight> sendRight, WebCore::DestinationColorSpace colorSpace) Synchronous
127
    ColorSpace() -> (WebCore::DestinationColorSpace colorSpace) Synchronous
127
#endif
128
#endif
128
#if USE(AVFOUNDATION)
129
#if USE(AVFOUNDATION)
129
    PixelBufferForCurrentTimeIfChanged() -> (std::optional<RetainPtr<CVPixelBufferRef>> pixelBuffer) Synchronous
130
    PixelBufferForCurrentTimeIfChanged() -> (std::optional<RetainPtr<CVPixelBufferRef>> pixelBuffer) Synchronous
- a/Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm -6 / +16 lines
Lines 83-114 void RemoteMediaPlayerProxy::setVideoInlineSizeFenced(const WebCore::FloatSize& a/Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm_sec1
83
    setVideoInlineSizeIfPossible(*m_inlineLayerHostingContext, size);
83
    setVideoInlineSizeIfPossible(*m_inlineLayerHostingContext, size);
84
}
84
}
85
85
86
void RemoteMediaPlayerProxy::nativeImageForCurrentTime(CompletionHandler<void(std::optional<WTF::MachSendRight>&&)>&& completionHandler)
86
void RemoteMediaPlayerProxy::nativeImageForCurrentTime(CompletionHandler<void(std::optional<WTF::MachSendRight>&&, WebCore::DestinationColorSpace)>&& completionHandler)
87
{
87
{
88
    if (!m_player) {
88
    if (!m_player) {
89
        completionHandler(std::nullopt);
89
        completionHandler(std::nullopt, DestinationColorSpace::SRGB());
90
        return;
90
        return;
91
    }
91
    }
92
92
93
    auto nativeImage = m_player->nativeImageForCurrentTime();
93
    auto nativeImage = m_player->nativeImageForCurrentTime();
94
    if (!nativeImage) {
94
    if (!nativeImage) {
95
        completionHandler(std::nullopt);
95
        completionHandler(std::nullopt, DestinationColorSpace::SRGB());
96
        return;
96
        return;
97
    }
97
    }
98
98
99
    auto platformImage = nativeImage->platformImage();
99
    auto platformImage = nativeImage->platformImage();
100
    if (!platformImage) {
100
    if (!platformImage) {
101
        completionHandler(std::nullopt);
101
        completionHandler(std::nullopt, DestinationColorSpace::SRGB());
102
        return;
102
        return;
103
    }
103
    }
104
104
105
    auto surface = WebCore::IOSurface::createFromImage(platformImage.get());
105
    auto surface = WebCore::IOSurface::createFromImage(platformImage.get());
106
    if (!surface) {
106
    if (!surface) {
107
        completionHandler(std::nullopt);
107
        completionHandler(std::nullopt, DestinationColorSpace::SRGB());
108
        return;
108
        return;
109
    }
109
    }
110
110
111
    completionHandler(surface->createSendRight());
111
    completionHandler(surface->createSendRight(), nativeImage->colorSpace());
112
}
113
114
void RemoteMediaPlayerProxy::colorSpace(CompletionHandler<void(WebCore::DestinationColorSpace)>&& completionHandler)
115
{
116
    if (!m_player) {
117
        completionHandler(DestinationColorSpace::SRGB());
118
        return;
119
    }
120
121
    completionHandler(m_player->colorSpace());
112
}
122
}
113
123
114
#if USE(AVFOUNDATION)
124
#if USE(AVFOUNDATION)
- a/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp +6 lines
Lines 992-997 RefPtr<NativeImage> MediaPlayerPrivateRemote::nativeImageForCurrentTime() a/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp_sec1
992
    notImplemented();
992
    notImplemented();
993
    return nullptr;
993
    return nullptr;
994
}
994
}
995
996
DestinationColorSpace MediaPlayerPrivateRemote::colorSpace()
997
{
998
    notImplemented();
999
    return DestinationColorSpace::SRGB();
1000
}
995
#endif
1001
#endif
996
1002
997
bool MediaPlayerPrivateRemote::hasAvailableVideoFrame() const
1003
bool MediaPlayerPrivateRemote::hasAvailableVideoFrame() const
- a/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h +1 lines
Lines 290-295 private: a/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h_sec1
290
    RetainPtr<CVPixelBufferRef> pixelBufferForCurrentTime() final;
290
    RetainPtr<CVPixelBufferRef> pixelBufferForCurrentTime() final;
291
#endif
291
#endif
292
    RefPtr<WebCore::NativeImage> nativeImageForCurrentTime() final;
292
    RefPtr<WebCore::NativeImage> nativeImageForCurrentTime() final;
293
    WebCore::DestinationColorSpace colorSpace() final;
293
294
294
    WebCore::MediaPlayerIdentifier identifier() const final;
295
    WebCore::MediaPlayerIdentifier identifier() const final;
295
296
- a/Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm -2 / +10 lines
Lines 49-61 PlatformLayerContainer MediaPlayerPrivateRemote::createVideoFullscreenLayer() a/Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm_sec1
49
RefPtr<NativeImage> MediaPlayerPrivateRemote::nativeImageForCurrentTime()
49
RefPtr<NativeImage> MediaPlayerPrivateRemote::nativeImageForCurrentTime()
50
{
50
{
51
    std::optional<MachSendRight> sendRight;
51
    std::optional<MachSendRight> sendRight;
52
    if (!connection().sendSync(Messages::RemoteMediaPlayerProxy::NativeImageForCurrentTime(), Messages::RemoteMediaPlayerProxy::NativeImageForCurrentTime::Reply(sendRight), m_id))
52
    auto colorSpace = DestinationColorSpace::SRGB();
53
    if (!connection().sendSync(Messages::RemoteMediaPlayerProxy::NativeImageForCurrentTime(), Messages::RemoteMediaPlayerProxy::NativeImageForCurrentTime::Reply(sendRight, colorSpace), m_id))
53
        return nullptr;
54
        return nullptr;
54
55
55
    if (!sendRight)
56
    if (!sendRight)
56
        return nullptr;
57
        return nullptr;
57
58
58
    auto surface = WebCore::IOSurface::createFromSendRight(WTFMove(*sendRight), WebCore::DestinationColorSpace::SRGB());
59
    auto surface = WebCore::IOSurface::createFromSendRight(WTFMove(*sendRight), colorSpace);
59
    if (!surface)
60
    if (!surface)
60
        return nullptr;
61
        return nullptr;
61
62
Lines 66-71 RefPtr<NativeImage> MediaPlayerPrivateRemote::nativeImageForCurrentTime() a/Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm_sec2
66
    return NativeImage::create(WTFMove(platformImage));
67
    return NativeImage::create(WTFMove(platformImage));
67
}
68
}
68
69
70
WebCore::DestinationColorSpace MediaPlayerPrivateRemote::colorSpace()
71
{
72
    auto colorSpace = DestinationColorSpace::SRGB();
73
    connection().sendSync(Messages::RemoteMediaPlayerProxy::ColorSpace(), Messages::RemoteMediaPlayerProxy::ColorSpace::Reply(colorSpace), m_id);
74
    return colorSpace;
75
}
76
69
#if USE(AVFOUNDATION)
77
#if USE(AVFOUNDATION)
70
RetainPtr<CVPixelBufferRef> MediaPlayerPrivateRemote::pixelBufferForCurrentTime()
78
RetainPtr<CVPixelBufferRef> MediaPlayerPrivateRemote::pixelBufferForCurrentTime()
71
{
79
{
- a/LayoutTests/ChangeLog +45 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2021-09-28  Cameron McCormack  <heycam@apple.com>
2
3
        Ensure CanvasRenderingContext2D.drawImage(video) uses the right color space
4
        https://bugs.webkit.org/show_bug.cgi?id=229025
5
        <rdar://problem/81828490>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        * TestExpectations:
10
        * platform/glib/TestExpectations:
11
        * platform/ios-14/TestExpectations:
12
        * platform/ios-device/TestExpectations:
13
        * platform/ios/TestExpectations:
14
        * platform/mac-wk2/TestExpectations:
15
        * platform/mac/TestExpectations:
16
        New tests pass only on macOS Monterey+ and iOS 15+.
17
18
        * fast/canvas/canvas-createPattern-video-loading-expected.txt:
19
        * fast/canvas/canvas-createPattern-video-loading.html:
20
        * fast/canvas/canvas-createPattern-video-modify-expected.txt:
21
        * fast/canvas/canvas-createPattern-video-modify.html:
22
        * media/video-canvas-createPattern-expected.txt:
23
        * media/video-canvas-createPattern.html:
24
        * media/video-canvas-drawing-output-expected.txt:
25
        * media/video-canvas-drawing-output.html:
26
        * media/video-orientation-canvas-expected.txt:
27
        * media/video-orientation-canvas.html:
28
        Update some tests to check for correctly converted color values.
29
30
        * platform/mac/media/video-canvas-createPattern-expected.png: Removed.
31
        * platform/wpe/media/video-canvas-createPattern-expected.png: Removed.
32
33
        * platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY-expected.txt:
34
        An existing failure that changed a bit. This is
35
        https://bugs.webkit.org/show_bug.cgi?id=231001.
36
37
        * platform/mac-bigsur/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt:
38
        * platform/mac-bigsur/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt:
39
        * platform/mac-catalina/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt:
40
        * platform/mac-catalina/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt:
41
        * webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt:
42
        * webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt:
43
        New expected faillures for vendored tests that check for incorrect color
44
        space handling with drawImage() on a 2D canvas.
45
1
2021-10-13  Sihui Liu  <sihui_liu@apple.com>
46
2021-10-13  Sihui Liu  <sihui_liu@apple.com>
2
47
3
        Implement FileSystemHandle move()
48
        Implement FileSystemHandle move()
- a/LayoutTests/imported/w3c/ChangeLog +30 lines
Lines 1-3 a/LayoutTests/imported/w3c/ChangeLog_sec1
1
2021-10-01  Cameron McCormack  <heycam@apple.com>
2
3
        Ensure CanvasRenderingContext2D.drawImage(video) uses the right color space
4
        https://bugs.webkit.org/show_bug.cgi?id=229025
5
        <rdar://problem/81828490>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        Add some new WPTs for drawImage(video).
10
11
        * web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html:
12
        * web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html:
13
        Updated tests to check that video color space conversion is done
14
        correctly.
15
16
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video-expected.txt: Added.
17
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html: Added.
18
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video-expected.txt: Added.
19
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html: Added.
20
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js:
21
        (pixelsApproximatelyEqual): Tweaked threshold to pass video tests on iOS.
22
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4: Added.
23
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.webm: Added.
24
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.mp4: Added.
25
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.webm: Added.
26
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.mp4: Added.
27
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.webm: Added.
28
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4: Added.
29
        * web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.webm: Added.
30
1
2021-10-13  Tim Nguyen  <ntim@apple.com>
31
2021-10-13  Tim Nguyen  <ntim@apple.com>
2
32
3
        Implement <dialog> focusing steps
33
        Implement <dialog> focusing steps
- a/LayoutTests/TestExpectations +2 lines
Lines 5076-5081 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/can a/LayoutTests/TestExpectations_sec1
5076
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html [ Failure ]
5076
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html [ Failure ]
5077
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html [ Failure ]
5077
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html [ Failure ]
5078
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html [ Failure ]
5078
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html [ Failure ]
5079
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html [ Failure ]
5080
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html [ Failure ]
5079
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html [ Failure ]
5081
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html [ Failure ]
5080
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html [ Failure ]
5082
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html [ Failure ]
5081
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html [ Failure ]
5083
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html [ Failure ]
- a/LayoutTests/fast/canvas/canvas-createPattern-video-loading-expected.txt -64 / +64 lines
Lines 4-81 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/canvas/canvas-createPattern-video-loading-expected.txt_sec1
4
4
5
5
6
PASS document.createElement('canvas').getContext('2d').createPattern(video, 'repeat') is null
6
PASS document.createElement('canvas').getContext('2d').createPattern(video, 'repeat') is null
7
PASS buffer[0] is within 2 of 194
7
PASS buffer[0] is within 2 of 200
8
PASS buffer[1] is within 2 of 193
9
PASS buffer[2] is within 2 of 14
10
PASS buffer[0] is within 2 of 194
11
PASS buffer[1] is within 2 of 193
12
PASS buffer[2] is within 2 of 14
13
PASS buffer[0] is within 2 of 194
14
PASS buffer[1] is within 2 of 193
15
PASS buffer[2] is within 2 of 14
16
PASS buffer[0] is within 2 of 194
17
PASS buffer[1] is within 2 of 193
18
PASS buffer[2] is within 2 of 14
19
PASS buffer[0] is within 2 of 17
20
PASS buffer[1] is within 2 of 197
21
PASS buffer[2] is within 2 of 195
22
PASS buffer[0] is within 2 of 17
23
PASS buffer[1] is within 2 of 197
24
PASS buffer[2] is within 2 of 195
25
PASS buffer[0] is within 2 of 17
26
PASS buffer[1] is within 2 of 197
27
PASS buffer[2] is within 2 of 195
28
PASS buffer[0] is within 2 of 17
29
PASS buffer[1] is within 2 of 197
30
PASS buffer[2] is within 2 of 195
31
PASS buffer[0] is within 2 of 20
32
PASS buffer[1] is within 2 of 200
8
PASS buffer[1] is within 2 of 200
33
PASS buffer[2] is within 2 of 18
9
PASS buffer[2] is within 2 of 0
34
PASS buffer[0] is within 2 of 20
10
PASS buffer[0] is within 2 of 200
35
PASS buffer[1] is within 2 of 200
11
PASS buffer[1] is within 2 of 200
36
PASS buffer[2] is within 2 of 18
12
PASS buffer[2] is within 2 of 0
37
PASS buffer[0] is within 2 of 20
13
PASS buffer[0] is within 2 of 200
38
PASS buffer[1] is within 2 of 200
14
PASS buffer[1] is within 2 of 200
39
PASS buffer[2] is within 2 of 18
15
PASS buffer[2] is within 2 of 0
40
PASS buffer[0] is within 2 of 20
16
PASS buffer[0] is within 2 of 200
41
PASS buffer[1] is within 2 of 200
17
PASS buffer[1] is within 2 of 200
42
PASS buffer[2] is within 2 of 18
18
PASS buffer[2] is within 2 of 0
43
PASS buffer[0] is within 2 of 194
19
PASS buffer[0] is within 2 of 57
44
PASS buffer[1] is within 2 of 193
20
PASS buffer[1] is within 2 of 202
45
PASS buffer[2] is within 2 of 14
21
PASS buffer[2] is within 2 of 203
46
PASS buffer[0] is within 2 of 194
22
PASS buffer[0] is within 2 of 57
47
PASS buffer[1] is within 2 of 193
23
PASS buffer[1] is within 2 of 202
48
PASS buffer[2] is within 2 of 14
24
PASS buffer[2] is within 2 of 203
49
PASS buffer[0] is within 2 of 194
25
PASS buffer[0] is within 2 of 57
50
PASS buffer[1] is within 2 of 193
26
PASS buffer[1] is within 2 of 202
51
PASS buffer[2] is within 2 of 14
27
PASS buffer[2] is within 2 of 203
52
PASS buffer[0] is within 2 of 194
28
PASS buffer[0] is within 2 of 57
53
PASS buffer[1] is within 2 of 193
29
PASS buffer[1] is within 2 of 202
54
PASS buffer[2] is within 2 of 14
30
PASS buffer[2] is within 2 of 203
55
PASS buffer[0] is within 2 of 17
31
PASS buffer[0] is within 2 of 53
56
PASS buffer[1] is within 2 of 197
32
PASS buffer[1] is within 2 of 203
57
PASS buffer[2] is within 2 of 195
33
PASS buffer[2] is within 2 of 9
58
PASS buffer[0] is within 2 of 17
34
PASS buffer[0] is within 2 of 53
59
PASS buffer[1] is within 2 of 197
35
PASS buffer[1] is within 2 of 203
60
PASS buffer[2] is within 2 of 195
36
PASS buffer[2] is within 2 of 9
61
PASS buffer[0] is within 2 of 17
37
PASS buffer[0] is within 2 of 53
62
PASS buffer[1] is within 2 of 197
38
PASS buffer[1] is within 2 of 203
63
PASS buffer[2] is within 2 of 195
39
PASS buffer[2] is within 2 of 9
64
PASS buffer[0] is within 2 of 17
40
PASS buffer[0] is within 2 of 53
65
PASS buffer[1] is within 2 of 197
41
PASS buffer[1] is within 2 of 203
66
PASS buffer[2] is within 2 of 195
42
PASS buffer[2] is within 2 of 9
67
PASS buffer[0] is within 2 of 20
43
PASS buffer[0] is within 2 of 200
68
PASS buffer[1] is within 2 of 200
44
PASS buffer[1] is within 2 of 200
69
PASS buffer[2] is within 2 of 18
45
PASS buffer[2] is within 2 of 0
70
PASS buffer[0] is within 2 of 20
46
PASS buffer[0] is within 2 of 200
71
PASS buffer[1] is within 2 of 200
47
PASS buffer[1] is within 2 of 200
72
PASS buffer[2] is within 2 of 18
48
PASS buffer[2] is within 2 of 0
73
PASS buffer[0] is within 2 of 20
49
PASS buffer[0] is within 2 of 200
74
PASS buffer[1] is within 2 of 200
50
PASS buffer[1] is within 2 of 200
75
PASS buffer[2] is within 2 of 18
51
PASS buffer[2] is within 2 of 0
76
PASS buffer[0] is within 2 of 20
52
PASS buffer[0] is within 2 of 200
77
PASS buffer[1] is within 2 of 200
53
PASS buffer[1] is within 2 of 200
78
PASS buffer[2] is within 2 of 18
54
PASS buffer[2] is within 2 of 0
55
PASS buffer[0] is within 2 of 57
56
PASS buffer[1] is within 2 of 202
57
PASS buffer[2] is within 2 of 203
58
PASS buffer[0] is within 2 of 57
59
PASS buffer[1] is within 2 of 202
60
PASS buffer[2] is within 2 of 203
61
PASS buffer[0] is within 2 of 57
62
PASS buffer[1] is within 2 of 202
63
PASS buffer[2] is within 2 of 203
64
PASS buffer[0] is within 2 of 57
65
PASS buffer[1] is within 2 of 202
66
PASS buffer[2] is within 2 of 203
67
PASS buffer[0] is within 2 of 53
68
PASS buffer[1] is within 2 of 203
69
PASS buffer[2] is within 2 of 9
70
PASS buffer[0] is within 2 of 53
71
PASS buffer[1] is within 2 of 203
72
PASS buffer[2] is within 2 of 9
73
PASS buffer[0] is within 2 of 53
74
PASS buffer[1] is within 2 of 203
75
PASS buffer[2] is within 2 of 9
76
PASS buffer[0] is within 2 of 53
77
PASS buffer[1] is within 2 of 203
78
PASS buffer[2] is within 2 of 9
79
PASS successfullyParsed is true
79
PASS successfullyParsed is true
80
80
81
TEST COMPLETE
81
TEST COMPLETE
- a/LayoutTests/fast/canvas/canvas-createPattern-video-loading.html -14 / +14 lines
Lines 12-31 a/LayoutTests/fast/canvas/canvas-createPattern-video-loading.html_sec1
12
    var buffer;
12
    var buffer;
13
    var expectedResults = [
13
    var expectedResults = [
14
        // Each entry is formatted as [x, y, r, g, b].
14
        // Each entry is formatted as [x, y, r, g, b].
15
        [40, 165, 194, 193, 14], // Represents yellow north west tile.
15
        [40, 165, 200, 200, 0], // Represents yellow north west tile.
16
        [355, 165, 194, 193, 14], // Represents yellow north east tile.
16
        [355, 165, 200, 200, 0], // Represents yellow north east tile.
17
        [40, 403, 194, 193, 14], // Represents yellow south west tile.
17
        [40, 403, 200, 200, 0], // Represents yellow south west tile.
18
        [355, 403, 194, 193, 14], // Represents yellow south east tile.
18
        [355, 403, 200, 200, 0], // Represents yellow south east tile.
19
19
20
        [56, 165, 17, 197, 195], // Represents blue/cyan north west tile.
20
        [56, 165, 57, 202, 203], // Represents blue/cyan north west tile.
21
        [371, 165, 17, 197, 195], // Represents blue/cyan north east tile.
21
        [371, 165, 57, 202, 203], // Represents blue/cyan north east tile.
22
        [56, 403, 17, 197, 195], // Represents blue/cyan south west tile.
22
        [56, 403, 57, 202, 203], // Represents blue/cyan south west tile.
23
        [371, 403, 17, 197, 195], // Represents blue/cyan south east tile.
23
        [371, 403, 57, 202, 203], // Represents blue/cyan south east tile.
24
24
25
        [73, 165, 20, 200, 18], // Represents green north west tile.
25
        [73, 165, 53, 203, 9], // Represents green north west tile.
26
        [388, 165, 20, 200, 18], // Represents green north east tile.
26
        [388, 165, 53, 203, 9], // Represents green north east tile.
27
        [73, 403, 20, 200, 18], // Represents green south west tile.
27
        [73, 403, 53, 203, 9], // Represents green south west tile.
28
        [388, 403, 20, 200, 18], // Represents green south east tile.
28
        [388, 403, 53, 203, 9], // Represents green south east tile.
29
    ];
29
    ];
30
30
31
    var canvases = document.createElement("div");
31
    var canvases = document.createElement("div");
- a/LayoutTests/fast/canvas/canvas-createPattern-video-modify-expected.txt -12 / +12 lines
Lines 3-20 Tests that modifying the video used in createPattern does not affect the pattern a/LayoutTests/fast/canvas/canvas-createPattern-video-modify-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
PASS buffer[0] is within 2 of 194
6
PASS buffer[0] is within 2 of 200
7
PASS buffer[1] is within 2 of 193
7
PASS buffer[1] is within 2 of 200
8
PASS buffer[2] is within 2 of 14
8
PASS buffer[2] is within 2 of 0
9
PASS buffer[0] is within 2 of 194
9
PASS buffer[0] is within 2 of 200
10
PASS buffer[1] is within 2 of 193
10
PASS buffer[1] is within 2 of 200
11
PASS buffer[2] is within 2 of 14
11
PASS buffer[2] is within 2 of 0
12
PASS buffer[0] is within 2 of 194
12
PASS buffer[0] is within 2 of 200
13
PASS buffer[1] is within 2 of 193
13
PASS buffer[1] is within 2 of 200
14
PASS buffer[2] is within 2 of 14
14
PASS buffer[2] is within 2 of 0
15
PASS buffer[0] is within 2 of 194
15
PASS buffer[0] is within 2 of 200
16
PASS buffer[1] is within 2 of 193
16
PASS buffer[1] is within 2 of 200
17
PASS buffer[2] is within 2 of 14
17
PASS buffer[2] is within 2 of 0
18
PASS successfullyParsed is true
18
PASS successfullyParsed is true
19
19
20
TEST COMPLETE
20
TEST COMPLETE
- a/LayoutTests/fast/canvas/canvas-createPattern-video-modify.html -4 / +4 lines
Lines 14-23 a/LayoutTests/fast/canvas/canvas-createPattern-video-modify.html_sec1
14
    var modified = false;
14
    var modified = false;
15
    var expectedResults = [
15
    var expectedResults = [
16
        // Each entry is formatted as [x, y, r, g, b].
16
        // Each entry is formatted as [x, y, r, g, b].
17
        [40, 165, 194, 193, 14], // Represents yellow north west tile.
17
        [40, 165, 200, 200, 0], // Represents yellow north west tile.
18
        [355, 165, 194, 193, 14], // Represents yellow north east tile.
18
        [355, 165, 200, 200, 0], // Represents yellow north east tile.
19
        [40, 403, 194, 193, 14], // Represents yellow south west tile.
19
        [40, 403, 200, 200, 0], // Represents yellow south west tile.
20
        [355, 403, 194, 193, 14], // Represents yellow south east tile.
20
        [355, 403, 200, 200, 0], // Represents yellow south east tile.
21
    ];
21
    ];
22
22
23
    var video = document.createElement("video");
23
    var video = document.createElement("video");
- a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html -8 / +22 lines
Lines 9-27 a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html_sec1
9
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
9
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
10
<body>
10
<body>
11
<script>
11
<script>
12
function testCanvasDisplayingPattern(canvas, width, height)
12
function testCanvasDisplayingPattern(canvas, width, height, sourceIsVideo)
13
{
13
{
14
    var tolerance = 10; // for creating ImageBitmap from a video, the tolerance needs to be high
14
    var tolerance = 1;
15
    const check = (x, y, r, g, b, a) =>
15
    let topLeft = [255, 0, 0, 255];
16
    let topRight = [0, 255, 0, 255];
17
    let bottomLeft = [0, 0, 255, 255];
18
    let bottomRight = [0, 0, 0, 255];
19
    if (sourceIsVideo) {
20
        // The source video uses colors in the Rec.601 color space whose
21
        // values are close to full red, full green, full blue, and black,
22
        // but when converted to sRGB, are somewhat different.
23
        topLeft = [247, 37, 0, 255];
24
        topRight = [63, 251, 0, 255];
25
        bottomLeft = [28, 35, 255, 255];
26
        bottomRight = [5, 0, 2, 255];
27
    }
28
    const check = (x, y, [r, g, b, a]) =>
16
        _assertPixelApprox(canvas, x,y, r,g,b,a, `${x},${y}`, `${r},${g},${b},${a}`, tolerance);
29
        _assertPixelApprox(canvas, x,y, r,g,b,a, `${x},${y}`, `${r},${g},${b},${a}`, tolerance);
17
    check(1 * width / 4, 1 * height / 4, 255,0,0,255);
30
    check(1 * width / 4, 1 * height / 4, topLeft);
18
    check(3 * width / 4, 1 * height / 4, 0,255,0,255);
31
    check(3 * width / 4, 1 * height / 4, topRight);
19
    check(1 * width / 4, 3 * height / 4, 0,0,255,255);
32
    check(1 * width / 4, 3 * height / 4, bottomLeft);
20
    check(3 * width / 4, 3 * height / 4, 0,0,0,255);
33
    check(3 * width / 4, 3 * height / 4, bottomRight);
21
}
34
}
22
35
23
function testDrawImageBitmap(source, args = [], { resizeWidth = 20, resizeHeight = 20 } = {})
36
function testDrawImageBitmap(source, args = [], { resizeWidth = 20, resizeHeight = 20 } = {})
24
{
37
{
38
    let sourceIsVideo = source instanceof HTMLVideoElement;
25
    var canvas = document.createElement("canvas");
39
    var canvas = document.createElement("canvas");
26
    canvas.width = resizeWidth;
40
    canvas.width = resizeWidth;
27
    canvas.height = resizeHeight;
41
    canvas.height = resizeHeight;
Lines 30-36 function testDrawImageBitmap(source, args = [], { resizeWidth = 20, resizeHeight a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html_sec2
30
        assert_equals(imageBitmap.width, resizeWidth);
44
        assert_equals(imageBitmap.width, resizeWidth);
31
        assert_equals(imageBitmap.height, resizeHeight);
45
        assert_equals(imageBitmap.height, resizeHeight);
32
        ctx.drawImage(imageBitmap, 0, 0);
46
        ctx.drawImage(imageBitmap, 0, 0);
33
        testCanvasDisplayingPattern(canvas, resizeWidth, resizeHeight);
47
        testCanvasDisplayingPattern(canvas, resizeWidth, resizeHeight, sourceIsVideo);
34
    });
48
    });
35
}
49
}
36
50
- a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html -14 / +25 lines
Lines 9-34 a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html_sec1
9
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
9
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
10
<body>
10
<body>
11
<script>
11
<script>
12
function testCanvasDisplayingPattern(canvas, width, height, flipped)
12
function testCanvasDisplayingPattern(canvas, width, height, sourceIsVideo, flipped)
13
{
13
{
14
    var tolerance = 10; // for creating ImageBitmap from a video, the tolerance needs to be high
14
    var tolerance = 1;
15
    const check = (x, y, r, g, b, a) =>
15
    let topLeft = [255, 0, 0, 255];
16
        _assertPixelApprox(canvas, x,y, r,g,b,a, `${x},${y}`, `${r},${g},${b},${a}`, tolerance);
16
    let topRight = [0, 255, 0, 255];
17
    let bottomLeft = [0, 0, 255, 255];
18
    let bottomRight = [0, 0, 0, 255];
19
    if (sourceIsVideo) {
20
        // The source video uses colors in the Rec.601 color space whose
21
        // values are close to full red, full green, full blue, and black,
22
        // but when converted to sRGB, are somewhat different.
23
        topLeft = [247, 37, 0, 255];
24
        topRight = [63, 251, 0, 255];
25
        bottomLeft = [28, 35, 255, 255];
26
        bottomRight = [5, 0, 2, 255];
27
    }
17
    if (flipped) {
28
    if (flipped) {
18
        check(1 * width / 4, 3 * height / 4, 255,0,0,255);
29
        [topLeft, bottomLeft] = [bottomLeft, topLeft];
19
        check(3 * width / 4, 3 * height / 4, 0,255,0,255);
30
        [topRight, bottomRight] = [bottomRight, topRight];
20
        check(1 * width / 4, 1 * height / 4, 0,0,255,255);
21
        check(3 * width / 4, 1 * height / 4, 0,0,0,255);
22
    } else {
23
        check(1 * width / 4, 1 * height / 4, 255,0,0,255);
24
        check(3 * width / 4, 1 * height / 4, 0,255,0,255);
25
        check(1 * width / 4, 3 * height / 4, 0,0,255,255);
26
        check(3 * width / 4, 3 * height / 4, 0,0,0,255);
27
    }
31
    }
32
    const check = (x, y, [r, g, b, a]) =>
33
        _assertPixelApprox(canvas, x,y, r,g,b,a, `${x},${y}`, `${r},${g},${b},${a}`, tolerance);
34
    check(1 * width / 4, 1 * height / 4, topLeft);
35
    check(3 * width / 4, 1 * height / 4, topRight);
36
    check(1 * width / 4, 3 * height / 4, bottomLeft);
37
    check(3 * width / 4, 3 * height / 4, bottomRight);
28
}
38
}
29
39
30
function testDrawImageBitmap(source, args = [], flipped, { resizeWidth = 20, resizeHeight = 20 } = {})
40
function testDrawImageBitmap(source, args = [], flipped, { resizeWidth = 20, resizeHeight = 20 } = {})
31
{
41
{
42
    let sourceIsVideo = source instanceof HTMLVideoElement;
32
    var canvas = document.createElement("canvas");
43
    var canvas = document.createElement("canvas");
33
    canvas.width = resizeWidth;
44
    canvas.width = resizeWidth;
34
    canvas.height = resizeHeight;
45
    canvas.height = resizeHeight;
Lines 37-43 function testDrawImageBitmap(source, args = [], flipped, { resizeWidth = 20, res a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html_sec2
37
        assert_equals(imageBitmap.width, resizeWidth);
48
        assert_equals(imageBitmap.width, resizeWidth);
38
        assert_equals(imageBitmap.height, resizeHeight);
49
        assert_equals(imageBitmap.height, resizeHeight);
39
        ctx.drawImage(imageBitmap, 0, 0);
50
        ctx.drawImage(imageBitmap, 0, 0);
40
        testCanvasDisplayingPattern(canvas, resizeWidth, resizeHeight, flipped);
51
        testCanvasDisplayingPattern(canvas, resizeWidth, resizeHeight, sourceIsVideo, flipped);
41
    });
52
    });
42
}
53
}
43
54
- a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video-expected.txt +34 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video-expected.txt_sec1
1
2
PASS sRGB-FF0100, Context srgb, ImageData srgb, cropSource=false
3
PASS sRGB-FF0100, Context srgb, ImageData srgb, cropSource=true
4
PASS sRGB-FF0100, Context srgb, ImageData display-p3, cropSource=false
5
PASS sRGB-FF0100, Context srgb, ImageData display-p3, cropSource=true
6
PASS sRGB-FF0100, Context display-p3, ImageData srgb, cropSource=false
7
PASS sRGB-FF0100, Context display-p3, ImageData srgb, cropSource=true
8
PASS sRGB-FF0100, Context display-p3, ImageData display-p3, cropSource=false
9
PASS sRGB-FF0100, Context display-p3, ImageData display-p3, cropSource=true
10
PASS sRGB-BB0000, Context srgb, ImageData srgb, cropSource=false
11
PASS sRGB-BB0000, Context srgb, ImageData srgb, cropSource=true
12
PASS sRGB-BB0000, Context srgb, ImageData display-p3, cropSource=false
13
PASS sRGB-BB0000, Context srgb, ImageData display-p3, cropSource=true
14
PASS sRGB-BB0000, Context display-p3, ImageData srgb, cropSource=false
15
PASS sRGB-BB0000, Context display-p3, ImageData srgb, cropSource=true
16
PASS sRGB-BB0000, Context display-p3, ImageData display-p3, cropSource=false
17
PASS sRGB-BB0000, Context display-p3, ImageData display-p3, cropSource=true
18
PASS Rec2020-3FF000000, Context srgb, ImageData srgb, cropSource=false
19
PASS Rec2020-3FF000000, Context srgb, ImageData srgb, cropSource=true
20
PASS Rec2020-3FF000000, Context srgb, ImageData display-p3, cropSource=false
21
PASS Rec2020-3FF000000, Context srgb, ImageData display-p3, cropSource=true
22
PASS Rec2020-3FF000000, Context display-p3, ImageData srgb, cropSource=false
23
PASS Rec2020-3FF000000, Context display-p3, ImageData srgb, cropSource=true
24
PASS Rec2020-3FF000000, Context display-p3, ImageData display-p3, cropSource=false
25
PASS Rec2020-3FF000000, Context display-p3, ImageData display-p3, cropSource=true
26
PASS Rec2020-222000000, Context srgb, ImageData srgb, cropSource=false
27
PASS Rec2020-222000000, Context srgb, ImageData srgb, cropSource=true
28
PASS Rec2020-222000000, Context srgb, ImageData display-p3, cropSource=false
29
PASS Rec2020-222000000, Context srgb, ImageData display-p3, cropSource=true
30
PASS Rec2020-222000000, Context display-p3, ImageData srgb, cropSource=false
31
PASS Rec2020-222000000, Context display-p3, ImageData srgb, cropSource=true
32
PASS Rec2020-222000000, Context display-p3, ImageData display-p3, cropSource=false
33
PASS Rec2020-222000000, Context display-p3, ImageData display-p3, cropSource=true
34
- a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html +55 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html_sec1
1
<!DOCTYPE HTML>
2
<script src="/resources/testharness.js"></script>
3
<script src="/resources/testharnessreport.js"></script>
4
<script src="canvas-display-p3.js"></script>
5
<body>
6
<script>
7
// Test that drawing ImageBitmaps with different video source color profiles
8
// into sRGB and Display P3 canvases works, by reading pixels with
9
// getImageData() as sRGB and Display P3 values.
10
for (let [filenameBase, expectedPixels] of Object.entries(videoTests)) {
11
    for (let contextColorSpace of ["srgb", "display-p3"]) {
12
        for (let imageDataColorSpace of ["srgb", "display-p3"]) {
13
            for (let cropSource of [false, true]) {
14
                async_test(function(t) {
15
                    let video = document.createElement("video");
16
                    video.onloadeddata = t.step_func(function() {
17
18
                        let canvas = document.createElement("canvas");
19
                        canvas.width = 2;
20
                        canvas.height = 2;
21
22
                        let ctx = canvas.getContext("2d", { colorSpace: contextColorSpace });
23
24
                        let imageBitmapPromise;
25
                        if (cropSource)
26
                            imageBitmapPromise = createImageBitmap(video, 1, 1, 1, 1);
27
                        else
28
                            imageBitmapPromise = createImageBitmap(video);
29
30
                        imageBitmapPromise.then(t.step_func_done(function(imageBitmap) {
31
                            video.remove();
32
                            ctx.drawImage(imageBitmap, 0, 0);
33
34
                            let imageData = ctx.getImageData(0, 0, 1, 1, { colorSpace: imageDataColorSpace });
35
36
                            let expected = expectedPixels[`${contextColorSpace} ${imageDataColorSpace}`];
37
                            assert_true(pixelsApproximatelyEqual(imageData.data, expected), `Actual pixel value ${[...imageData.data]} is approximately equal to ${expected}.`);
38
                        }), t.step_func(function(error) {
39
                            video.remove();
40
                            throw error;
41
                        }));
42
                    });
43
                    for (let format of ["mp4", "webm"]) {
44
                        let source = document.createElement("source");
45
                        source.src = `resources/${filenameBase}.${format}`;
46
                        source.type = `video/${format}`;
47
                        video.append(source);
48
                    }
49
                    document.body.append(video);
50
                }, `${filenameBase}, Context ${contextColorSpace}, ImageData ${imageDataColorSpace}, cropSource=${cropSource}`);
51
            }
52
        }
53
    }
54
}
55
</script>
- a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video-expected.txt +34 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video-expected.txt_sec1
1
2
PASS sRGB-FF0100, Context srgb, ImageData srgb, scaleImage=false
3
PASS sRGB-FF0100, Context srgb, ImageData srgb, scaleImage=true
4
PASS sRGB-FF0100, Context srgb, ImageData display-p3, scaleImage=false
5
PASS sRGB-FF0100, Context srgb, ImageData display-p3, scaleImage=true
6
PASS sRGB-FF0100, Context display-p3, ImageData srgb, scaleImage=false
7
PASS sRGB-FF0100, Context display-p3, ImageData srgb, scaleImage=true
8
PASS sRGB-FF0100, Context display-p3, ImageData display-p3, scaleImage=false
9
PASS sRGB-FF0100, Context display-p3, ImageData display-p3, scaleImage=true
10
PASS sRGB-BB0000, Context srgb, ImageData srgb, scaleImage=false
11
PASS sRGB-BB0000, Context srgb, ImageData srgb, scaleImage=true
12
PASS sRGB-BB0000, Context srgb, ImageData display-p3, scaleImage=false
13
PASS sRGB-BB0000, Context srgb, ImageData display-p3, scaleImage=true
14
PASS sRGB-BB0000, Context display-p3, ImageData srgb, scaleImage=false
15
PASS sRGB-BB0000, Context display-p3, ImageData srgb, scaleImage=true
16
PASS sRGB-BB0000, Context display-p3, ImageData display-p3, scaleImage=false
17
PASS sRGB-BB0000, Context display-p3, ImageData display-p3, scaleImage=true
18
PASS Rec2020-3FF000000, Context srgb, ImageData srgb, scaleImage=false
19
PASS Rec2020-3FF000000, Context srgb, ImageData srgb, scaleImage=true
20
PASS Rec2020-3FF000000, Context srgb, ImageData display-p3, scaleImage=false
21
PASS Rec2020-3FF000000, Context srgb, ImageData display-p3, scaleImage=true
22
PASS Rec2020-3FF000000, Context display-p3, ImageData srgb, scaleImage=false
23
PASS Rec2020-3FF000000, Context display-p3, ImageData srgb, scaleImage=true
24
PASS Rec2020-3FF000000, Context display-p3, ImageData display-p3, scaleImage=false
25
PASS Rec2020-3FF000000, Context display-p3, ImageData display-p3, scaleImage=true
26
PASS Rec2020-222000000, Context srgb, ImageData srgb, scaleImage=false
27
PASS Rec2020-222000000, Context srgb, ImageData srgb, scaleImage=true
28
PASS Rec2020-222000000, Context srgb, ImageData display-p3, scaleImage=false
29
PASS Rec2020-222000000, Context srgb, ImageData display-p3, scaleImage=true
30
PASS Rec2020-222000000, Context display-p3, ImageData srgb, scaleImage=false
31
PASS Rec2020-222000000, Context display-p3, ImageData srgb, scaleImage=true
32
PASS Rec2020-222000000, Context display-p3, ImageData display-p3, scaleImage=false
33
PASS Rec2020-222000000, Context display-p3, ImageData display-p3, scaleImage=true
34
- a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html +46 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html_sec1
1
<!DOCTYPE HTML>
2
<script src="/resources/testharness.js"></script>
3
<script src="/resources/testharnessreport.js"></script>
4
<script src="canvas-display-p3.js"></script>
5
<body>
6
<script>
7
// Test that drawing videos with different color spaces into sRGB and Display P3
8
// canvases works, by reading pixels with getImageData() as sRGB and Display P3
9
// values.
10
for (let [filenameBase, expectedPixels] of Object.entries(videoTests)) {
11
    for (let contextColorSpace of ["srgb", "display-p3"]) {
12
        for (let imageDataColorSpace of ["srgb", "display-p3"]) {
13
            for (let scaleImage of [false, true]) {
14
                async_test(function(t) {
15
                    let video = document.createElement("video");
16
                    video.onloadeddata = t.step_func_done(function() {
17
18
                        let canvas = document.createElement("canvas");
19
                        canvas.width = 2;
20
                        canvas.height = 2;
21
22
                        let ctx = canvas.getContext("2d", { colorSpace: contextColorSpace });
23
                        if (scaleImage)
24
                            ctx.drawImage(video, 0, 0, 10, 10);
25
                        else
26
                            ctx.drawImage(video, 0, 0);
27
                        video.remove();
28
29
                        let imageData = ctx.getImageData(0, 0, 1, 1, { colorSpace: imageDataColorSpace });
30
31
                        let expected = expectedPixels[`${contextColorSpace} ${imageDataColorSpace}`];
32
                        assert_true(pixelsApproximatelyEqual(imageData.data, expected), `Actual pixel value ${[...imageData.data]} is approximately equal to ${expected}.`);
33
                    });
34
                    for (let format of ["mp4", "webm"]) {
35
                        let source = document.createElement("source");
36
                        source.src = `resources/${filenameBase}.${format}`;
37
                        source.type = `video/${format}`;
38
                        video.append(source);
39
                    }
40
                    document.body.append(video);
41
                }, `${filenameBase}, Context ${contextColorSpace}, ImageData ${imageDataColorSpace}, scaleImage=${scaleImage}`);
42
            }
43
        }
44
    }
45
}
46
</script>
- a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js -1 / +54 lines
Lines 207-212 const svgImageTests = { a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js_sec1
207
    },
207
    },
208
};
208
};
209
209
210
// Each video:
211
//  * is 300x200 and has a single color
212
//  * has a filename base that indicates its contents:
213
//
214
//      <color-space>-<8-or-10-bit-color-value>
215
//
216
//  * was generated using commands like:
217
//
218
//      W=300 H=200 Y=3F Cb=66 Cr=F0 ; \
219
//        perl -e "print pack('c', 0x$Y) x ($W * $H), pack('c', 0x$Cb) x ($W * $H / 4), pack('c', 0x$Cr) x ($W * $H / 4)" | \
220
//        ffmpeg -f rawvideo -pix_fmt yuv420p -s:v ${W}x$H -r 25 -i - -pix_fmt yuv420p -colorspace bt709 -color_primaries bt709 -color_trc iec61966_2_1 sRGB-FF0100.webm
221
//
222
//      W=300 H=200 Y=0BB Cb=1BD Cr=2EF ; \
223
//        perl -e "print pack('s', 0x$Y) x ($W * $H), pack('s', 0x$Cb) x ($W * $H / 4), pack('s', 0x$Cr) x ($W * $H / 4)" | \
224
//        ffmpeg -f rawvideo -pix_fmt yuv420p10le -s:v ${W}x$H -r 25 -i - -c:v libx265 -vtag hvc1 -pix_fmt yuv420p10le -colorspace bt2020nc -color_primaries bt2020 -color_trc bt2020-10 Rec2020-222000000.mp4
225
//
226
//      W=300 H=200 Y=0BB Cb=1BD Cr=2EF ; \
227
//        perl -e "print pack('s', 0x$Y) x ($W * $H), pack('s', 0x$Cb) x ($W * $H / 4), pack('s', 0x$Cr) x ($W * $H / 4)" | \
228
//        ffmpeg -f rawvideo -pix_fmt yuv420p10le -s:v ${W}x$H -r 25 -i - -vcodec libvpx-vp9 -profile:v 2 -pix_fmt yuv420p10le -colorspace bt2020nc -color_primaries bt2020 -color_trc bt2020-10 Rec2020-222000000.webm
229
//
230
//    where the Y'CbCr values were computed using https://jdashg.github.io/misc/colors/from-coeffs.html.
231
const videoTests = {
232
    // Rec.709 Y'CbCr (0x3F, 0x66, 0xF0) = sRGB (0xFF, 0x01, 0x00)
233
    "sRGB-FF0100": {
234
        "srgb srgb": [255, 1, 0, 255],
235
        "srgb display-p3": [234, 51, 35, 255],
236
        "display-p3 srgb": [255, 0, 0, 255],
237
        "display-p3 display-p3": [234, 51, 35, 255],
238
    },
239
    // Rec.709 Y'CbCr (0x32, 0x6D, 0xD2) = sRGB (0xBB, 0x00, 0x00)
240
    "sRGB-BB0000": {
241
        "srgb srgb": [187, 0, 0, 255],
242
        "srgb display-p3": [171, 35, 23, 255],
243
        "display-p3 srgb": [187, 1, 0, 255],
244
        "display-p3 display-p3": [171, 35, 23, 255],
245
    },
246
247
    // 10 bit Rec.2020 Y'CbCr (0x126, 0x183, 0x3C0) = Rec.2020 (0x3FF, 0x000, 0x000)
248
    "Rec2020-3FF000000": {
249
        "srgb srgb": [255, 0, 0, 255],
250
        "srgb display-p3": [234, 51, 35, 255],
251
        "display-p3 srgb": [255, 0, 0, 255],
252
        "display-p3 display-p3": [255, 0, 9, 255],
253
    },
254
    // 10 bit Rec.2020 Y'CbCr (0x0BB, 0x1BD, 0x2EF) = Rec.2020 (0x222, 0x000, 0x000)
255
    "Rec2020-222000000": {
256
        "srgb srgb": [186, 0, 0, 255],
257
        "srgb display-p3": [170, 34, 23, 255],
258
        "display-p3 srgb": [186, 0, 0, 255],
259
        "display-p3 display-p3": [169, 0, 3, 255],
260
    },
261
};
262
210
const fromSRGBToDisplayP3 = {
263
const fromSRGBToDisplayP3 = {
211
    "255,0,0,255": [234, 51, 35, 255],
264
    "255,0,0,255": [234, 51, 35, 255],
212
    "255,0,0,204": [234, 51, 35, 204],
265
    "255,0,0,204": [234, 51, 35, 204],
Lines 223-229 const fromDisplayP3ToSRGB = { a/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js_sec2
223
276
224
function pixelsApproximatelyEqual(p1, p2) {
277
function pixelsApproximatelyEqual(p1, p2) {
225
    for (let i = 0; i < 4; ++i) {
278
    for (let i = 0; i < 4; ++i) {
226
        if (Math.abs(p1[i] - p2[i]) > 2)
279
        if (Math.abs(p1[i] - p2[i]) > 3)
227
            return false;
280
            return false;
228
    }
281
    }
229
    return true;
282
    return true;
- a/LayoutTests/media/video-canvas-createPattern-expected.txt -48 / +48 lines
Lines 1-56 a/LayoutTests/media/video-canvas-createPattern-expected.txt_sec1
1
1
2
EVENT(canplaythrough)
2
EVENT(canplaythrough)
3
EVENT(seeked)
3
EVENT(seeked)
4
Saw close enough to (194, 193, 14) at (40, 165) OK
4
Saw close enough to (200, 200, 0) at (40, 165) OK
5
Saw close enough to (194, 193, 14) at (355, 165) OK
5
Saw close enough to (200, 200, 0) at (355, 165) OK
6
Saw close enough to (194, 193, 14) at (40, 403) OK
6
Saw close enough to (200, 200, 0) at (40, 403) OK
7
Saw close enough to (194, 193, 14) at (355, 403) OK
7
Saw close enough to (200, 200, 0) at (355, 403) OK
8
Saw close enough to (17, 197, 195) at (56, 165) OK
8
Saw close enough to (57, 202, 203) at (56, 165) OK
9
Saw close enough to (17, 197, 195) at (371, 165) OK
9
Saw close enough to (57, 202, 203) at (371, 165) OK
10
Saw close enough to (17, 197, 195) at (56, 403) OK
10
Saw close enough to (57, 202, 203) at (56, 403) OK
11
Saw close enough to (17, 197, 195) at (371, 403) OK
11
Saw close enough to (57, 202, 203) at (371, 403) OK
12
Saw close enough to (20, 200, 18) at (73, 165) OK
12
Saw close enough to (53, 203, 9) at (73, 165) OK
13
Saw close enough to (20, 200, 18) at (388, 165) OK
13
Saw close enough to (53, 203, 9) at (388, 165) OK
14
Saw close enough to (20, 200, 18) at (73, 403) OK
14
Saw close enough to (53, 203, 9) at (73, 403) OK
15
Saw close enough to (20, 200, 18) at (388, 403) OK
15
Saw close enough to (53, 203, 9) at (388, 403) OK
16
EVENT(seeked)
16
EVENT(seeked)
17
Saw close enough to (194, 193, 14) at (40, 165) OK
17
Saw close enough to (200, 200, 0) at (40, 165) OK
18
Saw close enough to (194, 193, 14) at (355, 165) OK
18
Saw close enough to (200, 200, 0) at (355, 165) OK
19
Saw close enough to (194, 193, 14) at (40, 403) OK
19
Saw close enough to (200, 200, 0) at (40, 403) OK
20
Saw close enough to (194, 193, 14) at (355, 403) OK
20
Saw close enough to (200, 200, 0) at (355, 403) OK
21
Saw close enough to (17, 197, 195) at (56, 165) OK
21
Saw close enough to (57, 202, 203) at (56, 165) OK
22
Saw close enough to (17, 197, 195) at (371, 165) OK
22
Saw close enough to (57, 202, 203) at (371, 165) OK
23
Saw close enough to (17, 197, 195) at (56, 403) OK
23
Saw close enough to (57, 202, 203) at (56, 403) OK
24
Saw close enough to (17, 197, 195) at (371, 403) OK
24
Saw close enough to (57, 202, 203) at (371, 403) OK
25
Saw close enough to (20, 200, 18) at (73, 165) OK
25
Saw close enough to (53, 203, 9) at (73, 165) OK
26
Saw close enough to (20, 200, 18) at (388, 165) OK
26
Saw close enough to (53, 203, 9) at (388, 165) OK
27
Saw close enough to (20, 200, 18) at (73, 403) OK
27
Saw close enough to (53, 203, 9) at (73, 403) OK
28
Saw close enough to (20, 200, 18) at (388, 403) OK
28
Saw close enough to (53, 203, 9) at (388, 403) OK
29
EVENT(seeked)
29
EVENT(seeked)
30
Saw close enough to (194, 193, 14) at (40, 165) OK
30
Saw close enough to (200, 200, 0) at (40, 165) OK
31
Saw close enough to (194, 193, 14) at (355, 165) OK
31
Saw close enough to (200, 200, 0) at (355, 165) OK
32
Saw close enough to (194, 193, 14) at (40, 403) OK
32
Saw close enough to (200, 200, 0) at (40, 403) OK
33
Saw close enough to (194, 193, 14) at (355, 403) OK
33
Saw close enough to (200, 200, 0) at (355, 403) OK
34
Saw close enough to (17, 197, 195) at (56, 165) OK
34
Saw close enough to (57, 202, 203) at (56, 165) OK
35
Saw close enough to (17, 197, 195) at (371, 165) OK
35
Saw close enough to (57, 202, 203) at (371, 165) OK
36
Saw close enough to (17, 197, 195) at (56, 403) OK
36
Saw close enough to (57, 202, 203) at (56, 403) OK
37
Saw close enough to (17, 197, 195) at (371, 403) OK
37
Saw close enough to (57, 202, 203) at (371, 403) OK
38
Saw close enough to (20, 200, 18) at (73, 165) OK
38
Saw close enough to (53, 203, 9) at (73, 165) OK
39
Saw close enough to (20, 200, 18) at (388, 165) OK
39
Saw close enough to (53, 203, 9) at (388, 165) OK
40
Saw close enough to (20, 200, 18) at (73, 403) OK
40
Saw close enough to (53, 203, 9) at (73, 403) OK
41
Saw close enough to (20, 200, 18) at (388, 403) OK
41
Saw close enough to (53, 203, 9) at (388, 403) OK
42
EVENT(seeked)
42
EVENT(seeked)
43
Saw close enough to (194, 193, 14) at (40, 165) OK
43
Saw close enough to (200, 200, 0) at (40, 165) OK
44
Saw close enough to (194, 193, 14) at (355, 165) OK
44
Saw close enough to (200, 200, 0) at (355, 165) OK
45
Saw close enough to (194, 193, 14) at (40, 403) OK
45
Saw close enough to (200, 200, 0) at (40, 403) OK
46
Saw close enough to (194, 193, 14) at (355, 403) OK
46
Saw close enough to (200, 200, 0) at (355, 403) OK
47
Saw close enough to (17, 197, 195) at (56, 165) OK
47
Saw close enough to (57, 202, 203) at (56, 165) OK
48
Saw close enough to (17, 197, 195) at (371, 165) OK
48
Saw close enough to (57, 202, 203) at (371, 165) OK
49
Saw close enough to (17, 197, 195) at (56, 403) OK
49
Saw close enough to (57, 202, 203) at (56, 403) OK
50
Saw close enough to (17, 197, 195) at (371, 403) OK
50
Saw close enough to (57, 202, 203) at (371, 403) OK
51
Saw close enough to (20, 200, 18) at (73, 165) OK
51
Saw close enough to (53, 203, 9) at (73, 165) OK
52
Saw close enough to (20, 200, 18) at (388, 165) OK
52
Saw close enough to (53, 203, 9) at (388, 165) OK
53
Saw close enough to (20, 200, 18) at (73, 403) OK
53
Saw close enough to (53, 203, 9) at (73, 403) OK
54
Saw close enough to (20, 200, 18) at (388, 403) OK
54
Saw close enough to (53, 203, 9) at (388, 403) OK
55
END OF TEST
55
END OF TEST
56
56
- a/LayoutTests/media/video-canvas-createPattern.html -12 / +12 lines
Lines 10-29 a/LayoutTests/media/video-canvas-createPattern.html_sec1
10
10
11
            var expectedResults = [
11
            var expectedResults = [
12
                // Each entry is formatted as [x, y, r, g, b].
12
                // Each entry is formatted as [x, y, r, g, b].
13
                [40, 165, 194, 193, 14], // Represents yellow north west tile.
13
                [40, 165, 200, 200, 0], // Represents yellow north west tile.
14
                [355, 165, 194, 193, 14], // Represents yellow north east tile.
14
                [355, 165, 200, 200, 0], // Represents yellow north east tile.
15
                [40, 403, 194, 193, 14], // Represents yellow south west tile.
15
                [40, 403, 200, 200, 0], // Represents yellow south west tile.
16
                [355, 403, 194, 193, 14], // Represents yellow south east tile.
16
                [355, 403, 200, 200, 0], // Represents yellow south east tile.
17
17
18
                [56, 165, 17, 197, 195], // Represents blue/cyan north west tile.
18
                [56, 165, 57, 202, 203], // Represents blue/cyan north west tile.
19
                [371, 165, 17, 197, 195], // Represents blue/cyan north east tile.
19
                [371, 165, 57, 202, 203], // Represents blue/cyan north east tile.
20
                [56, 403, 17, 197, 195], // Represents blue/cyan south west tile.
20
                [56, 403, 57, 202, 203], // Represents blue/cyan south west tile.
21
                [371, 403, 17, 197, 195], // Represents blue/cyan south east tile.
21
                [371, 403, 57, 202, 203], // Represents blue/cyan south east tile.
22
22
23
                [73, 165, 20, 200, 18], // Represents green north west tile.
23
                [73, 165, 53, 203, 9], // Represents green north west tile.
24
                [388, 165, 20, 200, 18], // Represents green north east tile.
24
                [388, 165, 53, 203, 9], // Represents green north east tile.
25
                [73, 403, 20, 200, 18], // Represents green south west tile.
25
                [73, 403, 53, 203, 9], // Represents green south west tile.
26
                [388, 403, 20, 200, 18], // Represents green south east tile.
26
                [388, 403, 53, 203, 9], // Represents green south east tile.
27
            ]
27
            ]
28
28
29
            if (window.testRunner) {
29
            if (window.testRunner) {
- a/LayoutTests/media/video-canvas-drawing-output-expected.txt -12 / +12 lines
Lines 1-20 a/LayoutTests/media/video-canvas-drawing-output-expected.txt_sec1
1
1
2
EVENT(canplaythrough)
2
EVENT(canplaythrough)
3
EVENT(seeked)
3
EVENT(seeked)
4
Saw close enough to (194, 193, 14) at (40, 165) OK
4
Saw close enough to (200, 200, 0) at (40, 165) OK
5
Saw close enough to (17, 197, 195) at (56, 165) OK
5
Saw close enough to (57, 202, 203) at (56, 165) OK
6
Saw close enough to (20, 200, 18) at (73, 165) OK
6
Saw close enough to (53, 203, 9) at (73, 165) OK
7
EVENT(seeked)
7
EVENT(seeked)
8
Saw close enough to (194, 193, 14) at (40, 165) OK
8
Saw close enough to (200, 200, 0) at (40, 165) OK
9
Saw close enough to (17, 197, 195) at (56, 165) OK
9
Saw close enough to (57, 202, 203) at (56, 165) OK
10
Saw close enough to (20, 200, 18) at (73, 165) OK
10
Saw close enough to (53, 203, 9) at (73, 165) OK
11
EVENT(seeked)
11
EVENT(seeked)
12
Saw close enough to (194, 193, 14) at (40, 165) OK
12
Saw close enough to (200, 200, 0) at (40, 165) OK
13
Saw close enough to (17, 197, 195) at (56, 165) OK
13
Saw close enough to (57, 202, 203) at (56, 165) OK
14
Saw close enough to (20, 200, 18) at (73, 165) OK
14
Saw close enough to (53, 203, 9) at (73, 165) OK
15
EVENT(seeked)
15
EVENT(seeked)
16
Saw close enough to (194, 193, 14) at (40, 165) OK
16
Saw close enough to (200, 200, 0) at (40, 165) OK
17
Saw close enough to (17, 197, 195) at (56, 165) OK
17
Saw close enough to (57, 202, 203) at (56, 165) OK
18
Saw close enough to (20, 200, 18) at (73, 165) OK
18
Saw close enough to (53, 203, 9) at (73, 165) OK
19
END OF TEST
19
END OF TEST
20
20
- a/LayoutTests/media/video-canvas-drawing-output.html -3 / +3 lines
Lines 8-16 a/LayoutTests/media/video-canvas-drawing-output.html_sec1
8
8
9
            var expectedResults = [
9
            var expectedResults = [
10
                // [x, y, r, g, b]
10
                // [x, y, r, g, b]
11
                [40, 165, 194, 193, 14], // yellow
11
                [40, 165, 200, 200, 0], // yellow
12
                [56, 165, 17, 197, 195], // blue/cyan
12
                [56, 165, 57, 202, 203], // blue/cyan
13
                [73, 165, 20, 200, 18], // green
13
                [73, 165, 53, 203, 9], // green
14
            ];
14
            ];
15
15
16
            if (window.testRunner) {
16
            if (window.testRunner) {
- a/LayoutTests/media/video-orientation-canvas-expected.txt -3 / +3 lines
Lines 1-6 a/LayoutTests/media/video-orientation-canvas-expected.txt_sec1
1
1
2
EXPECTED (context.getImageData(88, 115, 1, 1).data == [208,0,0,255] with tolerance 5 OK
2
EXPECTED (context.getImageData(88, 115, 1, 1).data == [208,30,0,255] with tolerance 5 OK
3
EXPECTED (context.getImageData(237, 88, 1, 1).data == [208,0,0,255] with tolerance 5 OK
3
EXPECTED (context.getImageData(237, 88, 1, 1).data == [208,30,0,255] with tolerance 5 OK
4
EXPECTED (context.getImageData(200, 237, 1, 1).data == [208,0,0,255] with tolerance 5 OK
4
EXPECTED (context.getImageData(200, 237, 1, 1).data == [208,30,0,255] with tolerance 5 OK
5
END OF TEST
5
END OF TEST
6
6
- a/LayoutTests/media/video-orientation-canvas.html -2 / +2 lines
Lines 4-10 a/LayoutTests/media/video-orientation-canvas.html_sec1
4
    <title>video-orientation-canvas</title>
4
    <title>video-orientation-canvas</title>
5
    <script src="video-test.js"></script>
5
    <script src="video-test.js"></script>
6
    <script>
6
    <script>
7
        let redColor = new Uint8ClampedArray([208, 0, 0, 255]);
7
        let redColor = new Uint8ClampedArray([208, 30, 0, 255]);
8
        var context;
8
        var context;
9
9
10
        function arraysAreApproximatelyEqual(arrayString, expected, tolerance) {
10
        function arraysAreApproximatelyEqual(arrayString, expected, tolerance) {
Lines 74-77 a/LayoutTests/media/video-orientation-canvas.html_sec2
74
    <canvas id=canvas2></canvas>
74
    <canvas id=canvas2></canvas>
75
    <canvas id=canvas3></canvas>
75
    <canvas id=canvas3></canvas>
76
</body>
76
</body>
77
</html>
77
</html>
- a/LayoutTests/platform/glib/TestExpectations -2 lines
Lines 232-239 media/media-controller-time-constant.html [ Pass ] a/LayoutTests/platform/glib/TestExpectations_sec1
232
media/media-controller-time.html [ Pass ]
232
media/media-controller-time.html [ Pass ]
233
media/media-controller-unpause.html [ Pass ]
233
media/media-controller-unpause.html [ Pass ]
234
media/mediacapabilities/mediacapabilities-types.html [ Pass ]
234
media/mediacapabilities/mediacapabilities-types.html [ Pass ]
235
media/video-canvas-createPattern.html [ Pass ]
236
media/video-canvas-drawing-output.html [ Pass ]
237
media/video-controller-currentTime-rate.html [ Pass ]
235
media/video-controller-currentTime-rate.html [ Pass ]
238
webaudio/codec-tests/aac/vbr-128kbps-44khz.html [ Pass ]
236
webaudio/codec-tests/aac/vbr-128kbps-44khz.html [ Pass ]
239
webaudio/codec-tests/mp3/128kbps-44khz.html [ Pass ]
237
webaudio/codec-tests/mp3/128kbps-44khz.html [ Pass ]
- a/LayoutTests/platform/ios-14/TestExpectations +2 lines
Lines 72-77 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/can a/LayoutTests/platform/ios-14/TestExpectations_sec1
72
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html [ Failure ]
72
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html [ Failure ]
73
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html [ Failure ]
73
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html [ Failure ]
74
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html [ Failure ]
74
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html [ Failure ]
75
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html [ Failure ]
76
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html [ Failure ]
75
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html [ Failure ]
77
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html [ Failure ]
76
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html [ Failure ]
78
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html [ Failure ]
77
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html [ Failure ]
79
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html [ Failure ]
- a/LayoutTests/platform/ios-device/TestExpectations -2 lines
Lines 99-106 js/stringimpl-to-jsstring-on-large-strings-3.html [ Crash ] a/LayoutTests/platform/ios-device/TestExpectations_sec1
99
99
100
loader/go-back-to-different-window-size.html [ Crash ]
100
loader/go-back-to-different-window-size.html [ Crash ]
101
101
102
media/video-canvas-createPattern.html [ Failure ]
103
media/video-canvas-drawing-output.html [ Failure ]
104
media/video-load-preload-metadata.html [ Failure ]
102
media/video-load-preload-metadata.html [ Failure ]
105
media/video-played-collapse.html [ Failure ]
103
media/video-played-collapse.html [ Failure ]
106
media/video-played-reset.html [ Failure ]
104
media/video-played-reset.html [ Failure ]
- a/LayoutTests/platform/ios/TestExpectations +2 lines
Lines 3484-3489 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/can a/LayoutTests/platform/ios/TestExpectations_sec1
3484
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html [ Pass ]
3484
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html [ Pass ]
3485
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html [ Pass ]
3485
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html [ Pass ]
3486
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html [ Pass ]
3486
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html [ Pass ]
3487
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html [ Pass ]
3488
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html [ Pass ]
3487
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html [ Pass ]
3489
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html [ Pass ]
3488
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html [ Pass ]
3490
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html [ Pass ]
3489
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html [ Pass ]
3491
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html [ Pass ]
- a/LayoutTests/platform/ios/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt +21 lines
Line 0 a/LayoutTests/platform/ios/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt_sec1
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
2
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html
4
5
[ 1: PASS ] shouldBe 0,255,0
6
[ 2: PASS ] shouldBe 255,0,0
7
[ 3: PASS ] getError was expected value: NO_ERROR : should be no errors
8
[ 4: PASS ] shouldBe 255,0,0
9
[ 5: PASS ] shouldBe 0,255,0
10
[ 6: PASS ] getError was expected value: NO_ERROR : should be no errors
11
[ 7: PASS ] shouldBe 0,255,0
12
[ 8: PASS ] shouldBe 255,0,0
13
[ 9: PASS ] getError was expected value: NO_ERROR : should be no errors
14
[ 10: PASS ] shouldBe 255,0,0
15
[ 11: PASS ] shouldBe 0,255,0
16
[ 12: PASS ] getError was expected value: NO_ERROR : should be no errors
17
[ 13: FAIL ] shouldBe 0,255,0 at (4, 24) expected: 0,255,0 was 63,251,0
18
[ 14: FAIL ] shouldBe 255,0,0 at (4, 4) expected: 255,0,0 was 247,36,0
19
[ 15: PASS ] getError was expected value: NO_ERROR : should be no errors
20
[ 16: PASS ] successfullyParsed is true
21
[ FAIL ] 2 failures reported
- a/LayoutTests/platform/ios/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt +21 lines
Line 0 a/LayoutTests/platform/ios/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt_sec1
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
2
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html?webglVersion=2
4
5
[ 1: PASS ] shouldBe 0,255,0
6
[ 2: PASS ] shouldBe 255,0,0
7
[ 3: PASS ] getError was expected value: NO_ERROR : should be no errors
8
[ 4: PASS ] shouldBe 255,0,0
9
[ 5: PASS ] shouldBe 0,255,0
10
[ 6: PASS ] getError was expected value: NO_ERROR : should be no errors
11
[ 7: PASS ] shouldBe 0,255,0
12
[ 8: PASS ] shouldBe 255,0,0
13
[ 9: PASS ] getError was expected value: NO_ERROR : should be no errors
14
[ 10: PASS ] shouldBe 255,0,0
15
[ 11: PASS ] shouldBe 0,255,0
16
[ 12: PASS ] getError was expected value: NO_ERROR : should be no errors
17
[ 13: FAIL ] shouldBe 0,255,0 at (4, 24) expected: 0,255,0 was 63,251,0
18
[ 14: FAIL ] shouldBe 255,0,0 at (4, 4) expected: 255,0,0 was 247,36,0
19
[ 15: PASS ] getError was expected value: NO_ERROR : should be no errors
20
[ 16: PASS ] successfullyParsed is true
21
[ FAIL ] 2 failures reported
- a/LayoutTests/platform/mac-bigsur/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt +21 lines
Line 0 a/LayoutTests/platform/mac-bigsur/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt_sec1
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
2
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html
4
5
[ 1: PASS ] shouldBe 0,255,0
6
[ 2: PASS ] shouldBe 255,0,0
7
[ 3: PASS ] getError was expected value: NO_ERROR : should be no errors
8
[ 4: PASS ] shouldBe 255,0,0
9
[ 5: PASS ] shouldBe 0,255,0
10
[ 6: PASS ] getError was expected value: NO_ERROR : should be no errors
11
[ 7: PASS ] shouldBe 0,255,0
12
[ 8: PASS ] shouldBe 255,0,0
13
[ 9: PASS ] getError was expected value: NO_ERROR : should be no errors
14
[ 10: PASS ] shouldBe 255,0,0
15
[ 11: PASS ] shouldBe 0,255,0
16
[ 12: PASS ] getError was expected value: NO_ERROR : should be no errors
17
[ 13: FAIL ] shouldBe 0,255,0 at (4, 24) expected: 0,255,0 was 63,251,0
18
[ 14: FAIL ] shouldBe 255,0,0 at (4, 4) expected: 255,0,0 was 247,36,0
19
[ 15: PASS ] getError was expected value: NO_ERROR : should be no errors
20
[ 16: PASS ] successfullyParsed is true
21
[ FAIL ] 2 failures reported
- a/LayoutTests/platform/mac-bigsur/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt +21 lines
Line 0 a/LayoutTests/platform/mac-bigsur/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt_sec1
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
2
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html?webglVersion=2
4
5
[ 1: PASS ] shouldBe 0,255,0
6
[ 2: PASS ] shouldBe 255,0,0
7
[ 3: PASS ] getError was expected value: NO_ERROR : should be no errors
8
[ 4: PASS ] shouldBe 255,0,0
9
[ 5: PASS ] shouldBe 0,255,0
10
[ 6: PASS ] getError was expected value: NO_ERROR : should be no errors
11
[ 7: PASS ] shouldBe 0,255,0
12
[ 8: PASS ] shouldBe 255,0,0
13
[ 9: PASS ] getError was expected value: NO_ERROR : should be no errors
14
[ 10: PASS ] shouldBe 255,0,0
15
[ 11: PASS ] shouldBe 0,255,0
16
[ 12: PASS ] getError was expected value: NO_ERROR : should be no errors
17
[ 13: FAIL ] shouldBe 0,255,0 at (4, 24) expected: 0,255,0 was 63,251,0
18
[ 14: FAIL ] shouldBe 255,0,0 at (4, 4) expected: 255,0,0 was 247,36,0
19
[ 15: PASS ] getError was expected value: NO_ERROR : should be no errors
20
[ 16: PASS ] successfullyParsed is true
21
[ FAIL ] 2 failures reported
- a/LayoutTests/platform/mac-catalina/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt +21 lines
Line 0 a/LayoutTests/platform/mac-catalina/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt_sec1
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
2
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html
4
5
[ 1: PASS ] shouldBe 0,255,0
6
[ 2: PASS ] shouldBe 255,0,0
7
[ 3: PASS ] getError was expected value: NO_ERROR : should be no errors
8
[ 4: PASS ] shouldBe 255,0,0
9
[ 5: PASS ] shouldBe 0,255,0
10
[ 6: PASS ] getError was expected value: NO_ERROR : should be no errors
11
[ 7: PASS ] shouldBe 0,255,0
12
[ 8: PASS ] shouldBe 255,0,0
13
[ 9: PASS ] getError was expected value: NO_ERROR : should be no errors
14
[ 10: PASS ] shouldBe 255,0,0
15
[ 11: PASS ] shouldBe 0,255,0
16
[ 12: PASS ] getError was expected value: NO_ERROR : should be no errors
17
[ 13: FAIL ] shouldBe 0,255,0 at (4, 24) expected: 0,255,0 was 63,251,0
18
[ 14: FAIL ] shouldBe 255,0,0 at (4, 4) expected: 255,0,0 was 247,36,0
19
[ 15: PASS ] getError was expected value: NO_ERROR : should be no errors
20
[ 16: PASS ] successfullyParsed is true
21
[ FAIL ] 2 failures reported
- a/LayoutTests/platform/mac-catalina/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt +21 lines
Line 0 a/LayoutTests/platform/mac-catalina/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt_sec1
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
2
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html?webglVersion=2
4
5
[ 1: PASS ] shouldBe 0,255,0
6
[ 2: PASS ] shouldBe 255,0,0
7
[ 3: PASS ] getError was expected value: NO_ERROR : should be no errors
8
[ 4: PASS ] shouldBe 255,0,0
9
[ 5: PASS ] shouldBe 0,255,0
10
[ 6: PASS ] getError was expected value: NO_ERROR : should be no errors
11
[ 7: PASS ] shouldBe 0,255,0
12
[ 8: PASS ] shouldBe 255,0,0
13
[ 9: PASS ] getError was expected value: NO_ERROR : should be no errors
14
[ 10: PASS ] shouldBe 255,0,0
15
[ 11: PASS ] shouldBe 0,255,0
16
[ 12: PASS ] getError was expected value: NO_ERROR : should be no errors
17
[ 13: FAIL ] shouldBe 0,255,0 at (4, 24) expected: 0,255,0 was 63,251,0
18
[ 14: FAIL ] shouldBe 255,0,0 at (4, 4) expected: 255,0,0 was 247,36,0
19
[ 15: PASS ] getError was expected value: NO_ERROR : should be no errors
20
[ 16: PASS ] successfullyParsed is true
21
[ FAIL ] 2 failures reported
- a/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY-expected.txt -1 / +1 lines
Lines 8-14 PASS createImageBitmap from an HTMLVideoElement from a data URL imageOrientation a/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY-expected.txt_sec1
8
PASS createImageBitmap from a bitmap HTMLImageElement imageOrientation: "none", and drawImage on the created ImageBitmap
8
PASS createImageBitmap from a bitmap HTMLImageElement imageOrientation: "none", and drawImage on the created ImageBitmap
9
PASS createImageBitmap from a bitmap HTMLImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap
9
PASS createImageBitmap from a bitmap HTMLImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap
10
PASS createImageBitmap from a vector HTMLImageElement imageOrientation: "none", and drawImage on the created ImageBitmap
10
PASS createImageBitmap from a vector HTMLImageElement imageOrientation: "none", and drawImage on the created ImageBitmap
11
FAIL createImageBitmap from a vector HTMLImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap assert_approx_equals: Red channel of the pixel at (5, 15) expected 255 +/- 10 but got 0
11
FAIL createImageBitmap from a vector HTMLImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap assert_approx_equals: Red channel of the pixel at (5, 5) expected 0 +/- 1 but got 255
12
FAIL createImageBitmap from a bitmap SVGImageElement imageOrientation: "none", and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
12
FAIL createImageBitmap from a bitmap SVGImageElement imageOrientation: "none", and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
13
FAIL createImageBitmap from a bitmap SVGImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
13
FAIL createImageBitmap from a bitmap SVGImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
14
FAIL createImageBitmap from a vector SVGImageElement imageOrientation: "none", and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
14
FAIL createImageBitmap from a vector SVGImageElement imageOrientation: "none", and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
- a/LayoutTests/platform/mac-wk2/TestExpectations -1 lines
Lines 1214-1220 webkit.org/b/179796 http/tests/cache/disk-cache/disk-cache-validation-back-navig a/LayoutTests/platform/mac-wk2/TestExpectations_sec1
1214
[ arm64 ] imported/w3c/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html [ Failure ]
1214
[ arm64 ] imported/w3c/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html [ Failure ]
1215
[ arm64 ] imported/w3c/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html [ Failure ]
1215
[ arm64 ] imported/w3c/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html [ Failure ]
1216
[ arm64 ] inspector/canvas/memory.html [ Failure ]
1216
[ arm64 ] inspector/canvas/memory.html [ Failure ]
1217
[ arm64 ] media/video-canvas-createPattern.html [ Failure ]
1218
1217
1219
webkit.org/b/229671 [ BigSur+ Debug arm64 ] imported/w3c/web-platform-tests/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-auto.html [ Pass Crash ]
1218
webkit.org/b/229671 [ BigSur+ Debug arm64 ] imported/w3c/web-platform-tests/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-auto.html [ Pass Crash ]
1220
1219
- a/LayoutTests/platform/mac/TestExpectations -3 / +2 lines
Lines 1930-1938 webkit.org/b/230411 http/tests/media/hls/video-controller-getStartDate.html [ Pa a/LayoutTests/platform/mac/TestExpectations_sec1
1930
1930
1931
webkit.org/b/227891 http/tests/appcache/fail-on-update.html [ Pass Timeout DumpJSConsoleLogInStdErr ]
1931
webkit.org/b/227891 http/tests/appcache/fail-on-update.html [ Pass Timeout DumpJSConsoleLogInStdErr ]
1932
1932
1933
# rdar://66660680 (REGRESSION (20A2327a-20A2348b): media/video-canvas-createPattern.html is failing)
1934
[ BigSur+ ] media/video-canvas-createPattern.html [ Failure ]
1935
1936
# Remove this once <rdar://problem/66734187> hits the bots
1933
# Remove this once <rdar://problem/66734187> hits the bots
1937
[ BigSur+ ] fast/text/locale-shaping.html [ Pass ImageOnlyFailure ]
1934
[ BigSur+ ] fast/text/locale-shaping.html [ Pass ImageOnlyFailure ]
1938
1935
Lines 2366-2371 webkit.org/b/231463 fast/css/accent-color/range.html [ ImageOnlyFailure ] a/LayoutTests/platform/mac/TestExpectations_sec2
2366
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html [ Pass ]
2363
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html [ Pass ]
2367
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html [ Pass ]
2364
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html [ Pass ]
2368
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html [ Pass ]
2365
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html [ Pass ]
2366
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html [ Pass ]
2367
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html [ Pass ]
2369
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html [ Pass ]
2368
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html [ Pass ]
2370
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html [ Pass ]
2369
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html [ Pass ]
2371
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html [ Pass ]
2370
[ Monterey+ ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html [ Pass ]
- a/LayoutTests/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt -1 / +18 lines
Lines 1-4 a/LayoutTests/webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos-expected.txt_sec1
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
2
2
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html
4
[ PASS ] All tests passed
4
5
[ 1: PASS ] shouldBe 0,255,0
6
[ 2: PASS ] shouldBe 255,0,0
7
[ 3: PASS ] getError was expected value: NO_ERROR : should be no errors
8
[ 4: PASS ] shouldBe 255,0,0
9
[ 5: PASS ] shouldBe 0,255,0
10
[ 6: PASS ] getError was expected value: NO_ERROR : should be no errors
11
[ 7: PASS ] shouldBe 0,255,0
12
[ 8: PASS ] shouldBe 255,0,0
13
[ 9: PASS ] getError was expected value: NO_ERROR : should be no errors
14
[ 10: PASS ] shouldBe 255,0,0
15
[ 11: PASS ] shouldBe 0,255,0
16
[ 12: PASS ] getError was expected value: NO_ERROR : should be no errors
17
[ 13: FAIL ] shouldBe 0,255,0 at (4, 24) expected: 0,255,0 was 63,251,0
18
[ 14: FAIL ] shouldBe 255,0,0 at (4, 4) expected: 255,0,0 was 248,36,0
19
[ 15: PASS ] getError was expected value: NO_ERROR : should be no errors
20
[ 16: PASS ] successfullyParsed is true
21
[ FAIL ] 2 failures reported
- a/LayoutTests/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt -1 / +18 lines
Lines 1-4 a/LayoutTests/webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos-expected.txt_sec1
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
1
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
2
2
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html?webglVersion=2
3
Test: ../../../../resources/webgl_test_files/conformance/textures/misc/texture-corner-case-videos.html?webglVersion=2
4
[ PASS ] All tests passed
4
5
[ 1: PASS ] shouldBe 0,255,0
6
[ 2: PASS ] shouldBe 255,0,0
7
[ 3: PASS ] getError was expected value: NO_ERROR : should be no errors
8
[ 4: PASS ] shouldBe 255,0,0
9
[ 5: PASS ] shouldBe 0,255,0
10
[ 6: PASS ] getError was expected value: NO_ERROR : should be no errors
11
[ 7: PASS ] shouldBe 0,255,0
12
[ 8: PASS ] shouldBe 255,0,0
13
[ 9: PASS ] getError was expected value: NO_ERROR : should be no errors
14
[ 10: PASS ] shouldBe 255,0,0
15
[ 11: PASS ] shouldBe 0,255,0
16
[ 12: PASS ] getError was expected value: NO_ERROR : should be no errors
17
[ 13: FAIL ] shouldBe 0,255,0 at (4, 24) expected: 0,255,0 was 63,251,0
18
[ 14: FAIL ] shouldBe 255,0,0 at (4, 4) expected: 255,0,0 was 248,36,0
19
[ 15: PASS ] getError was expected value: NO_ERROR : should be no errors
20
[ 16: PASS ] successfullyParsed is true
21
[ FAIL ] 2 failures reported

Return to Bug 229025