Skip to content
Permalink
Browse files
Allow different back-ends for ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=207048

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-02-18
Reviewed by Tim Horton.

Source/WebCore:

ImageBuffer will be re-factored to decouple the platform specifics and
the back-end details from the interface "ImageBuffer".

A class hierarchy for the ImageBufferBackend will added to allow code
sharing and to split the code according to the platform and the back-end
details.

ImageBuffer will be kept interface with the rest of the code but different
back-ends will be created. ConcreteImageBuffer is a template class which
inherits ImageBuffer and will  act as a bridge to the concrete
ImageBufferBackend.

Based on the RenderingMode, a ConcreteImageBuffer<BackendType> will
be created. Instead of checking the renderingMode in many places of the
code and instead of and using preprocessor directives, all these decisions
will be made in the concrete ImageBufferBackend.

This re-factoring will allow creating new types of ImageBuffers backed by
new ImageBufferBackends. These new ImageBufferBackends will implement
DisplayList drawing and synchronize remote rendering.

* Headers.cmake:
* PlatformAppleWin.cmake:
* PlatformFTW.cmake:
* PlatformMac.cmake:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/CanvasBase.cpp:
(WebCore::CanvasBase::setImageBuffer const):
* platform/Cairo.cmake:
* platform/SourcesCairo.txt:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation):
* platform/graphics/ConcreteImageBuffer.h: Added.
(WebCore::ConcreteImageBuffer::create):
(WebCore::ConcreteImageBuffer::ConcreteImageBuffer):
(WebCore::ConcreteImageBuffer::ensureBackend const):
(WebCore::ConcreteImageBuffer::putImageData):
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::create):
(WebCore::ImageBuffer::createCompatibleBuffer):
(WebCore::ImageBuffer::sizeNeedsClamping):
(WebCore::ImageBuffer::compatibleBufferSize):
(WebCore::ImageBuffer::sinkIntoNativeImage):
(WebCore::ImageBuffer::sinkIntoImage):
(WebCore::ImageBuffer::drawConsuming):
(WebCore::ImageBuffer::toBGRAData const): Deleted.
(WebCore::ImageBuffer::transformColorSpace): Deleted.
(WebCore::ImageBuffer::genericConvertToLuminanceMask): Deleted.
(WebCore::ImageBuffer::convertToLuminanceMask): Deleted.
(WebCore::ImageBuffer::platformLayer const): Deleted.
(WebCore::ImageBuffer::copyToPlatformTexture): Deleted.
(WebCore::ImageBuffer::memoryCost const): Deleted.
(WebCore::ImageBuffer::externalMemoryCost const): Deleted.
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
(WebCore::ImageBuffer::drawConsuming):
(WebCore::ImageBuffer::putImageData):
(): Deleted.
(WebCore::ImageBuffer::internalSize const): Deleted.
(WebCore::ImageBuffer::logicalSize const): Deleted.
(WebCore::ImageBuffer::resolutionScale const): Deleted.
(WebCore::ImageBuffer::baseTransform const): Deleted.
* platform/graphics/ImageBufferBackend.cpp: Added.
(WebCore::ImageBufferBackend::ImageBufferBackend):
(WebCore::ImageBufferBackend::calculateBackendSize):
(WebCore::ImageBufferBackend::sinkIntoNativeImage):
(WebCore::ImageBufferBackend::sinkIntoImage):
(WebCore::ImageBufferBackend::drawConsuming):
(WebCore::ImageBufferBackend::convertToLuminanceMask):
(WebCore::ImageBufferBackend::toBGRAData const):
(WebCore::copyPremultipliedToPremultiplied):
(WebCore::copyPremultipliedToUnpremultiplied):
(WebCore::copyUnpremultipliedToPremultiplied):
(WebCore::copyFunctor):
(WebCore::ImageBufferBackend::copyImagePixels const):
(WebCore::ImageBufferBackend::getImageData const):
(WebCore::ImageBufferBackend::putImageData):
* platform/graphics/ImageBufferBackend.h: Added.
(WebCore::ImageBufferBackend::flushContext):
(WebCore::ImageBufferBackend::logicalSize const):
(WebCore::ImageBufferBackend::backendSize const):
(WebCore::ImageBufferBackend::resolutionScale const):
(WebCore::ImageBufferBackend::colorSpace const):
(WebCore::ImageBufferBackend::baseTransform const):
(WebCore::ImageBufferBackend::memoryCost const):
(WebCore::ImageBufferBackend::externalMemoryCost const):
(WebCore::ImageBufferBackend::transformColorSpace):
(WebCore::ImageBufferBackend::platformLayer const):
(WebCore::ImageBufferBackend::copyToPlatformTexture const):
(WebCore::ImageBufferBackend::bytesPerRow const):
(WebCore::ImageBufferBackend::backendColorFormat const):
(WebCore::ImageBufferBackend::toBackendCoordinates const):
(WebCore::ImageBufferBackend::logicalRect const):
(WebCore::ImageBufferBackend::backendRect const):
* platform/graphics/PlatformImageBuffer.h: Added.
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawShadowBuffer):
* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::drawShadowLayerBuffer):
(WebCore::Cairo::drawShadowImage):
(WebCore::Cairo::fillShadowBuffer):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::clipToImageBuffer):
* platform/graphics/cairo/GraphicsContextImplCairo.cpp:
(WebCore::GraphicsContextImplCairo::clipToImageBuffer):
* platform/graphics/cairo/ImageBufferCairo.cpp: Removed.
* platform/graphics/cairo/ImageBufferCairoBackend.cpp: Added.
(WebCore::ImageBufferCairoBackend::copyImage const):
(WebCore::ImageBufferCairoBackend::draw):
(WebCore::ImageBufferCairoBackend::drawPattern):
(WebCore::ImageBufferCairoBackend::transformColorSpace):
(WebCore::ImageBufferCairoBackend::toDataURL const):
(WebCore::ImageBufferCairoBackend::toData const):
* platform/graphics/cairo/ImageBufferCairoBackend.h: Added.
(WebCore::ImageBufferCairoBackend::platformTransformColorSpace):
* platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp: Added.
(WebCore::clearSurface):
(WebCore::ImageBufferCairoGLSurfaceBackend::create):
(WebCore::ImageBufferCairoGLSurfaceBackend::ImageBufferCairoGLSurfaceBackend):
(WebCore::ImageBufferCairoGLSurfaceBackend::~ImageBufferCairoGLSurfaceBackend):
(WebCore::ImageBuffer::platformLayer const):
(WebCore::ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture):
(WebCore::ImageBufferCairoGLSurfaceBackend::createCompositorBuffer):
(WebCore::ImageBufferCairoGLSurfaceBackend::swapBuffersIfNeeded):
(WebCore::ImageBufferCairoGLSurfaceBackend::paintToTextureMapper):
* platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h: Added.
* platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: Added.
(WebCore::ImageBufferCairoImageSurfaceBackend::create):
(WebCore::ImageBufferCairoImageSurfaceBackend::ImageBufferCairoImageSurfaceBackend):
(WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace):
* platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.h: Added.
* platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: Added.
(WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend):
(WebCore::ImageBufferCairoSurfaceBackend::context const):
(WebCore::ImageBufferCairoSurfaceBackend::bytesPerRow const):
(WebCore::ImageBufferCairoSurfaceBackend::copyNativeImage const):
(WebCore::ImageBufferCairoSurfaceBackend::cairoSurfaceCoerceToImage const):
(WebCore::ImageBufferCairoSurfaceBackend::toBGRAData const):
(WebCore::ImageBufferCairoSurfaceBackend::getImageData const):
(WebCore::ImageBufferCairoSurfaceBackend::putImageData):
* platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h: Added.
* platform/graphics/cg/ImageBufferCG.cpp: Removed.
* platform/graphics/cg/ImageBufferCGBackend.cpp: Added.
(WebCore::ImageBufferCGBackend::contextColorSpace):
(WebCore::ImageBufferCGBackend::setupContext):
(WebCore::createCroppedImageIfNecessary):
(WebCore::createBitmapImageAfterScalingIfNeeded):
(WebCore::ImageBufferCGBackend::copyImage const):
(WebCore::ImageBufferCGBackend::sinkIntoImage):
(WebCore::ImageBufferCGBackend::draw):
(WebCore::ImageBufferCGBackend::drawPattern):
(WebCore::ImageBufferCGBackend::baseTransform const):
(WebCore::ImageBufferCGBackend::toCFData const):
(WebCore::ImageBufferCGBackend::toData const):
(WebCore::ImageBufferCGBackend::toDataURL const):
(WebCore::makeVImageBuffer):
(WebCore::copyImagePixelsAccelerated):
(WebCore::ImageBufferCGBackend::copyImagePixels const):
* platform/graphics/cg/ImageBufferCGBackend.h: Added.
* platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: Added.
(WebCore::ImageBufferCGBitmapBackend::create):
(WebCore::ImageBufferCGBitmapBackend::ImageBufferCGBitmapBackend):
(WebCore::ImageBufferCGBitmapBackend::context const):
(WebCore::ImageBufferCGBitmapBackend::copyNativeImage const):
(WebCore::ImageBufferCGBitmapBackend::toBGRAData const):
(WebCore::ImageBufferCGBitmapBackend::getImageData const):
(WebCore::ImageBufferCGBitmapBackend::putImageData):
* platform/graphics/cg/ImageBufferCGBitmapBackend.h: Added.
* platform/graphics/cg/ImageBufferDataCG.cpp: Removed.
* platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: Added.
(WebCore::ImageBufferIOSurfaceBackend::calculateBackendSize):
(WebCore::ImageBufferIOSurfaceBackend::contextColorSpace):
(WebCore::ImageBufferIOSurfaceBackend::create):
(WebCore::ImageBufferIOSurfaceBackend::ImageBufferIOSurfaceBackend):
(WebCore::ImageBufferIOSurfaceBackend::context const):
(WebCore::ImageBufferIOSurfaceBackend::flushContext):
(WebCore::ImageBufferIOSurfaceBackend::memoryCost const):
(WebCore::ImageBufferIOSurfaceBackend::externalMemoryCost const):
(WebCore::ImageBufferIOSurfaceBackend::bytesPerRow const):
(WebCore::ImageBufferIOSurfaceBackend::backendColorFormat const):
(WebCore::ImageBufferIOSurfaceBackend::copyNativeImage const):
(WebCore::ImageBufferIOSurfaceBackend::sinkIntoNativeImage):
(WebCore::ImageBufferIOSurfaceBackend::drawConsuming):
(WebCore::ImageBufferIOSurfaceBackend::toBGRAData const):
(WebCore::ImageBufferIOSurfaceBackend::getImageData const):
(WebCore::ImageBufferIOSurfaceBackend::putImageData):
* platform/graphics/cg/ImageBufferIOSurfaceBackend.h: Added.
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
* platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::createFromImageBuffer): Deleted.
* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
(WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas):
* platform/graphics/win/ImageBufferDataDirect2D.cpp: Removed.
* platform/graphics/win/ImageBufferDataDirect2D.h: Removed.
* platform/graphics/win/ImageBufferDirect2D.cpp: Removed.
* platform/graphics/win/ImageBufferDirect2DBackend.cpp: Added.
(WebCore::ImageBufferDirect2DBackend::create):
(WebCore::ImageBufferDirect2DBackend::ImageBufferDirect2DBackend):
(WebCore::ImageBufferDirect2DBackend::context const):
(WebCore::ImageBufferDirect2DBackend::flushContext):
(WebCore::ImageBufferDirect2DBackend::copyNativeImage const):
(WebCore::createCroppedImageIfNecessary):
(WebCore::createBitmapImageAfterScalingIfNeeded):
(WebCore::ImageBufferDirect2DBackend::copyImage const):
(WebCore::ImageBufferDirect2DBackend::sinkIntoImage):
(WebCore::ImageBufferDirect2DBackend::compatibleBitmap):
(WebCore::ImageBufferDirect2DBackend::draw):
(WebCore::ImageBufferDirect2DBackend::drawPattern):
(WebCore::ImageBufferDirect2DBackend::toDataURL const):
(WebCore::ImageBufferDirect2DBackend::toData const):
(WebCore::ImageBufferDirect2DBackend::toBGRAData const):
(WebCore::ImageBufferDirect2DBackend::getImageData const):
(WebCore::ImageBufferDirect2DBackend::putImageData):
* platform/graphics/win/ImageBufferDirect2DBackend.h: Added.
* platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:
(WebCore::WrappedMockRealtimeVideoSource::updateSampleBuffer):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):

Source/WebKit:

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSelectionSnapshot const):

Canonical link: https://commits.webkit.org/220895@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Said Abou-Hallawa authored and webkit-commit-queue committed Feb 19, 2020
1 parent 93b86f4 commit f19c746184e9553ed50a06403816f87bca59af55
Showing 53 changed files with 3,006 additions and 3,003 deletions.
@@ -1,3 +1,234 @@
2020-02-18 Said Abou-Hallawa <sabouhallawa@apple.com>

Allow different back-ends for ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=207048

Reviewed by Tim Horton.

ImageBuffer will be re-factored to decouple the platform specifics and
the back-end details from the interface "ImageBuffer".

A class hierarchy for the ImageBufferBackend will added to allow code
sharing and to split the code according to the platform and the back-end
details.

ImageBuffer will be kept interface with the rest of the code but different
back-ends will be created. ConcreteImageBuffer is a template class which
inherits ImageBuffer and will act as a bridge to the concrete
ImageBufferBackend.

Based on the RenderingMode, a ConcreteImageBuffer<BackendType> will
be created. Instead of checking the renderingMode in many places of the
code and instead of and using preprocessor directives, all these decisions
will be made in the concrete ImageBufferBackend.

This re-factoring will allow creating new types of ImageBuffers backed by
new ImageBufferBackends. These new ImageBufferBackends will implement
DisplayList drawing and synchronize remote rendering.

* Headers.cmake:
* PlatformAppleWin.cmake:
* PlatformFTW.cmake:
* PlatformMac.cmake:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/CanvasBase.cpp:
(WebCore::CanvasBase::setImageBuffer const):
* platform/Cairo.cmake:
* platform/SourcesCairo.txt:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation):
* platform/graphics/ConcreteImageBuffer.h: Added.
(WebCore::ConcreteImageBuffer::create):
(WebCore::ConcreteImageBuffer::ConcreteImageBuffer):
(WebCore::ConcreteImageBuffer::ensureBackend const):
(WebCore::ConcreteImageBuffer::putImageData):
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::create):
(WebCore::ImageBuffer::createCompatibleBuffer):
(WebCore::ImageBuffer::sizeNeedsClamping):
(WebCore::ImageBuffer::compatibleBufferSize):
(WebCore::ImageBuffer::sinkIntoNativeImage):
(WebCore::ImageBuffer::sinkIntoImage):
(WebCore::ImageBuffer::drawConsuming):
(WebCore::ImageBuffer::toBGRAData const): Deleted.
(WebCore::ImageBuffer::transformColorSpace): Deleted.
(WebCore::ImageBuffer::genericConvertToLuminanceMask): Deleted.
(WebCore::ImageBuffer::convertToLuminanceMask): Deleted.
(WebCore::ImageBuffer::platformLayer const): Deleted.
(WebCore::ImageBuffer::copyToPlatformTexture): Deleted.
(WebCore::ImageBuffer::memoryCost const): Deleted.
(WebCore::ImageBuffer::externalMemoryCost const): Deleted.
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
(WebCore::ImageBuffer::drawConsuming):
(WebCore::ImageBuffer::putImageData):
(): Deleted.
(WebCore::ImageBuffer::internalSize const): Deleted.
(WebCore::ImageBuffer::logicalSize const): Deleted.
(WebCore::ImageBuffer::resolutionScale const): Deleted.
(WebCore::ImageBuffer::baseTransform const): Deleted.
* platform/graphics/ImageBufferBackend.cpp: Added.
(WebCore::ImageBufferBackend::ImageBufferBackend):
(WebCore::ImageBufferBackend::calculateBackendSize):
(WebCore::ImageBufferBackend::sinkIntoNativeImage):
(WebCore::ImageBufferBackend::sinkIntoImage):
(WebCore::ImageBufferBackend::drawConsuming):
(WebCore::ImageBufferBackend::convertToLuminanceMask):
(WebCore::ImageBufferBackend::toBGRAData const):
(WebCore::copyPremultipliedToPremultiplied):
(WebCore::copyPremultipliedToUnpremultiplied):
(WebCore::copyUnpremultipliedToPremultiplied):
(WebCore::copyFunctor):
(WebCore::ImageBufferBackend::copyImagePixels const):
(WebCore::ImageBufferBackend::getImageData const):
(WebCore::ImageBufferBackend::putImageData):
* platform/graphics/ImageBufferBackend.h: Added.
(WebCore::ImageBufferBackend::flushContext):
(WebCore::ImageBufferBackend::logicalSize const):
(WebCore::ImageBufferBackend::backendSize const):
(WebCore::ImageBufferBackend::resolutionScale const):
(WebCore::ImageBufferBackend::colorSpace const):
(WebCore::ImageBufferBackend::baseTransform const):
(WebCore::ImageBufferBackend::memoryCost const):
(WebCore::ImageBufferBackend::externalMemoryCost const):
(WebCore::ImageBufferBackend::transformColorSpace):
(WebCore::ImageBufferBackend::platformLayer const):
(WebCore::ImageBufferBackend::copyToPlatformTexture const):
(WebCore::ImageBufferBackend::bytesPerRow const):
(WebCore::ImageBufferBackend::backendColorFormat const):
(WebCore::ImageBufferBackend::toBackendCoordinates const):
(WebCore::ImageBufferBackend::logicalRect const):
(WebCore::ImageBufferBackend::backendRect const):
* platform/graphics/PlatformImageBuffer.h: Added.
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawShadowBuffer):
* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::drawShadowLayerBuffer):
(WebCore::Cairo::drawShadowImage):
(WebCore::Cairo::fillShadowBuffer):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::clipToImageBuffer):
* platform/graphics/cairo/GraphicsContextImplCairo.cpp:
(WebCore::GraphicsContextImplCairo::clipToImageBuffer):
* platform/graphics/cairo/ImageBufferCairo.cpp: Removed.
* platform/graphics/cairo/ImageBufferCairoBackend.cpp: Added.
(WebCore::ImageBufferCairoBackend::copyImage const):
(WebCore::ImageBufferCairoBackend::draw):
(WebCore::ImageBufferCairoBackend::drawPattern):
(WebCore::ImageBufferCairoBackend::transformColorSpace):
(WebCore::ImageBufferCairoBackend::toDataURL const):
(WebCore::ImageBufferCairoBackend::toData const):
* platform/graphics/cairo/ImageBufferCairoBackend.h: Added.
(WebCore::ImageBufferCairoBackend::platformTransformColorSpace):
* platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp: Added.
(WebCore::clearSurface):
(WebCore::ImageBufferCairoGLSurfaceBackend::create):
(WebCore::ImageBufferCairoGLSurfaceBackend::ImageBufferCairoGLSurfaceBackend):
(WebCore::ImageBufferCairoGLSurfaceBackend::~ImageBufferCairoGLSurfaceBackend):
(WebCore::ImageBuffer::platformLayer const):
(WebCore::ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture):
(WebCore::ImageBufferCairoGLSurfaceBackend::createCompositorBuffer):
(WebCore::ImageBufferCairoGLSurfaceBackend::swapBuffersIfNeeded):
(WebCore::ImageBufferCairoGLSurfaceBackend::paintToTextureMapper):
* platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h: Added.
* platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: Added.
(WebCore::ImageBufferCairoImageSurfaceBackend::create):
(WebCore::ImageBufferCairoImageSurfaceBackend::ImageBufferCairoImageSurfaceBackend):
(WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace):
* platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.h: Added.
* platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: Added.
(WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend):
(WebCore::ImageBufferCairoSurfaceBackend::context const):
(WebCore::ImageBufferCairoSurfaceBackend::bytesPerRow const):
(WebCore::ImageBufferCairoSurfaceBackend::copyNativeImage const):
(WebCore::ImageBufferCairoSurfaceBackend::cairoSurfaceCoerceToImage const):
(WebCore::ImageBufferCairoSurfaceBackend::toBGRAData const):
(WebCore::ImageBufferCairoSurfaceBackend::getImageData const):
(WebCore::ImageBufferCairoSurfaceBackend::putImageData):
* platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h: Added.
* platform/graphics/cg/ImageBufferCG.cpp: Removed.
* platform/graphics/cg/ImageBufferCGBackend.cpp: Added.
(WebCore::ImageBufferCGBackend::contextColorSpace):
(WebCore::ImageBufferCGBackend::setupContext):
(WebCore::createCroppedImageIfNecessary):
(WebCore::createBitmapImageAfterScalingIfNeeded):
(WebCore::ImageBufferCGBackend::copyImage const):
(WebCore::ImageBufferCGBackend::sinkIntoImage):
(WebCore::ImageBufferCGBackend::draw):
(WebCore::ImageBufferCGBackend::drawPattern):
(WebCore::ImageBufferCGBackend::baseTransform const):
(WebCore::ImageBufferCGBackend::toCFData const):
(WebCore::ImageBufferCGBackend::toData const):
(WebCore::ImageBufferCGBackend::toDataURL const):
(WebCore::makeVImageBuffer):
(WebCore::copyImagePixelsAccelerated):
(WebCore::ImageBufferCGBackend::copyImagePixels const):
* platform/graphics/cg/ImageBufferCGBackend.h: Added.
* platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: Added.
(WebCore::ImageBufferCGBitmapBackend::create):
(WebCore::ImageBufferCGBitmapBackend::ImageBufferCGBitmapBackend):
(WebCore::ImageBufferCGBitmapBackend::context const):
(WebCore::ImageBufferCGBitmapBackend::copyNativeImage const):
(WebCore::ImageBufferCGBitmapBackend::toBGRAData const):
(WebCore::ImageBufferCGBitmapBackend::getImageData const):
(WebCore::ImageBufferCGBitmapBackend::putImageData):
* platform/graphics/cg/ImageBufferCGBitmapBackend.h: Added.
* platform/graphics/cg/ImageBufferDataCG.cpp: Removed.
* platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: Added.
(WebCore::ImageBufferIOSurfaceBackend::calculateBackendSize):
(WebCore::ImageBufferIOSurfaceBackend::contextColorSpace):
(WebCore::ImageBufferIOSurfaceBackend::create):
(WebCore::ImageBufferIOSurfaceBackend::ImageBufferIOSurfaceBackend):
(WebCore::ImageBufferIOSurfaceBackend::context const):
(WebCore::ImageBufferIOSurfaceBackend::flushContext):
(WebCore::ImageBufferIOSurfaceBackend::memoryCost const):
(WebCore::ImageBufferIOSurfaceBackend::externalMemoryCost const):
(WebCore::ImageBufferIOSurfaceBackend::bytesPerRow const):
(WebCore::ImageBufferIOSurfaceBackend::backendColorFormat const):
(WebCore::ImageBufferIOSurfaceBackend::copyNativeImage const):
(WebCore::ImageBufferIOSurfaceBackend::sinkIntoNativeImage):
(WebCore::ImageBufferIOSurfaceBackend::drawConsuming):
(WebCore::ImageBufferIOSurfaceBackend::toBGRAData const):
(WebCore::ImageBufferIOSurfaceBackend::getImageData const):
(WebCore::ImageBufferIOSurfaceBackend::putImageData):
* platform/graphics/cg/ImageBufferIOSurfaceBackend.h: Added.
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
* platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::createFromImageBuffer): Deleted.
* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
(WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas):
* platform/graphics/win/ImageBufferDataDirect2D.cpp: Removed.
* platform/graphics/win/ImageBufferDataDirect2D.h: Removed.
* platform/graphics/win/ImageBufferDirect2D.cpp: Removed.
* platform/graphics/win/ImageBufferDirect2DBackend.cpp: Added.
(WebCore::ImageBufferDirect2DBackend::create):
(WebCore::ImageBufferDirect2DBackend::ImageBufferDirect2DBackend):
(WebCore::ImageBufferDirect2DBackend::context const):
(WebCore::ImageBufferDirect2DBackend::flushContext):
(WebCore::ImageBufferDirect2DBackend::copyNativeImage const):
(WebCore::createCroppedImageIfNecessary):
(WebCore::createBitmapImageAfterScalingIfNeeded):
(WebCore::ImageBufferDirect2DBackend::copyImage const):
(WebCore::ImageBufferDirect2DBackend::sinkIntoImage):
(WebCore::ImageBufferDirect2DBackend::compatibleBitmap):
(WebCore::ImageBufferDirect2DBackend::draw):
(WebCore::ImageBufferDirect2DBackend::drawPattern):
(WebCore::ImageBufferDirect2DBackend::toDataURL const):
(WebCore::ImageBufferDirect2DBackend::toData const):
(WebCore::ImageBufferDirect2DBackend::toBGRAData const):
(WebCore::ImageBufferDirect2DBackend::getImageData const):
(WebCore::ImageBufferDirect2DBackend::putImageData):
* platform/graphics/win/ImageBufferDirect2DBackend.h: Added.
* platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:
(WebCore::WrappedMockRealtimeVideoSource::updateSampleBuffer):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):

2020-02-18 Zalan Bujtas <zalan@apple.com>

[First paint] Remove elementOverflowRectIsLargerThanThreshold check in qualifiesAsVisuallyNonEmpty
@@ -1042,6 +1042,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
platform/graphics/ColorHash.h
platform/graphics/ColorSpace.h
platform/graphics/ComplexTextController.h
platform/graphics/ConcreteImageBuffer.h
platform/graphics/DashArray.h
platform/graphics/DecodingOptions.h
platform/graphics/DisplayRefreshMonitor.h
@@ -1093,7 +1094,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
platform/graphics/Image.h
platform/graphics/ImageBackingStore.h
platform/graphics/ImageBuffer.h
platform/graphics/ImageBufferData.h
platform/graphics/ImageBufferBackend.h
platform/graphics/ImageFrame.h
platform/graphics/ImageObserver.h
platform/graphics/ImageOrientation.h
@@ -1126,6 +1127,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
platform/graphics/PathUtilities.h
platform/graphics/Pattern.h
platform/graphics/PlatformDisplay.h
platform/graphics/PlatformImageBuffer.h
platform/graphics/PlatformLayer.h
platform/graphics/PlatformMediaResourceLoader.h
platform/graphics/PlatformTextTrack.h
@@ -83,8 +83,7 @@ if (${USE_DIRECT2D})
platform/graphics/win/GradientDirect2D.cpp
platform/graphics/win/GraphicsContextDirect2D.cpp
platform/graphics/win/GraphicsLayerDirect2D.cpp
platform/graphics/win/ImageBufferDataDirect2D.cpp
platform/graphics/win/ImageBufferDirect2D.cpp
platform/graphics/win/ImageBufferDirect2DBackend.cpp
platform/graphics/win/ImageDecoderDirect2D.cpp
platform/graphics/win/ImageDirect2D.cpp
platform/graphics/win/NativeImageDirect2D.cpp
@@ -132,8 +131,9 @@ else ()
platform/graphics/cg/GraphicsContextGLCG.cpp
platform/graphics/cg/GraphicsContextCG.cpp
platform/graphics/cg/IOSurfacePool.cpp
platform/graphics/cg/ImageBufferCG.cpp
platform/graphics/cg/ImageBufferDataCG.cpp
platform/graphics/cg/ImageBufferCGBackend.cpp
platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
platform/graphics/cg/ImageBufferUtilitiesCG.cpp
platform/graphics/cg/ImageDecoderCG.cpp
platform/graphics/cg/ImageSourceCGWin.cpp
@@ -176,7 +176,9 @@ else ()

platform/graphics/cg/GraphicsContextCG.h
platform/graphics/cg/IOSurfacePool.h
platform/graphics/cg/ImageBufferDataCG.h
platform/graphics/cg/ImageBufferCGBackend.h
platform/graphics/cg/ImageBufferCGBitmapBackend.h
platform/graphics/cg/ImageBufferIOSurfaceBackend.h
platform/graphics/cg/ImageBufferUtilitiesCG.h
platform/graphics/cg/PDFDocumentImage.h
platform/graphics/cg/UTIRegistry.h
@@ -84,8 +84,7 @@ list(APPEND WebCore_SOURCES
platform/graphics/win/GraphicsContextImplDirect2D.cpp
platform/graphics/win/GraphicsContextWin.cpp
platform/graphics/win/IconWin.cpp
platform/graphics/win/ImageBufferDataDirect2D.cpp
platform/graphics/win/ImageBufferDirect2D.cpp
platform/graphics/win/ImageBufferDirect2DBackend.cpp
platform/graphics/win/ImageDecoderDirect2D.cpp
platform/graphics/win/ImageDirect2D.cpp
platform/graphics/win/ImageWin.cpp
@@ -201,7 +200,6 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
platform/graphics/win/FullScreenController.h
platform/graphics/win/FullScreenControllerClient.h
platform/graphics/win/GraphicsContextImplDirect2D.h
platform/graphics/win/ImageBufferDataDirect2D.h
platform/graphics/win/ImageDecoderDirect2D.h
platform/graphics/win/LocalWindowsContext.h
platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h
@@ -291,8 +291,10 @@ list(APPEND WebCore_SOURCES
platform/graphics/cg/GraphicsContextGLCG.cpp
platform/graphics/cg/GraphicsContextCG.cpp
platform/graphics/cg/IOSurfacePool.cpp
platform/graphics/cg/ImageBufferCG.cpp
platform/graphics/cg/ImageBufferDataCG.cpp
platform/graphics/cg/ImageBufferCGBackend.cpp
platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
platform/graphics/cg/ImageBufferUtilitiesCG.cpp
platform/graphics/cg/ImageDecoderCG.cpp
platform/graphics/cg/ImageSourceCGMac.mm
platform/graphics/cg/IntPointCG.cpp
@@ -556,7 +558,9 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS

platform/graphics/cg/GraphicsContextCG.h
platform/graphics/cg/IOSurfacePool.h
platform/graphics/cg/ImageBufferDataCG.h
platform/graphics/cg/ImageBufferCGBackend.h
platform/graphics/cg/ImageBufferCGBitmapBackend.h
platform/graphics/cg/ImageBufferIOSurfaceBackend.h
platform/graphics/cg/ImageBufferUtilitiesCG.h
platform/graphics/cg/PDFDocumentImage.h
platform/graphics/cg/UTIRegistry.h
@@ -119,7 +119,6 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
platform/graphics/win/DIBPixelData.h
platform/graphics/win/FullScreenController.h
platform/graphics/win/FullScreenControllerClient.h
platform/graphics/win/ImageBufferDataDirect2D.h
platform/graphics/win/LocalWindowsContext.h
platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h
platform/graphics/win/SharedGDIObject.h
@@ -1869,6 +1869,7 @@ platform/graphics/HEVCUtilities.cpp
platform/graphics/Icon.cpp
platform/graphics/Image.cpp
platform/graphics/ImageBuffer.cpp
platform/graphics/ImageBufferBackend.cpp
platform/graphics/ImageDecoder.cpp
platform/graphics/ImageFrame.cpp
platform/graphics/ImageSource.cpp
@@ -291,8 +291,9 @@ platform/graphics/cg/GradientCG.cpp
platform/graphics/cg/GraphicsContextGLCG.cpp
platform/graphics/cg/GraphicsContextCG.cpp
platform/graphics/cg/IOSurfacePool.cpp
platform/graphics/cg/ImageBufferCG.cpp
platform/graphics/cg/ImageBufferDataCG.cpp
platform/graphics/cg/ImageBufferCGBackend.cpp
platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
platform/graphics/cg/ImageBufferUtilitiesCG.cpp
platform/graphics/cg/ImageDecoderCG.cpp
platform/graphics/cg/ImageSourceCGMac.mm

0 comments on commit f19c746

Please sign in to comment.