Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c4193e7297347e14476e7ea1000deaac46ec2d03
      
https://github.com/WebKit/WebKit/commit/c4193e7297347e14476e7ea1000deaac46ec2d03
  Author: Kimmo Kinnunen <kkinnu...@apple.com>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
    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/displaylists/DisplayListRecorder.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
    M Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h

  Log Message:
  -----------
  ImageBuffer has inconsistent drawing virtual functions
https://bugs.webkit.org/show_bug.cgi?id=261735
rdar://115721568

Reviewed by Matt Woodrow.

virtual ImageBuffer::drawPattern() invoked GraphicsContext logic,
and was never overwritten.
virtual ImageBuffer::drawConsuming() invoked GraphicsContext logic,
was overwritten by RemoteImageBufferProxy with the assumption that
the destination was remote GraphicsContext.

The polymorphism is at GraphicsContext level. Let the functions
be at that level:
- drawPattern already is
- Add virtual GraphicsContext::drawConsumingImageBufer and the real
  base implementation and Recorder::drawConsumingImageBuffer
  override.

Similar issue with ImageBuffer::draw is handled in another patch.

This is work towards making the NativeImage the only image primitive
being drawn from, where as currently also ImageBuffer is a
pseudo-primitive.

* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawConsumingImageBuffer):
(WebCore::GraphicsContext::drawPattern):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::drawConsumingImageBuffer):
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::copyImageBuffer):
(WebCore::ImageBuffer::drawPattern): Deleted.
(WebCore::ImageBuffer::drawConsuming): Deleted.
* Source/WebCore/platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::drawConsuming): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawConsumingImageBuffer):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp:
(WebKit::RemoteImageBufferProxy::drawConsuming): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

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


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

Reply via email to