Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aa025e46a961480b60e856a371d639bd874b74a7
      
https://github.com/WebKit/WebKit/commit/aa025e46a961480b60e856a371d639bd874b74a7
  Author: Said Abou-Hallawa <[email protected]>
  Date:   2023-04-11 (Tue, 11 Apr 2023)

  Changed paths:
    A LayoutTests/fast/canvas/canvas-self-drawImage-scaled-context-expected.html
    A LayoutTests/fast/canvas/canvas-self-drawImage-scaled-context.html
    M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp

  Log Message:
  -----------
  CanvasRenderingContext2D::drawImage() doesn't work correctly with transform 
when copying from self
https://bugs.webkit.org/show_bug.cgi?id=255208
rdar://107844963

Reviewed by Kimmo Kinnunen.

drawImage() creates a temporary ImageBuffer to get the srcRect of the canvas.
This ImageBuffer is not for drawing. It should not inherit the current 
scaleFactor
and it should just hold the pixels of the canvas in the non-scaled coordinates. 
We
should use GraphicsContext::createImageBuffer() to create the temporary 
ImageBuffer.

* LayoutTests/fast/canvas/canvas-self-drawImage-scaled-context-expected.html: 
Added.
* LayoutTests/fast/canvas/canvas-self-drawImage-scaled-context.html: Added.
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawImage):

Canonical link: https://commits.webkit.org/262841@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to