Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 00ca303e33743e31bf973aa44a6506aa30ac7f97
      
https://github.com/WebKit/WebKit/commit/00ca303e33743e31bf973aa44a6506aa30ac7f97
  Author: Said Abou-Hallawa <[email protected]>
  Date:   2023-03-15 (Wed, 15 Mar 2023)

  Changed paths:
    M Source/WebCore/html/HTMLImageElement.cpp
    M Source/WebCore/platform/graphics/BitmapImage.cpp
    M Source/WebCore/platform/graphics/BitmapImage.h
    M Source/WebCore/platform/graphics/DecodingOptions.h
    M Source/WebCore/platform/graphics/GraphicsContext.h
    M Source/WebCore/platform/graphics/ImageFrame.cpp
    M Source/WebCore/platform/graphics/ImageSource.cpp
    M Source/WebCore/platform/graphics/ImageSource.h
    M Source/WebCore/platform/graphics/NativeImage.cpp
    M Source/WebCore/platform/graphics/NativeImage.h
    M Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp
    M Source/WebCore/rendering/RenderBoxModelObject.cpp
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp

  Log Message:
  -----------
  [GPU Process] Have one copy of NativeImage when it is shared between 
WebProcess and GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=253655
rdar://106505650

Reviewed by Simon Fraser.

Since WebProcess has to share the local PlatformImage with GPUProcess through
ShareableBitmap, we can get rid of the local PlatformImage and have both 
processes
use the ShareableBitmap.

For GPUProcess, we can ensure we decode the PlatformImage for sizeForDrawing
instead of decoding it for the full size.

Also this patch simplifies DecodingOptions and make have explicit DecodingMode
and sizeForDrawing. This will make DecodingOptions::isCompatibleWith() simpler
and can be used for synchronous and asynchronous decoding mode.

* Source/WebCore/html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::decoding const):
* Source/WebCore/platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameImageAtIndexCacheIfNeeded):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::internalStartAnimation):
(WebCore::BitmapImage::decode):
(WebCore::BitmapImage::imageFrameAvailableAtIndex):
* Source/WebCore/platform/graphics/BitmapImage.h:
* Source/WebCore/platform/graphics/DecodingOptions.h:
(WebCore::DecodingOptions::DecodingOptions):
(WebCore::DecodingOptions::decodingMode const):
(WebCore::DecodingOptions::isAuto const):
(WebCore::DecodingOptions::isSynchronous const):
(WebCore::DecodingOptions::isAsynchronous const):
(WebCore::DecodingOptions::sizeForDrawing const):
(WebCore::DecodingOptions::hasFullSize const):
(WebCore::DecodingOptions::hasSizeForDrawing const):
(WebCore::DecodingOptions::isCompatibleWith const):
(WebCore::DecodingOptions::operator== const): Deleted.
(WebCore::DecodingOptions::isAsynchronousCompatibleWith const): Deleted.
(WebCore::DecodingOptions::maxDimension): Deleted.
(WebCore::DecodingOptions::has const): Deleted.
(WebCore::DecodingOptions::hasDecodingMode const): Deleted.
(WebCore::DecodingOptions::hasSize const): Deleted.
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::preferredImageDecodingMode const):
* Source/WebCore/platform/graphics/ImageFrame.cpp:
(WebCore::ImageFrame::hasFullSizeNativeImage const):
(WebCore::ImageFrame::hasDecodedNativeImageCompatibleWithOptions const):
* Source/WebCore/platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::requestFrameAsyncDecodingAtIndex):
(WebCore::ImageSource::frameAtIndexCacheIfNeeded):
(WebCore::ImageSource::frameIsBeingDecodedAndIsCompatibleWithOptionsAtIndex):
(WebCore::ImageSource::frameImageAtIndexCacheIfNeeded):
* Source/WebCore/platform/graphics/ImageSource.h:
* Source/WebCore/platform/graphics/NativeImage.cpp:
(WebCore::NativeImage::NativeImage):
(WebCore::NativeImage::setPlatformImage):
* Source/WebCore/platform/graphics/NativeImage.h:
* Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::createImageSourceThumbnailOptions):
(WebCore::appendImageSourceOption):
(WebCore::imageSourceThumbnailOptions):
(WebCore::ImageDecoderCG::createFrameImageAtIndex):
(WebCore::createImageSourceAsyncOptions): Deleted.
(WebCore::imageSourceAsyncOptions): Deleted.
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::decodingModeForImageDraw const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::preferredImageDecodingMode const):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::RemoteResourceCacheProxy::recordNativeImageUse):

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


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

Reply via email to