[webkit-changes] [WebKit/WebKit] 46d4af: ImageBuffer::sinkIntoImage is redundant, should us...

Kimmo Kinnunen noreply at github.com
Tue Sep 26 02:53:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 46d4af9dec904b64811e47050ceedc1c64c7c004
      https://github.com/WebKit/WebKit/commit/46d4af9dec904b64811e47050ceedc1c64c7c004
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2023-09-26 (Tue, 26 Sep 2023)

  Changed paths:
    M Source/WebCore/page/ContextMenuController.cpp
    M Source/WebCore/page/TextIndicator.cpp
    M Source/WebCore/platform/DragImage.cpp
    M Source/WebCore/platform/graphics/BitmapImage.h
    M Source/WebCore/platform/graphics/ImageBuffer.cpp
    M Source/WebCore/platform/graphics/ImageBuffer.h
    M Source/WebKit/WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp
    M Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm
    M Tools/TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp

  Log Message:
  -----------
  ImageBuffer::sinkIntoImage is redundant, should use sinkIntoNativeImage instead
https://bugs.webkit.org/show_bug.cgi?id=261942
rdar://115889056

Reviewed by Matt Woodrow.

Remove ImageBuffer::sinkIntoImage(). WebCore::Image is higher level
type. Callers should call sinkIntoNativeImage and then convert the
NativeImage into Image, if needed. Note: most callers should use
NativeImage, as that is the lowest level source image.

This is work towards simplifying ImageBuffer by making it operate
with NativeImage as its primary primitive image source.

* Source/WebCore/page/ContextMenuController.cpp:
(WebCore::prepareContextForQRCode):
* Source/WebCore/page/TextIndicator.cpp:
(WebCore::takeSnapshot):
* Source/WebCore/platform/DragImage.cpp:
(WebCore::createDragImageFromSnapshot):
* Source/WebCore/platform/graphics/BitmapImage.h:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::sinkIntoImage): Deleted.
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebKit/WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp:
(WebKit::createShareableBitmap):
* Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::imageForCurrentSharingServicePickerItem):
* Tools/TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp:
(TestWebKitAPI::AnyScaleTest::imageBufferOptions const):
(TestWebKitAPI::TEST_P):
(TestWebKitAPI::PreserveResolutionOperationTest::deviceScaleFactor const): Deleted.
(TestWebKitAPI::PreserveResolutionOperationTest::imageBufferOptions const): Deleted.
(TestWebKitAPI::PreserveResolutionOperationTest::operationPreserveResolution): Deleted.

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




More information about the webkit-changes mailing list