[webkit-changes] [WebKit/WebKit] 1e7477: Port ImageOrientation to the new serialization format

Gavin noreply at github.com
Thu Feb 2 01:51:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1e74777056c56506dc7ac1ff1015959b98295301
      https://github.com/WebKit/WebKit/commit/1e74777056c56506dc7ac1ff1015959b98295301
  Author: Gavin Phillips <gavin.p at apple.com>
  Date:   2023-02-02 (Thu, 02 Feb 2023)

  Changed paths:
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp
    M Source/WebCore/dom/DataTransfer.cpp
    M Source/WebCore/html/ImageBitmap.cpp
    M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
    M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
    M Source/WebCore/loader/cache/CachedImage.cpp
    M Source/WebCore/platform/cocoa/DragImageCocoa.mm
    M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
    M Source/WebCore/platform/graphics/BitmapImage.cpp
    M Source/WebCore/platform/graphics/BitmapImage.h
    M Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h
    M Source/WebCore/platform/graphics/GeneratedImage.h
    M Source/WebCore/platform/graphics/GraphicsContext.cpp
    M Source/WebCore/platform/graphics/GraphicsContext.h
    M Source/WebCore/platform/graphics/Image.cpp
    M Source/WebCore/platform/graphics/Image.h
    M Source/WebCore/platform/graphics/ImageFrame.h
    M Source/WebCore/platform/graphics/ImageOrientation.h
    M Source/WebCore/platform/graphics/ImagePaintingOptions.h
    M Source/WebCore/platform/graphics/ImageSource.cpp
    M Source/WebCore/platform/graphics/ImageSource.h
    M Source/WebCore/platform/graphics/NullGraphicsContext.h
    M Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
    M Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp
    M Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
    M Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp
    M Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.cpp
    M Source/WebCore/platform/graphics/cv/VideoFrameCV.mm
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp
    M Source/WebCore/platform/graphics/mac/controls/ControlMac.mm
    M Source/WebCore/platform/image-decoders/ScalableImageDecoderFrame.h
    M Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
    M Source/WebCore/rendering/BackgroundPainter.cpp
    M Source/WebCore/rendering/RenderElement.cpp
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/style/NinePieceImage.cpp
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/style/StyleBuilderConverter.h
    M Source/WebCore/svg/graphics/SVGImage.h
    M Source/WebCore/svg/graphics/SVGImageForContainer.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Port ImageOrientation to the new serialization format
https://bugs.webkit.org/show_bug.cgi?id=251270
rdar://104745560

Reviewed by Alex Christensen.

This change refactors ImageOrientation::Orientation to use an enum class
so it can then be serialized over CoreIPC. It also includes the porting
over of the related types to the new serialization format, including:
    - ImagePaintingOptions
    - ImageOrientation
    - WebCore::ImageOrientation::Orientation

* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp:
(WebCore::Display::BoxDecorationPainter::paintFillLayer const):
* Source/WebCore/dom/DataTransfer.cpp:
(WebCore::DataTransfer::createDragImage const):
* Source/WebCore/html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createPromise):
(WebCore::ImageBitmap::createFromBuffer):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawImage):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texImageSourceHelper):
* Source/WebCore/loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer const):
* Source/WebCore/platform/cocoa/DragImageCocoa.mm:
(WebCore::createDragImageFromImage):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::preTransformedNativeImageForCurrentFrame):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::drawPattern):
* Source/WebCore/platform/graphics/BitmapImage.h:
* Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h:
* Source/WebCore/platform/graphics/GeneratedImage.h:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::paintVideoFrame):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::drawImage):
* Source/WebCore/platform/graphics/Image.cpp:
(WebCore::Image::drawPattern):
* Source/WebCore/platform/graphics/Image.h:
(WebCore::Image::sourceSize const):
(WebCore::Image::orientation const):
* Source/WebCore/platform/graphics/ImageFrame.h:
* Source/WebCore/platform/graphics/ImageOrientation.h:
(WebCore::ImageOrientation::ImageOrientation):
(WebCore::ImageOrientation::fromEXIFValue):
(WebCore::ImageOrientation::operator int const):
(WebCore::ImageOrientation::operator==):
(WebCore::ImageOrientation::operator!=):
(WebCore::ImageOrientation::orientation const):
(WebCore::ImageOrientation::usesWidthAsHeight const):
(WebCore::ImageOrientation::transformFromDefault const):
(WebCore::ImageOrientation::withFlippedY const):
(WebCore::ImageOrientation::operator Orientation const): Deleted.
* Source/WebCore/platform/graphics/ImagePaintingOptions.h:
(WebCore::ImagePaintingOptions::encode const): Deleted.
(WebCore::ImagePaintingOptions::decode): Deleted.
* Source/WebCore/platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ImageSource):
(WebCore::ImageSource::densityCorrectedSize):
(WebCore::ImageSource::sourceSize):
(WebCore::ImageSource::dump):
* Source/WebCore/platform/graphics/ImageSource.h:
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
(WebCore::NullGraphicsContext::drawImage):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::drawNativeImage):
* Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::orientationFromProperties):
* Source/WebCore/platform/graphics/cg/PDFDocumentImage.h:
* Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:
(WebCore::DrawGlyphsRecorder::recordDrawImage):
* Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.cpp:
(WebCore::GraphicsContextGLCVCocoa::TextureContent::operator== const):
(WebCore::GraphicsContextGLCVCocoa::copyVideoSampleToTexture):
* Source/WebCore/platform/graphics/cv/VideoFrameCV.mm:
(WebCore::VideoFrameCV::orientation const):
* Source/WebCore/platform/graphics/mac/controls/ControlMac.mm:
(WebCore::ControlMac::drawListButton):
* Source/WebCore/platform/image-decoders/ScalableImageDecoderFrame.h:
* Source/WebCore/rendering/BackgroundPainter.cpp:
(WebCore::BackgroundPainter::paintFillLayer):
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::imageOrientation const):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage const):
(WebCore::RenderLayerBacking::isUnscaledBitmapOnly const):
* Source/WebCore/rendering/RenderThemeMac.mm:
(WebCore::paintAttachmentIcon):
* Source/WebCore/rendering/style/NinePieceImage.cpp:
(WebCore::NinePieceImage::paint const):
* Source/WebCore/rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialImageOrientation):
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertImageOrientation):
* Source/WebCore/svg/graphics/SVGImage.h:
* Source/WebCore/svg/graphics/SVGImageForContainer.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

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




More information about the webkit-changes mailing list