Changeset 254502 in webkit
- Timestamp:
- Jan 14, 2020 2:01:10 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r254499 r254502 1 2020-01-14 Tomoki Imai <Tomoki.Imai@sony.com> 2 3 Always Use CAIRO_OPERATOR_SOURCE to copyRectFromOneSurfaceToAnother 4 https://bugs.webkit.org/show_bug.cgi?id=206215 5 6 Reviewed by Žan Doberšek. 7 8 Most of copyRectFromOneSurfaceToAnother callers passed CAIRO_OPERATOR_SOURCE not to blend. 9 BackingStoreBackendCairoImpl::scroll had copyRectFromOneSurfaceToAnother with the default cairoOperator CAIRO_OPERATOR_OVER, 10 but scrolling should use CAIRO_OPERATOR_SOURCE because there is no need to blend and it can have a performance benefit. 11 12 No new tests, covered by the existing tests. 13 14 * platform/graphics/cairo/CairoUtilities.cpp: 15 (WebCore::copyRectFromOneSurfaceToAnother): Use CAIRO_OPERATOR_SOURCE to copy rect. 16 * platform/graphics/cairo/CairoUtilities.h: Remove cairoOperator parameter from copyRectFromOneSurfaceToAnother. 17 * platform/graphics/cairo/GraphicsContextGLCairo.cpp: 18 (WebCore::GraphicsContextGLOpenGL::ImageExtractor::extractImage): 19 * platform/graphics/cairo/ImageBufferCairo.cpp: 20 (WebCore::getImageData): 21 (WebCore::ImageBuffer::putByteArray): 22 1 23 2020-01-14 Eric Carlson <eric.carlson@apple.com> 2 24 -
trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
r252965 r254502 300 300 } 301 301 302 void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& sourceOffset, const IntRect& rect, const IntSize& destOffset , cairo_operator_t cairoOperator)302 void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& sourceOffset, const IntRect& rect, const IntSize& destOffset) 303 303 { 304 304 RefPtr<cairo_t> context = adoptRef(cairo_create(to)); 305 305 cairo_translate(context.get(), destOffset.width(), destOffset.height()); 306 cairo_set_operator(context.get(), cairoOperator);306 cairo_set_operator(context.get(), CAIRO_OPERATOR_SOURCE); 307 307 copyRectFromCairoSurfaceToContext(from, context.get(), sourceOffset, rect); 308 308 } -
trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h
r234610 r254502 87 87 88 88 void copyRectFromCairoSurfaceToContext(cairo_surface_t* from, cairo_t* to, const IntSize& offset, const IntRect&); 89 void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& offset, const IntRect&, const IntSize& = IntSize() , cairo_operator_t = CAIRO_OPERATOR_OVER);89 void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& offset, const IntRect&, const IntSize& = IntSize()); 90 90 91 91 IntSize cairoSurfaceSize(cairo_surface_t*); -
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp
r254064 r254502 70 70 IntSize surfaceSize = cairoSurfaceSize(m_imageSurface.get()); 71 71 auto tmpSurface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, surfaceSize.width(), surfaceSize.height())); 72 copyRectFromOneSurfaceToAnother(m_imageSurface.get(), tmpSurface.get(), IntSize(), IntRect(IntPoint(), surfaceSize), IntSize() , CAIRO_OPERATOR_SOURCE);72 copyRectFromOneSurfaceToAnother(m_imageSurface.get(), tmpSurface.get(), IntSize(), IntRect(IntPoint(), surfaceSize), IntSize()); 73 73 m_imageSurface = WTFMove(tmpSurface); 74 74 } -
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
r254214 r254502 487 487 // This cairo surface operation is done in LogicalCoordinateSystem. 488 488 IntRect logicalArea = intersection(logicalRect, IntRect(0, 0, logicalSize.width(), logicalSize.height())); 489 copyRectFromOneSurfaceToAnother(data.m_surface.get(), imageSurface.get(), IntSize(-logicalArea.x(), -logicalArea.y()), IntRect(IntPoint(), logicalArea.size()), IntSize() , CAIRO_OPERATOR_SOURCE);489 copyRectFromOneSurfaceToAnother(data.m_surface.get(), imageSurface.get(), IntSize(-logicalArea.x(), -logicalArea.y()), IntRect(IntPoint(), logicalArea.size()), IntSize()); 490 490 } 491 491 … … 651 651 if (imageSurface != m_data.m_surface.get()) { 652 652 // This cairo surface operation is done in LogicalCoordinateSystem. 653 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);653 copyRectFromOneSurfaceToAnother(imageSurface.get(), m_data.m_surface.get(), IntSize(), IntRect(0, 0, logicalNumColumns, logicalNumRows), IntSize(logicalDestPoint.x() + logicalSourceRect.x(), logicalDestPoint.y() + logicalSourceRect.y())); 654 654 } 655 655 }
Note: See TracChangeset
for help on using the changeset viewer.