Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: sky/engine/core/rendering/RenderLayer.cpp

Issue 845093002: Delete an assortment of unneeded paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 m_blockSelectionGapsBounds.unite(enclosingIntRect(bounds)); 1653 m_blockSelectionGapsBounds.unite(enclosingIntRect(bounds));
1654 } 1654 }
1655 1655
1656 void RenderLayer::clearBlockSelectionGapsBounds() 1656 void RenderLayer::clearBlockSelectionGapsBounds()
1657 { 1657 {
1658 m_blockSelectionGapsBounds = IntRect(); 1658 m_blockSelectionGapsBounds = IntRect();
1659 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) 1659 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
1660 child->clearBlockSelectionGapsBounds(); 1660 child->clearBlockSelectionGapsBounds();
1661 } 1661 }
1662 1662
1663 void RenderLayer::invalidatePaintForBlockSelectionGaps()
1664 {
1665 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
1666 child->invalidatePaintForBlockSelectionGaps();
1667
1668 if (m_blockSelectionGapsBounds.isEmpty())
1669 return;
1670
1671 LayoutRect rect = m_blockSelectionGapsBounds;
1672 if (renderer()->hasOverflowClip()) {
1673 RenderBox* box = renderBox();
1674 rect.move(-box->scrolledContentOffset());
1675 rect.intersect(box->overflowClipRect(LayoutPoint()));
1676 }
1677 if (renderer()->hasClip())
1678 rect.intersect(toRenderBox(renderer())->clipRect(LayoutPoint()));
1679 if (!rect.isEmpty())
1680 renderer()->invalidatePaintRectangle(rect);
1681 }
1682
1683 IntRect RenderLayer::blockSelectionGapsBounds() const 1663 IntRect RenderLayer::blockSelectionGapsBounds() const
1684 { 1664 {
1685 if (!renderer()->isRenderBlock()) 1665 if (!renderer()->isRenderBlock())
1686 return IntRect(); 1666 return IntRect();
1687 1667
1688 RenderBlock* renderBlock = toRenderBlock(renderer()); 1668 RenderBlock* renderBlock = toRenderBlock(renderer());
1689 LayoutRect gapRects = renderBlock->selectionGapRectsForPaintInvalidation(ren derBlock); 1669 LayoutRect gapRects = renderBlock->selectionGapRectsForPaintInvalidation(ren derBlock);
1690 1670
1691 return pixelSnappedIntRect(gapRects); 1671 return pixelSnappedIntRect(gapRects);
1692 } 1672 }
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 } 2032 }
2053 } 2033 }
2054 2034
2055 void showLayerTree(const blink::RenderObject* renderer) 2035 void showLayerTree(const blink::RenderObject* renderer)
2056 { 2036 {
2057 if (!renderer) 2037 if (!renderer)
2058 return; 2038 return;
2059 showLayerTree(renderer->enclosingLayer()); 2039 showLayerTree(renderer->enclosingLayer());
2060 } 2040 }
2061 #endif 2041 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.h ('k') | sky/engine/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698