Changeset 269328 in webkit
- Timestamp:
- Nov 3, 2020 12:32:45 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269320 r269328 1 2020-11-03 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [TextureMapper] Crashed in TextureMapperLayer::paintUsingOverlapRegions 4 https://bugs.webkit.org/show_bug.cgi?id=214817 5 <rdar://problem/66489090> 6 7 Reviewed by Don Olmstead. 8 9 * compositing/tiling/huge-layer-with-opacity-expected.html: Added. 10 * compositing/tiling/huge-layer-with-opacity.html: Added. 11 1 12 2020-11-03 Yusuke Suzuki <ysuzuki@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r269325 r269328 1 2020-11-03 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [TextureMapper] Crashed in TextureMapperLayer::paintUsingOverlapRegions 4 https://bugs.webkit.org/show_bug.cgi?id=214817 5 <rdar://problem/66489090> 6 7 Reviewed by Don Olmstead. 8 9 TextureMapperLayer::paintUsingOverlapRegions has the expression 10 `overlapRegion.bounds().size().area()` which crashes for a very 11 large layer. 12 13 computeOverlapRegions returned very large overlap and non-overlap 14 regions without taking the clip bounds into account. 15 16 Change computeOverlapRegions to return clipped regions. 17 paintUsingOverlapRegions no longer needs to clip the returned 18 regions. 19 20 Test: compositing/tiling/huge-layer-with-opacity.html 21 22 * platform/graphics/texmap/TextureMapperLayer.cpp: 23 (WebCore::TextureMapperLayer::computeOverlapRegions): 24 (WebCore::TextureMapperLayer::paintUsingOverlapRegions): 25 * platform/graphics/texmap/TextureMapperLayer.h: 26 1 27 2020-11-03 Stephan Szabo <stephan.szabo@sony.com> 2 28 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
r269204 r269328 331 331 return; 332 332 333 FloatRect boundingRect;333 FloatRect localBoundingRect; 334 334 if (m_backingStore || m_state.masksToBounds || m_state.maskLayer || hasFilters()) 335 boundingRect = layerRect();335 localBoundingRect = layerRect(); 336 336 else if (m_contentsLayer || m_state.solidColor.isVisible()) 337 boundingRect = m_state.contentsRect;337 localBoundingRect = m_state.contentsRect; 338 338 339 339 if (m_currentFilters.hasOutsets()) { 340 340 auto outsets = m_currentFilters.outsets(); 341 IntRect unfilteredTargetRect( boundingRect);342 boundingRect.move(std::max(0, -outsets.left()), std::max(0, -outsets.top()));343 boundingRect.expand(outsets.left() + outsets.right(), outsets.top() + outsets.bottom());344 boundingRect.unite(unfilteredTargetRect);341 IntRect unfilteredTargetRect(localBoundingRect); 342 localBoundingRect.move(std::max(0, -outsets.left()), std::max(0, -outsets.top())); 343 localBoundingRect.expand(outsets.left() + outsets.right(), outsets.top() + outsets.bottom()); 344 localBoundingRect.unite(unfilteredTargetRect); 345 345 } 346 346 … … 352 352 if (m_state.replicaLayer) { 353 353 replicaMatrix = replicaTransform(); 354 boundingRect.unite(replicaMatrix.mapRect(boundingRect)); 355 } 356 357 boundingRect = transform.mapRect(boundingRect); 354 localBoundingRect.unite(replicaMatrix.mapRect(localBoundingRect)); 355 } 356 357 IntRect clipBounds(options.textureMapper.clipBounds()); 358 clipBounds.move(-options.offset); 359 360 IntRect viewportBoundingRect = enclosingIntRect(transform.mapRect(localBoundingRect)); 361 viewportBoundingRect.intersect(clipBounds); 358 362 359 363 // Count all masks and filters as overlap layers. 360 364 if (hasFilters() || m_state.maskLayer || (m_state.replicaLayer && m_state.replicaLayer->m_state.maskLayer)) { 361 Region newOverlapRegion( enclosingIntRect(boundingRect));365 Region newOverlapRegion(viewportBoundingRect); 362 366 nonOverlapRegion.subtract(newOverlapRegion); 363 367 overlapRegion.unite(newOverlapRegion); … … 366 370 367 371 Region newOverlapRegion; 368 Region newNonOverlapRegion( enclosingIntRect(boundingRect));372 Region newNonOverlapRegion(viewportBoundingRect); 369 373 370 374 if (!m_state.masksToBounds) { … … 409 413 410 414 for (auto& rect : rects) { 411 if (!rect.intersects(options.textureMapper.clipBounds()))412 continue;413 414 415 options.textureMapper.beginClip(TransformationMatrix(), FloatRoundedRect(rect)); 415 416 paintSelfAndChildrenWithReplica(options); … … 425 426 426 427 IntSize maxTextureSize = options.textureMapper.maxTextureSize(); 427 IntRect adjustedClipBounds(options.textureMapper.clipBounds());428 adjustedClipBounds.move(-options.offset);429 428 for (auto& rect : rects) { 430 429 for (int x = rect.x(); x < rect.maxX(); x += maxTextureSize.width()) { … … 432 431 IntRect tileRect(IntPoint(x, y), maxTextureSize); 433 432 tileRect.intersect(rect); 434 if (!tileRect.intersects(adjustedClipBounds))435 continue;436 433 437 434 paintWithIntermediateSurface(options, tileRect);
Note: See TracChangeset
for help on using the changeset viewer.