Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 91212e766452b51daeb83f508b642d72c99040b5
      
https://github.com/WebKit/WebKit/commit/91212e766452b51daeb83f508b642d72c99040b5
  Author: Tim Horton <thor...@apple.com>
  Date:   2023-03-06 (Mon, 06 Mar 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
    M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
    M Source/WebCore/platform/graphics/GraphicsContext.cpp
    M Source/WebCore/platform/graphics/GraphicsContext.h
    M Source/WebCore/platform/graphics/ImageBuffer.cpp
    M Source/WebCore/platform/graphics/ImageBuffer.h
    M Source/WebCore/platform/graphics/ImageBufferBackend.h
    M Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp
    M Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.h
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
    M Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp
    M Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.h
    M Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp

  Log Message:
  -----------
  BifurcatedGraphicsContext fails to apply image masks to the secondary context
https://bugs.webkit.org/show_bug.cgi?id=253340
rdar://104488384

Reviewed by Said Abou-Hallawa.

* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::clipToImageBuffer):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
Add a BifurcatedGraphicsContext implementation of clipToImageBuffer.

* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::clipToImageBuffer): Deleted.
* Source/WebCore/platform/graphics/GraphicsContext.h:
Make clipToImageBuffer pure virtual instead of bouncing through ImageBuffer,
so that it is clear that it is implemented by the platform contexts (and not
in terms of other GraphicsContext commands), and thus must be overriden by
any GraphicsContext implementation.

* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::clipToMask): Deleted.
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/ImageBufferBackend.h:
(WebCore::ImageBufferBackend::clipToMask): Deleted.
* Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp:
(WebCore::ImageBufferCairoBackend::clipToMask): Deleted.
* Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::clipToImageBuffer):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp:
(WebCore::ImageBufferCGBackend::clipToMask): Deleted.
* Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.h:
Move ImageBufferBackend::clipToMask into the platform GraphicsContext 
implementations.

* Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
Add a test.

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to