[webkit-changes] [WebKit/WebKit] ff57fe: [GPU Process] REGRESSION (261700 at main): Various "c...

Said Abou-Hallawa noreply at github.com
Tue Mar 21 12:33:49 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff57fe9af2916f68ad0bca626adc5ec8e38551b7
      https://github.com/WebKit/WebKit/commit/ff57fe9af2916f68ad0bca626adc5ec8e38551b7
  Author: Said Abou-Hallawa <said at apple.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M Source/WebCore/html/HTMLImageElement.cpp
    M Source/WebCore/platform/graphics/BitmapImage.cpp
    M Source/WebCore/platform/graphics/DecodingOptions.h
    M Source/WebCore/platform/graphics/GraphicsContext.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

  Log Message:
  -----------
  [GPU Process] REGRESSION (261700 at main): Various "css-backgrounds/background-size-" tests fail with pixel differences
https://bugs.webkit.org/show_bug.cgi?id=254202
rdar://106952740

Reviewed by Simon Fraser.

The test page draws a tiled background-image by calling BitmapImage::drawPattern()
which ends up calling CGImageSourceCreateImageAtIndex().

The expected page draws an HTMLImageElements by calling BitmapImage::draw() which
ends up calling CGImageSourceCreateThumbnailAtIndex().

There is a slight difference between a frame decoded using CGImageSourceCreateImageAtIndex()
and a frame decode using CGImageSourceCreateThumbnailAtIndex(). A thumbnail frame
has to be decoded for a certain size which is called sizeForDrawing.

We need to switch back to use CGImageSourceCreateImageAtIndex() for small images.
This way we can ensure the image is decoded the same way for both the test and
the expected pages.

* Source/WebCore/html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::decoding const):
* Source/WebCore/platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::draw):
* Source/WebCore/platform/graphics/DecodingOptions.h:
(WebCore::DecodingOptions::isSynchronous const):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::preferredImageDecodingMode const): Deleted.
* Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoderCG::createFrameImageAtIndex):
* 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): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

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




More information about the webkit-changes mailing list