Diff
Modified: trunk/Source/WebCore/ChangeLog (254501 => 254502)
--- trunk/Source/WebCore/ChangeLog 2020-01-14 09:17:46 UTC (rev 254501)
+++ trunk/Source/WebCore/ChangeLog 2020-01-14 10:01:10 UTC (rev 254502)
@@ -1,3 +1,25 @@
+2020-01-14 Tomoki Imai <tomoki.i...@sony.com>
+
+ Always Use CAIRO_OPERATOR_SOURCE to copyRectFromOneSurfaceToAnother
+ https://bugs.webkit.org/show_bug.cgi?id=206215
+
+ Reviewed by Žan Doberšek.
+
+ Most of copyRectFromOneSurfaceToAnother callers passed CAIRO_OPERATOR_SOURCE not to blend.
+ BackingStoreBackendCairoImpl::scroll had copyRectFromOneSurfaceToAnother with the default cairoOperator CAIRO_OPERATOR_OVER,
+ but scrolling should use CAIRO_OPERATOR_SOURCE because there is no need to blend and it can have a performance benefit.
+
+ No new tests, covered by the existing tests.
+
+ * platform/graphics/cairo/CairoUtilities.cpp:
+ (WebCore::copyRectFromOneSurfaceToAnother): Use CAIRO_OPERATOR_SOURCE to copy rect.
+ * platform/graphics/cairo/CairoUtilities.h: Remove cairoOperator parameter from copyRectFromOneSurfaceToAnother.
+ * platform/graphics/cairo/GraphicsContextGLCairo.cpp:
+ (WebCore::GraphicsContextGLOpenGL::ImageExtractor::extractImage):
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (WebCore::getImageData):
+ (WebCore::ImageBuffer::putByteArray):
+
2020-01-14 Eric Carlson <eric.carl...@apple.com>
Expose video tracks for media files in the GPUProcess
Modified: trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp (254501 => 254502)
--- trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp 2020-01-14 09:17:46 UTC (rev 254501)
+++ trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp 2020-01-14 10:01:10 UTC (rev 254502)
@@ -299,11 +299,11 @@
cairo_fill(to);
}
-void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& sourceOffset, const IntRect& rect, const IntSize& destOffset, cairo_operator_t cairoOperator)
+void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& sourceOffset, const IntRect& rect, const IntSize& destOffset)
{
RefPtr<cairo_t> context = adoptRef(cairo_create(to));
cairo_translate(context.get(), destOffset.width(), destOffset.height());
- cairo_set_operator(context.get(), cairoOperator);
+ cairo_set_operator(context.get(), CAIRO_OPERATOR_SOURCE);
copyRectFromCairoSurfaceToContext(from, context.get(), sourceOffset, rect);
}
Modified: trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h (254501 => 254502)
--- trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h 2020-01-14 09:17:46 UTC (rev 254501)
+++ trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h 2020-01-14 10:01:10 UTC (rev 254502)
@@ -86,7 +86,7 @@
RefPtr<cairo_surface_t> copyCairoImageSurface(cairo_surface_t*);
void copyRectFromCairoSurfaceToContext(cairo_surface_t* from, cairo_t* to, const IntSize& offset, const IntRect&);
-void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& offset, const IntRect&, const IntSize& = IntSize(), cairo_operator_t = CAIRO_OPERATOR_OVER);
+void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& offset, const IntRect&, const IntSize& = IntSize());
IntSize cairoSurfaceSize(cairo_surface_t*);
void flipImageSurfaceVertically(cairo_surface_t*);
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp (254501 => 254502)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp 2020-01-14 09:17:46 UTC (rev 254501)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp 2020-01-14 10:01:10 UTC (rev 254502)
@@ -69,7 +69,7 @@
if (m_imageSurface && cairo_surface_get_type(m_imageSurface.get()) != CAIRO_SURFACE_TYPE_IMAGE) {
IntSize surfaceSize = cairoSurfaceSize(m_imageSurface.get());
auto tmpSurface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, surfaceSize.width(), surfaceSize.height()));
- copyRectFromOneSurfaceToAnother(m_imageSurface.get(), tmpSurface.get(), IntSize(), IntRect(IntPoint(), surfaceSize), IntSize(), CAIRO_OPERATOR_SOURCE);
+ copyRectFromOneSurfaceToAnother(m_imageSurface.get(), tmpSurface.get(), IntSize(), IntRect(IntPoint(), surfaceSize), IntSize());
m_imageSurface = WTFMove(tmpSurface);
}
}
Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (254501 => 254502)
--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp 2020-01-14 09:17:46 UTC (rev 254501)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp 2020-01-14 10:01:10 UTC (rev 254502)
@@ -486,7 +486,7 @@
if (imageSurface != data.m_surface.get()) {
// This cairo surface operation is done in LogicalCoordinateSystem.
IntRect logicalArea = intersection(logicalRect, IntRect(0, 0, logicalSize.width(), logicalSize.height()));
- copyRectFromOneSurfaceToAnother(data.m_surface.get(), imageSurface.get(), IntSize(-logicalArea.x(), -logicalArea.y()), IntRect(IntPoint(), logicalArea.size()), IntSize(), CAIRO_OPERATOR_SOURCE);
+ copyRectFromOneSurfaceToAnother(data.m_surface.get(), imageSurface.get(), IntSize(-logicalArea.x(), -logicalArea.y()), IntRect(IntPoint(), logicalArea.size()), IntSize());
}
unsigned char* dataSrc = ""
@@ -650,7 +650,7 @@
if (imageSurface != m_data.m_surface.get()) {
// This cairo surface operation is done in LogicalCoordinateSystem.
- copyRectFromOneSurfaceToAnother(imageSurface.get(), m_data.m_surface.get(), IntSize(), IntRect(0, 0, logicalNumColumns, logicalNumRows), IntSize(logicalDestPoint.x() + logicalSourceRect.x(), logicalDestPoint.y() + logicalSourceRect.y()), CAIRO_OPERATOR_SOURCE);
+ copyRectFromOneSurfaceToAnother(imageSurface.get(), m_data.m_surface.get(), IntSize(), IntRect(0, 0, logicalNumColumns, logicalNumRows), IntSize(logicalDestPoint.x() + logicalSourceRect.x(), logicalDestPoint.y() + logicalSourceRect.y()));
}
}