[Cairo][GPUP] GraphicsContextGLOpenGL::paintToCanvas can't paint into a remote canvas WebGL canvas tests are failing in WinCairo WK2 layout tests since r274327 enabled GPU process mode for WebKitTestRunner. webgl/1.0.3/conformance/canvas/canvas-test.html [ Failure ] webgl/1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html [ Failure ] webgl/1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html [ Failure ] webgl/1.0.3/conformance/canvas/to-data-url-test.html [ Failure ] webgl/1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html [ Failure ] webgl/1.0.3/conformance/textures/gl-pixelstorei.html [ Failure ] webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html [ Failure ] webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html [ Failure ] webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html [ Failure ] webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html [ Failure ] webgl/1.0.3/conformance/textures/tex-image-canvas-corruption.html [ Failure ] webgl/1.0.3/conformance/textures/tex-image-webgl.html [ Failure ] webgl/2.0.0/conformance/canvas/canvas-test.html [ Failure ] webgl/2.0.0/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html [ Failure ] webgl/2.0.0/conformance/canvas/draw-webgl-to-canvas-test.html [ Failure ] webgl/2.0.0/conformance/canvas/to-data-url-test.html [ Failure ] webgl/2.0.0/conformance/context/context-attribute-preserve-drawing-buffer.html [ Failure ] webgl/2.0.0/conformance/textures/misc/gl-pixelstorei.html [ Failure ] webgl/2.0.0/conformance/textures/misc/tex-image-canvas-corruption.html [ Failure ] webgl/2.0.0/conformance/textures/misc/tex-image-webgl.html [ Failure ] webgl/2.0.0/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ] webgl/2.0.0/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html [ Failure ] webgl/2.0.0/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_byte.html [ Failure ] webgl/2.0.0/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ] webgl/2.0.0/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Failure ] webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r11f_g11f_b10f-rgb-float.html [ Failure ] webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-r11f_g11f_b10f-rgb-half_float.html [ Failure ] (snipped)
Created attachment 425360 [details] WIP patch
Created attachment 425436 [details] Patch
Comment on attachment 425436 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425436&action=review Makes sense to me > Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp:136 > + // CSS styling may cause the canvas's content to be resized on Not sure this comment is valuable enough to copy from CG, it appears to be pointless.. > Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp:140 > + // We want to completely overwrite the previous frame's Maybe you don't need to duplicate this from CG, it appears to be a bit wrong. (there's no previous frame) > Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp:147 > + context.drawNativeImage(*image, imageSize, canvasRect, FloatRect(FloatPoint(), imageSize), { CompositeOperator::Copy }); I know you copied CG, but I think this could also be : context.drawNativeImage(*image, imageSize, FloatRect{{}, canvasSize }, FloatRect{{}, imageSize}, { CompositeOperator::Copy }); (e.g. no need to declare canvasRect if you don't anyway declare imageRect either.
Yup, I just copied the CG port code thoughtlessly. Will fix. Thank you very much.
Created attachment 425563 [details] Patch
Comment on attachment 425563 [details] Patch Clearing flags on attachment: 425563 Committed r275780 (236353@main): <https://commits.webkit.org/236353@main>
All reviewed patches have been landed. Closing bug.
<rdar://problem/76472277>