Changeset 262194 in webkit
- Timestamp:
- May 27, 2020, 6:25:45 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/cairo/ImageBufferCairoBackend.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r262192 r262194 1 2020-05-27 Miguel Gomez <magomez@igalia.com> 2 3 [WPE] REGRESSION(r253675) Crash when using threaded rendering 4 https://bugs.webkit.org/show_bug.cgi?id=212404 5 6 Reviewed by Carlos Garcia Campos. 7 8 Check whether the GraphicsContext has a PlatformGraphicsContext before trying to paint with 9 it. If there's no PlatformGraphicsContext, paint using the GraphicsContext methods instead. 10 11 * platform/graphics/cairo/ImageBufferCairoBackend.cpp: 12 (WebCore::ImageBufferCairoBackend::draw): 13 (WebCore::ImageBufferCairoBackend::drawPattern): 14 1 15 2020-05-27 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp
r261828 r262194 55 55 void ImageBufferCairoBackend::draw(GraphicsContext& destContext, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options) 56 56 { 57 if (!destContext.hasPlatformContext()) { 58 // If there's no platformContext, we're using threaded rendering, and all the operations must be done 59 // through the GraphicsContext. 60 auto image = copyImage(&destContext == &context() ? CopyBackingStore : DontCopyBackingStore); 61 destContext.drawImage(*image, destRect, srcRect, options); 62 return; 63 } 64 57 65 InterpolationQualityMaintainer interpolationQualityForThisScope(destContext, options.interpolationQuality()); 58 66 const auto& destinationContextState = destContext.state(); … … 62 70 } 63 71 64 void ImageBufferCairoBackend::drawPattern(GraphicsContext& destContext, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& , const ImagePaintingOptions& options)72 void ImageBufferCairoBackend::drawPattern(GraphicsContext& destContext, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options) 65 73 { 74 if (!destContext.hasPlatformContext()) { 75 // If there's no platformContext, we're using threaded rendering, and all the operations must be done 76 // through the GraphicsContext. 77 auto image = copyImage(DontCopyBackingStore); 78 image->drawPattern(destContext, destRect, srcRect, patternTransform, phase, spacing, options); 79 return; 80 } 81 66 82 if (auto image = copyNativeImage(&destContext == &context() ? CopyBackingStore : DontCopyBackingStore)) 67 83 Cairo::drawPattern(*destContext.platformContext(), image.get(), m_logicalSize, destRect, srcRect, patternTransform, phase, options);
Note:
See TracChangeset
for help on using the changeset viewer.