Title: [294948] trunk

Diff

Deleted: trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html (294947 => 294948)


--- trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html	2022-05-27 19:20:27 UTC (rev 294947)
+++ trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html	2022-05-27 19:29:41 UTC (rev 294948)
@@ -1,13 +0,0 @@
-<body>
-    <canvas id="target" width="400" height="400"></canvas>
-    <script>
-        const targetCanvas = document.getElementById('target');
-        const target = targetCanvas.getContext('2d');
-
-        const canvasWidth = targetCanvas.width;
-        const canvasHeight = targetCanvas.height
-
-        target.fillStyle = 'green';
-        target.fillRect(0, 0, canvasWidth, canvasHeight);
-    </script>
-</body>

Deleted: trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html (294947 => 294948)


--- trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html	2022-05-27 19:20:27 UTC (rev 294947)
+++ trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html	2022-05-27 19:29:41 UTC (rev 294948)
@@ -1,50 +0,0 @@
-<body>
-    <canvas id="target" width="400" height="400"></canvas>
-    <script>
-        const targetCanvas = document.getElementById('target');
-        const target = targetCanvas.getContext('2d');
-
-        const canvasWidth = targetCanvas.width;
-        const canvasHeight = targetCanvas.height
-
-        var sourceCanvas = document.createElement('canvas');
-        sourceCanvas.width  = canvasWidth;
-        sourceCanvas.height = canvasHeight;
-
-        const source = sourceCanvas.getContext('2d');
-
-        let progressX = 0;
-        let progressY = 0;
-        const paintSize = 100;
-
-        source.fillStyle = 'green';
-        source.fillRect(0, 0, canvasWidth, canvasHeight);
-        const imagedata = source.getImageData(0, 0, canvasWidth, canvasHeight);
-
-        function drawLoop() {
-            target.putImageData(imagedata, 0, 0, progressX, progressY, paintSize, paintSize);
-
-            progressX += paintSize;
-
-            if (progressX + paintSize <= canvasWidth) {
-                requestAnimationFrame(drawLoop);
-                return;
-            }
-
-            if (progressY + paintSize > canvasHeight) {
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-
-            progressX = 0;
-            progressY += paintSize;
-            requestAnimationFrame(drawLoop);
-        }
-
-        if (window.testRunner)
-            testRunner.waitUntilDone();
-
-        requestAnimationFrame(drawLoop);
-    </script>
-</body>

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (294947 => 294948)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-05-27 19:20:27 UTC (rev 294947)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-05-27 19:29:41 UTC (rev 294948)
@@ -1712,6 +1712,27 @@
 
 webkit.org/b/240670 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-into-script-disabled-iframe.html [ Pass Crash ]
 
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgb-rgb-unsigned_short_5_6_5.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgba-rgba-unsigned_byte.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r16f-red-float.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r8-red-unsigned_byte.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb5_a1-rgba-unsigned_short_5_5_5_1.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb16f-rgb-float.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb565-rgb-unsigned_short_5_6_5.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb9_e5-rgb-half_float.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgba32f-rgba-float.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgba8ui-rgba_integer-unsigned_byte.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r32f-red-float.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb8-rgb-unsigned_byte.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb9_e5-rgb-float.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgba4-rgba-unsigned_byte.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-rgb16f-rgb-half_float.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-3d-srgb8-rgb-unsigned_byte.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r11f_g11f_b10f-rgb-float.html [ Pass Failure ]
+webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r16f-red-half_float.html [ Pass Failure ]
+
 webkit.org/b/240814 webrtc/canvas-to-peer-connection.html [ Pass Failure ]
 
 webkit.org/b/240821 [ Monterey Release ] webgl/max-active-contexts-webglcontextlost-prevent-default.html [ Slow ]

Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (294947 => 294948)


--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h	2022-05-27 19:20:27 UTC (rev 294947)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h	2022-05-27 19:29:41 UTC (rev 294948)
@@ -100,7 +100,6 @@
     virtual void flushDrawingContext() { }
     virtual bool flushDrawingContextAsync() { return false; }
     virtual void didFlush(GraphicsContextFlushIdentifier) { }
-    virtual void setNeedsFlush(bool) { }
 
     virtual FloatSize logicalSize() const = 0;
     virtual IntSize truncatedLogicalSize() const = 0; // This truncates the real size. You probably should be calling logicalSize() instead.

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (294947 => 294948)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2022-05-27 19:20:27 UTC (rev 294947)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2022-05-27 19:29:41 UTC (rev 294948)
@@ -95,9 +95,6 @@
     // FIXME: This is currently invoked in an ad-hoc manner when recording drawing items. We should consider either
     // splitting GraphicsContext state changes into individual display list items, or refactoring the code such that
     // this method is automatically invoked when recording a drawing item.
-
-    setNeedsFlush(true);
-
     auto& state = currentState().state;
     if (!state.changes())
         return;

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (294947 => 294948)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-05-27 19:20:27 UTC (rev 294947)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-05-27 19:29:41 UTC (rev 294948)
@@ -135,8 +135,6 @@
     virtual bool recordResourceUse(const SourceImage&) = 0;
     virtual bool recordResourceUse(Font&) = 0;
 
-    virtual void setNeedsFlush(bool) { }
-
     struct ContextState {
         GraphicsContextState state;
         std::optional<GraphicsContextState> lastDrawingState;

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp (294947 => 294948)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp	2022-05-27 19:20:27 UTC (rev 294947)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp	2022-05-27 19:29:41 UTC (rev 294948)
@@ -434,13 +434,6 @@
     return true;
 }
 
-void RemoteDisplayListRecorderProxy::setNeedsFlush(bool needsFlush)
-{
-    if (UNLIKELY(!m_imageBuffer))
-        return;
-    m_imageBuffer->setNeedsFlush(needsFlush);
-}
-
 void RemoteDisplayListRecorderProxy::flushContext(GraphicsContextFlushIdentifier identifier)
 {
     send(Messages::RemoteDisplayListRecorder::FlushContext(identifier));

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h (294947 => 294948)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h	2022-05-27 19:20:27 UTC (rev 294947)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h	2022-05-27 19:29:41 UTC (rev 294948)
@@ -42,6 +42,9 @@
     RemoteDisplayListRecorderProxy(WebCore::ImageBuffer&, RemoteRenderingBackendProxy&, const WebCore::FloatRect& initialClip, const WebCore::AffineTransform&);
     ~RemoteDisplayListRecorderProxy() = default;
 
+    void resetNeedsFlush() { m_needsFlush = false; }
+    bool needsFlush() const { return m_needsFlush; }
+
     void convertToLuminanceMask() final;
     void transformToColorSpace(const WebCore::DestinationColorSpace&) final;
     void flushContext(WebCore::GraphicsContextFlushIdentifier);
@@ -52,6 +55,8 @@
     {
         if (UNLIKELY(!m_renderingBackend))
             return;
+
+        m_needsFlush = true;
         m_renderingBackend->sendToStream(WTFMove(message), m_destinationBufferIdentifier);
     }
 
@@ -132,8 +137,6 @@
     bool recordResourceUse(const WebCore::SourceImage&) final;
     bool recordResourceUse(WebCore::Font&) final;
 
-    void setNeedsFlush(bool) final;
-
     RefPtr<WebCore::ImageBuffer> createImageBuffer(const WebCore::FloatSize&, float resolutionScale, const WebCore::DestinationColorSpace&, std::optional<WebCore::RenderingMode>, std::optional<WebCore::RenderingMethod>) const final;
     RefPtr<WebCore::ImageBuffer> createAlignedImageBuffer(const WebCore::FloatSize&, const WebCore::DestinationColorSpace&, std::optional<WebCore::RenderingMethod>) const final;
     RefPtr<WebCore::ImageBuffer> createAlignedImageBuffer(const WebCore::FloatRect&, const WebCore::DestinationColorSpace&, std::optional<WebCore::RenderingMethod>) const final;
@@ -141,6 +144,7 @@
     WebCore::RenderingResourceIdentifier m_destinationBufferIdentifier;
     WeakPtr<WebCore::ImageBuffer> m_imageBuffer;
     WeakPtr<RemoteRenderingBackendProxy> m_renderingBackend;
+    bool m_needsFlush { false };
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h (294947 => 294948)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h	2022-05-27 19:20:27 UTC (rev 294947)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h	2022-05-27 19:29:41 UTC (rev 294948)
@@ -66,7 +66,7 @@
     ~RemoteImageBufferProxy()
     {
         if (!m_remoteRenderingBackendProxy || m_remoteRenderingBackendProxy->isGPUProcessConnectionClosed()) {
-            setNeedsFlush(false);
+            m_remoteDisplayList.resetNeedsFlush();
             return;
         }
 
@@ -116,11 +116,6 @@
         m_receivedFlushIdentifierChangedCondition.notifyAll();
     }
 
-    void setNeedsFlush(bool needsFlush) final
-    {
-        m_needsFlush = needsFlush;
-    }
-
     void waitForDidFlushWithTimeout()
     {
         if (!m_remoteRenderingBackendProxy)
@@ -251,7 +246,7 @@
 
     void clearBackend() final
     {
-        setNeedsFlush(false);
+        m_remoteDisplayList.resetNeedsFlush();
         didFlush(m_sentFlushIdentifier);
         BaseConcreteImageBuffer::clearBackend();
     }
@@ -276,7 +271,6 @@
         auto& mutableThis = const_cast<RemoteImageBufferProxy&>(*this);
         mutableThis.flushDrawingContextAsync();
         m_remoteRenderingBackendProxy->putPixelBufferForImageBuffer(m_renderingResourceIdentifier, pixelBuffer, srcRect, destPoint, destFormat);
-        setNeedsFlush(true);
     }
 
     void convertToLuminanceMask() final
@@ -315,13 +309,13 @@
         if (UNLIKELY(!m_remoteRenderingBackendProxy))
             return false;
 
-        if (!m_needsFlush)
+        if (!m_remoteDisplayList.needsFlush())
             return hasPendingFlush();
         
         m_sentFlushIdentifier = WebCore::GraphicsContextFlushIdentifier::generate();
         LOG_WITH_STREAM(SharedDisplayLists, stream << "RemoteImageBufferProxy " << m_renderingResourceIdentifier << " flushDrawingContextAsync - flush " << m_sentFlushIdentifier);
         m_remoteDisplayList.flushContext(m_sentFlushIdentifier);
-        setNeedsFlush(false);
+        m_remoteDisplayList.resetNeedsFlush();
         return true;
     }
 
@@ -354,7 +348,6 @@
     WebCore::GraphicsContextFlushIdentifier m_receivedFlushIdentifier WTF_GUARDED_BY_LOCK(m_receivedFlushIdentifierLock); // Only modified on the main thread but may get queried on a secondary thread.
     WeakPtr<RemoteRenderingBackendProxy> m_remoteRenderingBackendProxy;
     RemoteDisplayListRecorderProxy m_remoteDisplayList;
-    bool m_needsFlush { false };
 };
 
 template<typename BackendType>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to