Diff
Modified: trunk/Source/WebCore/ChangeLog (285070 => 285071)
--- trunk/Source/WebCore/ChangeLog 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/ChangeLog 2021-10-30 02:44:22 UTC (rev 285071)
@@ -1,3 +1,62 @@
+2021-10-29 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Rename ImageBuffer.logicalSize to ImageBuffer.truncatedLogicalSize
+ https://bugs.webkit.org/show_bug.cgi?id=232515
+ <rdar://problem/84829689>
+
+ Reviewed by Tim Horton.
+
+ This is a purely mechanical change, and is the first step in
+ https://bugs.webkit.org/show_bug.cgi?id=225377. Once we have both logicalSize()
+ and truncatedLogicalSize(), we can start migrating callers to the correct one
+ and away from the trucated one.
+
+ I did this rename by adding truncatedImageSize, and then temporarily renaming
+ logicalSize() to some dummy value - to force compilation failures at every call
+ to logicalSize(). Then, once compiling found all the call sites, I renamed it
+ back to just logicalSize().
+
+ No new tests because there is no behavior change.
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::CloneSerializer::dumpImageBitmap):
+ * html/CanvasBase.cpp:
+ (WebCore::CanvasBase::setImageBuffer const):
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::toMediaSample):
+ * html/ImageBitmap.cpp:
+ (WebCore::ImageBitmap::createPromise):
+ * html/ImageBitmapBacking.cpp:
+ (WebCore::ImageBitmapBacking::width const):
+ (WebCore::ImageBitmapBacking::height const):
+ * html/canvas/CanvasRenderingContext2DBase.cpp:
+ (WebCore::CanvasRenderingContext2DBase::putImageData):
+ * html/canvas/WebGLRenderingContextBase.cpp:
+ (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
+ * page/PageColorSampler.cpp:
+ (WebCore::sampleColor):
+ * platform/graphics/ConcreteImageBuffer.h:
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::drawImageBuffer):
+ (WebCore::GraphicsContext::drawConsumingImageBuffer):
+ * platform/graphics/ImageBuffer.h:
+ * platform/graphics/ShadowBlur.cpp:
+ (WebCore::ScratchBuffer::WTF_REQUIRES_LOCK):
+ * platform/graphics/displaylists/DisplayListImageBuffer.h:
+ (WebCore::DisplayList::ImageBuffer::ImageBuffer):
+ * platform/graphics/filters/FEBlend.cpp:
+ (WebCore::FEBlend::platformApplySoftware):
+ * platform/graphics/filters/FEColorMatrix.cpp:
+ (WebCore::FEColorMatrix::platformApplySoftware):
+ * platform/graphics/filters/FEComposite.cpp:
+ (WebCore::FEComposite::platformApplySoftware):
+ * platform/graphics/filters/FEDropShadow.cpp:
+ (WebCore::FEDropShadow::platformApplySoftware):
+ * rendering/CSSFilter.cpp:
+ (WebCore::CSSFilter::allocateBackingStoreIfNeeded):
+ * rendering/svg/RenderSVGResourcePattern.cpp:
+ (WebCore::RenderSVGResourcePattern::buildPattern):
+
2021-10-29 Jean-Yves Avenard <j...@apple.com>
Have PlatformMediaResourceClient use SharedBuffer
Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (285070 => 285071)
--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -1113,7 +1113,7 @@
// FIXME: We should try to avoid converting pixel format.
PixelBufferFormat format { AlphaPremultiplication::Premultiplied, PixelFormat::RGBA8, buffer->colorSpace() };
- const IntSize& logicalSize = buffer->logicalSize();
+ const IntSize& logicalSize = buffer->truncatedLogicalSize();
auto pixelBuffer = buffer->getPixelBuffer(format, { IntPoint::zero(), logicalSize });
if (!pixelBuffer) {
code = SerializationReturnCode::ValidationError;
Modified: trunk/Source/WebCore/html/CanvasBase.cpp (285070 => 285071)
--- trunk/Source/WebCore/html/CanvasBase.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/html/CanvasBase.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -209,8 +209,8 @@
returnBuffer = std::exchange(m_imageBuffer, WTFMove(buffer));
}
- if (m_imageBuffer && m_size != m_imageBuffer->logicalSize())
- m_size = m_imageBuffer->logicalSize();
+ if (m_imageBuffer && m_size != m_imageBuffer->truncatedLogicalSize())
+ m_size = m_imageBuffer->truncatedLogicalSize();
size_t previousMemoryCost = m_imageBufferCost;
m_imageBufferCost = memoryCost();
Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (285070 => 285071)
--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -777,7 +777,7 @@
// FIXME: This can likely be optimized quite a bit, especially in the cases where
// the ImageBuffer is backed by GPU memory already and/or is in the GPU process by
// specializing toMediaSample() in ImageBufferBackend to not use getPixelBuffer().
- auto pixelBuffer = imageBuffer->getPixelBuffer({ AlphaPremultiplication::Unpremultiplied, PixelFormat::BGRA8, DestinationColorSpace::SRGB() }, { { }, imageBuffer->logicalSize() });
+ auto pixelBuffer = imageBuffer->getPixelBuffer({ AlphaPremultiplication::Unpremultiplied, PixelFormat::BGRA8, DestinationColorSpace::SRGB() }, { { }, imageBuffer->truncatedLogicalSize() });
if (!pixelBuffer)
return nullptr;
Modified: trunk/Source/WebCore/html/ImageBitmap.cpp (285070 => 285071)
--- trunk/Source/WebCore/html/ImageBitmap.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/html/ImageBitmap.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -572,7 +572,7 @@
// 4. Let the ImageBitmap object's bitmap data be a copy of the image argument's
// bitmap data, cropped to the source rectangle with formatting.
- auto sourceRectangle = croppedSourceRectangleWithFormatting(existingImageBitmap->buffer()->logicalSize(), options, WTFMove(rect));
+ auto sourceRectangle = croppedSourceRectangleWithFormatting(existingImageBitmap->buffer()->truncatedLogicalSize(), options, WTFMove(rect));
if (sourceRectangle.hasException()) {
promise.reject(sourceRectangle.releaseException());
return;
Modified: trunk/Source/WebCore/html/ImageBitmapBacking.cpp (285070 => 285071)
--- trunk/Source/WebCore/html/ImageBitmapBacking.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/html/ImageBitmapBacking.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -48,13 +48,13 @@
unsigned ImageBitmapBacking::width() const
{
// FIXME: Is this the right width?
- return m_bitmapData ? m_bitmapData->logicalSize().width() : 0;
+ return m_bitmapData ? m_bitmapData->truncatedLogicalSize().width() : 0;
}
unsigned ImageBitmapBacking::height() const
{
// FIXME: Is this the right height?
- return m_bitmapData ? m_bitmapData->logicalSize().height() : 0;
+ return m_bitmapData ? m_bitmapData->truncatedLogicalSize().height() : 0;
}
} // namespace WebCore
Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp (285070 => 285071)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -2248,7 +2248,7 @@
IntSize destOffset { dx, dy };
IntRect destRect = clipRect;
destRect.move(destOffset);
- destRect.intersect(IntRect { { }, buffer->logicalSize() });
+ destRect.intersect(IntRect { { }, buffer->truncatedLogicalSize() });
if (destRect.isEmpty())
return;
IntRect sourceRect { destRect };
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (285070 => 285071)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -7798,7 +7798,7 @@
if (!m_buffers[i])
break;
ImageBuffer& buf = m_buffers[i]->second.get();
- if (m_buffers[i]->first != colorSpace || buf.logicalSize() != size)
+ if (m_buffers[i]->first != colorSpace || buf.truncatedLogicalSize() != size)
continue;
bubbleToFront(i);
if (fillOperator != CompositeOperator::Copy && fillOperator != CompositeOperator::Clear)
Modified: trunk/Source/WebCore/page/PageColorSampler.cpp (285070 => 285071)
--- trunk/Source/WebCore/page/PageColorSampler.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/page/PageColorSampler.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -124,7 +124,7 @@
if (!snapshot)
return std::nullopt;
- auto pixelBuffer = snapshot->getPixelBuffer({ AlphaPremultiplication::Unpremultiplied, PixelFormat::BGRA8, colorSpace }, { { }, snapshot->logicalSize() });
+ auto pixelBuffer = snapshot->getPixelBuffer({ AlphaPremultiplication::Unpremultiplied, PixelFormat::BGRA8, colorSpace }, { { }, snapshot->truncatedLogicalSize() });
if (!pixelBuffer)
return std::nullopt;
Modified: trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h (285070 => 285071)
--- trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h 2021-10-30 02:44:22 UTC (rev 285071)
@@ -90,7 +90,8 @@
}
}
- IntSize logicalSize() const override { return IntSize(m_parameters.logicalSize); }
+ FloatSize logicalSize() const override { return m_parameters.logicalSize; }
+ IntSize truncatedLogicalSize() const override { return IntSize(m_parameters.logicalSize); } // You probably should be calling logicalSize() instead.
float resolutionScale() const override { return m_parameters.resolutionScale; }
DestinationColorSpace colorSpace() const override { return m_parameters.colorSpace; }
PixelFormat pixelFormat() const override { return m_parameters.pixelFormat; }
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (285070 => 285071)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -591,12 +591,12 @@
void GraphicsContext::drawImageBuffer(ImageBuffer& image, const FloatPoint& destination, const ImagePaintingOptions& imagePaintingOptions)
{
- drawImageBuffer(image, FloatRect(destination, image.logicalSize()), FloatRect(FloatPoint(), image.logicalSize()), imagePaintingOptions);
+ drawImageBuffer(image, FloatRect(destination, image.truncatedLogicalSize()), FloatRect(FloatPoint(), image.truncatedLogicalSize()), imagePaintingOptions);
}
void GraphicsContext::drawImageBuffer(ImageBuffer& image, const FloatRect& destination, const ImagePaintingOptions& imagePaintingOptions)
{
- drawImageBuffer(image, destination, FloatRect(FloatPoint(), FloatSize(image.logicalSize())), imagePaintingOptions);
+ drawImageBuffer(image, destination, FloatRect(FloatPoint(), FloatSize(image.truncatedLogicalSize())), imagePaintingOptions);
}
void GraphicsContext::drawImageBuffer(ImageBuffer& image, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& options)
@@ -609,7 +609,7 @@
{
if (!image)
return;
- IntSize imageLogicalSize = image->logicalSize();
+ IntSize imageLogicalSize = image->truncatedLogicalSize();
drawConsumingImageBuffer(WTFMove(image), FloatRect(destination, imageLogicalSize), FloatRect(FloatPoint(), imageLogicalSize), imagePaintingOptions);
}
@@ -617,7 +617,7 @@
{
if (!image)
return;
- IntSize imageLogicalSize = image->logicalSize();
+ IntSize imageLogicalSize = image->truncatedLogicalSize();
drawConsumingImageBuffer(WTFMove(image), destination, FloatRect(FloatPoint(), FloatSize(imageLogicalSize)), imagePaintingOptions);
}
Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (285070 => 285071)
--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h 2021-10-30 02:44:22 UTC (rev 285071)
@@ -86,7 +86,8 @@
virtual void changeDestinationImageBuffer(RenderingResourceIdentifier) { }
virtual void prepareToAppendDisplayListItems(DisplayList::ItemBufferHandle&&) { }
- virtual IntSize logicalSize() const = 0;
+ virtual FloatSize logicalSize() const = 0;
+ virtual IntSize truncatedLogicalSize() const = 0; // This truncates the real size. You probably should be calling logicalSize() instead.
virtual float resolutionScale() const = 0;
virtual DestinationColorSpace colorSpace() const = 0;
virtual PixelFormat pixelFormat() const = 0;
Modified: trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp (285070 => 285071)
--- trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -76,7 +76,7 @@
});
// We do not need to recreate the buffer if the current buffer is large enough.
- if (m_imageBuffer && m_imageBuffer->logicalSize().width() >= size.width() && m_imageBuffer->logicalSize().height() >= size.height())
+ if (m_imageBuffer && m_imageBuffer->truncatedLogicalSize().width() >= size.width() && m_imageBuffer->truncatedLogicalSize().height() >= size.height())
return m_imageBuffer;
// Round to the nearest 32 pixels so we do not grow the buffer for similar sized requests.
Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h (285070 => 285071)
--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h 2021-10-30 02:44:22 UTC (rev 285071)
@@ -35,6 +35,7 @@
template<typename BackendType>
class ImageBuffer : public ConcreteImageBuffer<BackendType> {
using BaseConcreteImageBuffer = ConcreteImageBuffer<BackendType>;
+ using BaseConcreteImageBuffer::truncatedLogicalSize;
using BaseConcreteImageBuffer::logicalSize;
using BaseConcreteImageBuffer::baseTransform;
@@ -51,7 +52,7 @@
ImageBuffer(const ImageBufferBackend::Parameters& parameters, std::unique_ptr<BackendType>&& backend)
: BaseConcreteImageBuffer(parameters, WTFMove(backend))
- , m_drawingContext(logicalSize(), baseTransform())
+ , m_drawingContext(truncatedLogicalSize(), baseTransform())
, m_writingClient(makeUnique<InMemoryDisplayList::WritingClient>())
, m_readingClient(makeUnique<InMemoryDisplayList::ReadingClient>())
{
@@ -61,7 +62,7 @@
ImageBuffer(const ImageBufferBackend::Parameters& parameters, RecorderImpl::Delegate* delegate = nullptr)
: BaseConcreteImageBuffer(parameters)
- , m_drawingContext(logicalSize(), baseTransform(), delegate)
+ , m_drawingContext(truncatedLogicalSize(), baseTransform(), delegate)
, m_writingClient(makeUnique<InMemoryDisplayList::WritingClient>())
, m_readingClient(makeUnique<InMemoryDisplayList::ReadingClient>())
{
Modified: trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp (285070 => 285071)
--- trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -70,7 +70,7 @@
return;
filterContext.drawImageBuffer(*imageBuffer2, drawingRegionOfInputImage(in2->absolutePaintRect()));
- filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), IntRect(IntPoint(), imageBuffer->logicalSize()), { CompositeOperator::SourceOver, m_mode });
+ filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), IntRect(IntPoint(), imageBuffer->truncatedLogicalSize()), { CompositeOperator::SourceOver, m_mode });
}
#endif
Modified: trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp (285070 => 285071)
--- trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -286,7 +286,7 @@
resultImage->context().drawImageBuffer(*inBuffer, drawingRegionOfInputImage(in->absolutePaintRect()));
PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, resultColorSpace() };
- IntRect imageRect(IntPoint(), resultImage->logicalSize());
+ IntRect imageRect(IntPoint(), resultImage->truncatedLogicalSize());
auto pixelBuffer = resultImage->getPixelBuffer(format, imageRect);
if (!pixelBuffer)
return;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp (285070 => 285071)
--- trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -278,19 +278,19 @@
}
case FECOMPOSITE_OPERATOR_OUT:
filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()));
- filterContext.drawImageBuffer(*imageBuffer2, drawingRegionOfInputImage(in2->absolutePaintRect()), IntRect(IntPoint(), imageBuffer2->logicalSize()), CompositeOperator::DestinationOut);
+ filterContext.drawImageBuffer(*imageBuffer2, drawingRegionOfInputImage(in2->absolutePaintRect()), IntRect(IntPoint(), imageBuffer2->truncatedLogicalSize()), CompositeOperator::DestinationOut);
break;
case FECOMPOSITE_OPERATOR_ATOP:
filterContext.drawImageBuffer(*imageBuffer2, drawingRegionOfInputImage(in2->absolutePaintRect()));
- filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), IntRect(IntPoint(), imageBuffer->logicalSize()), CompositeOperator::SourceAtop);
+ filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), IntRect(IntPoint(), imageBuffer->truncatedLogicalSize()), CompositeOperator::SourceAtop);
break;
case FECOMPOSITE_OPERATOR_XOR:
filterContext.drawImageBuffer(*imageBuffer2, drawingRegionOfInputImage(in2->absolutePaintRect()));
- filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), IntRect(IntPoint(), imageBuffer->logicalSize()), CompositeOperator::XOR);
+ filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), IntRect(IntPoint(), imageBuffer->truncatedLogicalSize()), CompositeOperator::XOR);
break;
case FECOMPOSITE_OPERATOR_LIGHTER:
filterContext.drawImageBuffer(*imageBuffer2, drawingRegionOfInputImage(in2->absolutePaintRect()));
- filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), IntRect(IntPoint(), imageBuffer->logicalSize()), CompositeOperator::PlusLighter);
+ filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), IntRect(IntPoint(), imageBuffer->truncatedLogicalSize()), CompositeOperator::PlusLighter);
break;
default:
break;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp (285070 => 285071)
--- trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -100,7 +100,7 @@
ShadowBlur contextShadow(blurRadius, offset, m_shadowColor);
PixelBufferFormat format { AlphaPremultiplication::Premultiplied, PixelFormat::RGBA8, resultColorSpace() };
- IntRect shadowArea(IntPoint(), resultImage->logicalSize());
+ IntRect shadowArea(IntPoint(), resultImage->truncatedLogicalSize());
auto pixelBuffer = resultImage->getPixelBuffer(format, shadowArea);
if (!pixelBuffer)
return;
Modified: trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp (285070 => 285071)
--- trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -148,7 +148,7 @@
if (!imageBuffer)
return;
- auto pixelBuffer = imageBuffer->getPixelBuffer({ AlphaPremultiplication::Premultiplied, PixelFormat::BGRA8, DestinationColorSpace::SRGB() }, { { }, imageBuffer->logicalSize() });
+ auto pixelBuffer = imageBuffer->getPixelBuffer({ AlphaPremultiplication::Premultiplied, PixelFormat::BGRA8, DestinationColorSpace::SRGB() }, { { }, imageBuffer->truncatedLogicalSize() });
if (!pixelBuffer)
return;
Modified: trunk/Source/WebCore/rendering/CSSFilter.cpp (285070 => 285071)
--- trunk/Source/WebCore/rendering/CSSFilter.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/rendering/CSSFilter.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -332,7 +332,7 @@
return;
IntSize logicalSize { m_sourceDrawingRegion.size() };
- if (!sourceImage() || sourceImage()->logicalSize() != logicalSize) {
+ if (!sourceImage() || sourceImage()->truncatedLogicalSize() != logicalSize) {
#if USE(DIRECT2D)
setSourceImage(ImageBuffer::create(logicalSize, renderingMode(), &targetContext, filterScale(), DestinationColorSpace::SRGB(), PixelFormat::BGRA8));
#else
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp (285070 => 285071)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -111,7 +111,7 @@
if (!tileImage)
return nullptr;
- const IntSize tileImageSize = tileImage->logicalSize();
+ const IntSize tileImageSize = tileImage->truncatedLogicalSize();
auto copiedImage = ImageBuffer::sinkIntoNativeImage(WTFMove(tileImage));
if (!copiedImage)
Modified: trunk/Source/WebKit/ChangeLog (285070 => 285071)
--- trunk/Source/WebKit/ChangeLog 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebKit/ChangeLog 2021-10-30 02:44:22 UTC (rev 285071)
@@ -1,3 +1,18 @@
+2021-10-29 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Rename ImageBuffer.logicalSize to ImageBuffer.truncatedLogicalSize
+ https://bugs.webkit.org/show_bug.cgi?id=232515
+ <rdar://problem/84829689>
+
+ Reviewed by Tim Horton.
+
+ * GPUProcess/graphics/RemoteRenderingBackend.cpp:
+ (WebKit::RemoteRenderingBackend::getShareableBitmapForImageBufferWithQualifiedIdentifier):
+ * WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
+ (WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy):
+ * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
+ (WebKit::RemoteRenderingBackendProxy::createRemoteImageBuffer):
+
2021-10-29 Kate Cheney <katherine_che...@apple.com>
Crash setting up AVCaptureSession
Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp (285070 => 285071)
--- trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -307,7 +307,7 @@
if (!image)
return;
auto backendSize = imageBuffer->backendSize();
- auto resultSize = preserveResolution == WebCore::PreserveResolution::Yes ? backendSize : imageBuffer->logicalSize();
+ auto resultSize = preserveResolution == WebCore::PreserveResolution::Yes ? backendSize : imageBuffer->truncatedLogicalSize();
auto bitmap = ShareableBitmap::createShareable(resultSize, { imageBuffer->colorSpace() });
if (!bitmap)
return;
Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h (285070 => 285071)
--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h 2021-10-30 02:44:22 UTC (rev 285071)
@@ -101,7 +101,7 @@
RemoteImageBufferProxy(const WebCore::ImageBufferBackend::Parameters& parameters, RemoteRenderingBackendProxy& remoteRenderingBackendProxy)
: BaseConcreteImageBuffer(parameters)
, m_remoteRenderingBackendProxy(remoteRenderingBackendProxy)
- , m_remoteDisplayList(*this, remoteRenderingBackendProxy, { { }, BaseConcreteImageBuffer::logicalSize() }, BaseConcreteImageBuffer::baseTransform())
+ , m_remoteDisplayList(*this, remoteRenderingBackendProxy, { { }, BaseConcreteImageBuffer::truncatedLogicalSize() }, BaseConcreteImageBuffer::baseTransform())
{
ASSERT(m_remoteRenderingBackendProxy);
m_remoteRenderingBackendProxy->remoteResourceCacheProxy().cacheImageBuffer(*this);
Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp (285070 => 285071)
--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp 2021-10-30 02:08:19 UTC (rev 285070)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp 2021-10-30 02:44:22 UTC (rev 285071)
@@ -127,7 +127,7 @@
void RemoteRenderingBackendProxy::createRemoteImageBuffer(ImageBuffer& imageBuffer)
{
- sendToStream(Messages::RemoteRenderingBackend::CreateImageBuffer(imageBuffer.logicalSize(), imageBuffer.renderingMode(), imageBuffer.resolutionScale(), imageBuffer.colorSpace(), imageBuffer.pixelFormat(), imageBuffer.renderingResourceIdentifier()));
+ sendToStream(Messages::RemoteRenderingBackend::CreateImageBuffer(imageBuffer.truncatedLogicalSize(), imageBuffer.renderingMode(), imageBuffer.resolutionScale(), imageBuffer.colorSpace(), imageBuffer.pixelFormat(), imageBuffer.renderingResourceIdentifier()));
}
RefPtr<ImageBuffer> RemoteRenderingBackendProxy::createImageBuffer(const FloatSize& size, RenderingMode renderingMode, float resolutionScale, const DestinationColorSpace& colorSpace, PixelFormat pixelFormat)