WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-225907-20210521145947.patch (text/plain), 6.13 KB, created by
Fujii Hironori
on 2021-05-20 22:59:48 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2021-05-20 22:59:48 PDT
Size:
6.13 KB
patch
obsolete
>Subversion Revision: 277775 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index cd22d7cacffc51886320f1c2a5e26b36c28ff3fe..7ef6aa4db0a6e448d1a94042002d718c29f0687c 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,40 @@ >+2021-05-20 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ ASSERTION FAILED: m_imageBufferResult->colorSpace() == m_resultColorSpace in FilterEffect::copyPremultipliedResult >+ https://bugs.webkit.org/show_bug.cgi?id=225907 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ FilterEffect::copyPremultipliedResult has the assertion ensuring >+ m_imageBufferResult->colorSpace() matches m_resultColorSpace. >+ However, it happened to fail in !USE(CG) ports. >+ >+ FilterEffect::transformResultColorSpace does nothing if USE(CG), >+ but it calls ImageBuffer::transformColorSpace otherwise. >+ >+ ImageBuffer::colorSpace() and ImageBufferBackend::colorSpace() >+ returned the old color space after ImageBuffer::transformColorSpace. >+ They should return the new color space. >+ >+ After fixing the above problem, an assertion in >+ WebCore::convertImagePixels was going to fail. It asserts no color >+ space conversion happens. >+ >+ FEColorMatrix, FEDropShadow and >+ ImageBufferBackend::convertToLuminanceMask were explicitly >+ specifying DestinationColorSpace::SRGB to getPixelBuffer. They >+ shouldn't convert the color space. >+ >+ * platform/graphics/ConcreteImageBuffer.h: >+ * platform/graphics/ImageBufferBackend.cpp: >+ (WebCore::ImageBufferBackend::convertToLuminanceMask): >+ * platform/graphics/cairo/ImageBufferCairoBackend.cpp: >+ (WebCore::ImageBufferCairoBackend::transformColorSpace): >+ * platform/graphics/filters/FEColorMatrix.cpp: >+ (WebCore::FEColorMatrix::platformApplySoftware): >+ * platform/graphics/filters/FEDropShadow.cpp: >+ (WebCore::FEDropShadow::platformApplySoftware): >+ > 2021-05-19 Tomoki Imai <Tomoki.Imai@sony.com> > > Scrolling must be done after the layout when doing full page zoom >diff --git a/Source/WebCore/platform/graphics/ConcreteImageBuffer.h b/Source/WebCore/platform/graphics/ConcreteImageBuffer.h >index c8a0010d8999de538913418da8c3a37b49189fc2..3bfca9b65a5e5ac483396d0de4c110dfbf0a2fe7 100644 >--- a/Source/WebCore/platform/graphics/ConcreteImageBuffer.h >+++ b/Source/WebCore/platform/graphics/ConcreteImageBuffer.h >@@ -200,6 +200,7 @@ protected: > if (auto* backend = ensureBackendCreated()) { > flushDrawingContext(); > backend->transformColorSpace(srcColorSpace, destColorSpace); >+ m_parameters.colorSpace = destColorSpace; > } > } > >diff --git a/Source/WebCore/platform/graphics/ImageBufferBackend.cpp b/Source/WebCore/platform/graphics/ImageBufferBackend.cpp >index 765ceac20f2a4866f3b9f4f4ccd3bb50480816b0..e221e19f26daa7abfb19302a13d14a24e7d03408 100644 >--- a/Source/WebCore/platform/graphics/ImageBufferBackend.cpp >+++ b/Source/WebCore/platform/graphics/ImageBufferBackend.cpp >@@ -70,7 +70,7 @@ void ImageBufferBackend::drawConsuming(GraphicsContext& destinationContext, cons > > void ImageBufferBackend::convertToLuminanceMask() > { >- PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, DestinationColorSpace::SRGB }; >+ PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, colorSpace() }; > auto pixelBuffer = getPixelBuffer(format, logicalRect()); > if (!pixelBuffer) > return; >diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp b/Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp >index 6f07f4e7274d61c332f6a3215818fe09890ce4c4..c9e7080146c7f232727d1a427e11e6bc8d0818f2 100644 >--- a/Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp >+++ b/Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp >@@ -99,6 +99,8 @@ void ImageBufferCairoBackend::transformColorSpace(DestinationColorSpace srcColor > || (destColorSpace != DestinationColorSpace::LinearSRGB && destColorSpace != DestinationColorSpace::SRGB)) > return; > >+ m_parameters.colorSpace = destColorSpace; >+ > if (destColorSpace == DestinationColorSpace::LinearSRGB) { > static const std::array<uint8_t, 256> linearRgbLUT = [] { > std::array<uint8_t, 256> array; >diff --git a/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp b/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp >index cccc602cda5bcfd017dc382e3cd79775f68ecb85..7588dcdadcc9aa1e2bac4b9e8a25504317c59c2f 100644 >--- a/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp >+++ b/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp >@@ -285,7 +285,7 @@ void FEColorMatrix::platformApplySoftware() > if (inBuffer) > resultImage->context().drawImageBuffer(*inBuffer, drawingRegionOfInputImage(in->absolutePaintRect())); > >- PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, DestinationColorSpace::SRGB }; >+ PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, resultColorSpace() }; > IntRect imageRect(IntPoint(), resultImage->logicalSize()); > auto pixelBuffer = resultImage->getPixelBuffer(format, imageRect); > if (!pixelBuffer) >diff --git a/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp b/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp >index decb911fb9d9f68fb2a78bd0d3b7157cd240a84a..5ce7be3a471b47b8dd5426d965bbfe789f6bbdd8 100644 >--- a/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp >+++ b/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp >@@ -99,7 +99,7 @@ void FEDropShadow::platformApplySoftware() > > ShadowBlur contextShadow(blurRadius, offset, m_shadowColor); > >- PixelBufferFormat format { AlphaPremultiplication::Premultiplied, PixelFormat::RGBA8, DestinationColorSpace::SRGB }; >+ PixelBufferFormat format { AlphaPremultiplication::Premultiplied, PixelFormat::RGBA8, resultColorSpace() }; > IntRect shadowArea(IntPoint(), resultImage->logicalSize()); > auto pixelBuffer = resultImage->getPixelBuffer(format, shadowArea); > if (!pixelBuffer)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 225907
:
428914
|
428983
|
429094
|
429132
|
429137
| 429266