Changeset 181695 in webkit
- Timestamp:
- Mar 18, 2015, 9:22:04 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
rendering/RenderLayer.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r181694 r181695 1 2015-03-17 Simon Fraser <simon.fraser@apple.com> 2 3 Skip trying to paint overlay scrollbars when there are none or they are clipped out 4 https://bugs.webkit.org/show_bug.cgi?id=142811 5 rdar://problem/20200725 6 7 Reviewed by Darin Adler. 8 9 In some content with lots of layers and overflow:scroll, we could spend 20% of 10 the time under paintOverflowControlsForFragments() setting up an (empty) clip, 11 and then trying to draw scrollbars that we don't have. 12 13 Avoid calling paintOverflowControlsForFragments() if there are no scrollbars, 14 and don't both setting up an empty clip just to paint nothing. 15 16 * rendering/RenderLayer.cpp: 17 (WebCore::RenderLayer::paintLayerContents): 18 (WebCore::RenderLayer::paintOverflowControlsForFragments): 19 1 20 2015-03-18 Per Arne Vollan <peavo@outlook.com> 2 21 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r181654 r181695 4320 4320 } 4321 4321 4322 if (isPaintingOverlayScrollbars )4322 if (isPaintingOverlayScrollbars && hasScrollbars()) 4323 4323 paintOverflowControlsForFragments(layerFragments, context, localPaintingInfo); 4324 4324 … … 4616 4616 RenderObject* subtreePaintRootForRenderer) 4617 4617 { 4618 for (size_t i = 0; i < layerFragments.size(); ++i) { 4619 const LayerFragment& fragment = layerFragments.at(i); 4618 for (const auto& fragment : layerFragments) { 4620 4619 if (!fragment.shouldPaintContent) 4621 4620 continue; … … 4647 4646 // Begin transparency if we have something to paint. 4648 4647 if (haveTransparency) { 4649 for (size_t i = 0; i < layerFragments.size(); ++i) { 4650 const LayerFragment& fragment = layerFragments.at(i); 4648 for (const auto& fragment : layerFragments) { 4651 4649 if (fragment.shouldPaintContent && !fragment.foregroundRect.isEmpty()) { 4652 4650 beginTransparencyLayers(transparencyLayerContext, localPaintingInfo, transparencyPaintDirtyRect); … … 4704 4702 bool shouldClip = localPaintingInfo.clipToDirtyRect && layerFragments.size() > 1; 4705 4703 4706 for (size_t i = 0; i < layerFragments.size(); ++i) { 4707 const LayerFragment& fragment = layerFragments.at(i); 4704 for (const auto& fragment : layerFragments) { 4708 4705 if (!fragment.shouldPaintContent || fragment.foregroundRect.isEmpty()) 4709 4706 continue; … … 4725 4722 PaintBehavior paintBehavior, RenderObject* subtreePaintRootForRenderer) 4726 4723 { 4727 for (size_t i = 0; i < layerFragments.size(); ++i) { 4728 const LayerFragment& fragment = layerFragments.at(i); 4724 for (const auto& fragment : layerFragments) { 4729 4725 if (fragment.outlineRect.isEmpty()) 4730 4726 continue; … … 4741 4737 RenderObject* subtreePaintRootForRenderer) 4742 4738 { 4743 for (size_t i = 0; i < layerFragments.size(); ++i) { 4744 const LayerFragment& fragment = layerFragments.at(i); 4739 for (const auto& fragment : layerFragments) { 4745 4740 if (!fragment.shouldPaintContent) 4746 4741 continue; … … 4762 4757 RenderObject* subtreePaintRootForRenderer) 4763 4758 { 4764 for (size_t i = 0; i < layerFragments.size(); ++i) { 4765 const LayerFragment& fragment = layerFragments.at(i); 4759 for (const auto& fragment : layerFragments) { 4766 4760 if (!fragment.shouldPaintContent) 4767 4761 continue; … … 4781 4775 void RenderLayer::paintOverflowControlsForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo) 4782 4776 { 4783 for (size_t i = 0; i < layerFragments.size(); ++i) { 4784 const LayerFragment& fragment = layerFragments.at(i); 4777 for (const auto& fragment : layerFragments) { 4778 if (fragment.backgroundRect.isEmpty()) 4779 continue; 4785 4780 clipToRect(localPaintingInfo, context, fragment.backgroundRect); 4786 4781 paintOverflowControls(context, roundedIntPoint(toLayoutPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subpixelAccumulation)),
Note:
See TracChangeset
for help on using the changeset viewer.