[webkit-changes] [WebKit/WebKit] 21fdc4: Pixel cracks in text-masked background images in r...

Tim Horton noreply at github.com
Wed Oct 19 12:28:27 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 21fdc41d3fa21f181667abb71aa052cbc5bb99b8
      https://github.com/WebKit/WebKit/commit/21fdc41d3fa21f181667abb71aa052cbc5bb99b8
  Author: Tim Horton <timothy_horton at apple.com>
  Date:   2022-10-19 (Wed, 19 Oct 2022)

  Changed paths:
    M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
    M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
    M Source/WebCore/platform/graphics/GraphicsContext.h
    M Source/WebCore/platform/graphics/NullGraphicsContext.h
    M Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
    M Source/WebCore/platform/graphics/cairo/CairoOperations.h
    M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
    M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
    M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
    M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h
    M Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm

  Log Message:
  -----------
  Pixel cracks in text-masked background images in replayed CG display lists
https://bugs.webkit.org/show_bug.cgi?id=246738
rdar://100183888

Reviewed by Wenson Hsieh.

* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::roundToDevicePixels): Deleted.
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::State::roundToDevicePixels): Deleted.
* Source/WebCore/platform/graphics/cairo/CairoOperations.h:
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::roundToDevicePixels): Deleted.
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::roundToDevicePixels const):
(WebCore::GraphicsContextCG::roundToDevicePixels): Deleted.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::roundToDevicePixels): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::roundToDevicePixels): Deleted.
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
`roundToDevicePixels` is only called from CG code, so we don't need it on
GraphicsContext, it can live on GraphicsContextCG.

* Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm:
Make `roundToDevicePixels` a no-op for CG display lists; it doesn't make sense
to round to "device" pixels when the display list can be replayed at arbitrary scales,
and also sometimes causes pixel cracks in `background-clip: text` elements
(and likely other cases).

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




More information about the webkit-changes mailing list