[Webkit-unassigned] [Bug 222101] New: HTMLCanvasElement::copiedImage() contains old image with GPU Process on

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 18 05:39:07 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=222101

            Bug ID: 222101
           Summary: HTMLCanvasElement::copiedImage() contains old image
                    with GPU Process on
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Canvas
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: kkinnunen at apple.com
                CC: dino at apple.com
            Blocks: 217211

HTMLCanvasElement::copiedImage() contains old image with GPU Process on

LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture.html appears to fail because HTMLCanvasElement::copiedImage() returns a new Image that contains old data.

The test is roughly as follows:
  ctx.fillStyle = "rgb(200, 0, 0)";
  ctx.fillRect(0, 0, 256, 256);
  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d); // Calls HTMLCanvasElement::copiedImage() 

  ctx.fillStyle = "rgb(0, 0, 200)";
  ctx.fillRect(0, 0, 256, 256);
  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d); // Calls HTMLCanvasElement::copiedImage()

It appears that while the second copiedImage should contain the blue contents, it still contains the red contents.

The copy is done with:

RefPtr<NativeImage> ImageBufferCGBitmapBackend::copyNativeImage(BackingStoreCopy copyBehavior) const
{
    switch (copyBehavior) {
    case CopyBackingStore:
        return NativeImage::create(adoptCF(CGBitmapContextCreateImage(context().platformContext())));


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=217211
[Bug 217211] Support running WebGL in GPU process
-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210218/20edfcdf/attachment.htm>


More information about the webkit-unassigned mailing list