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

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 153233002: *** DO NOT LAND *** Remove regions support, keeping a bare minimum to support "region-based"... (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 if (!boundsComputed) { 754 if (!boundsComputed) {
755 // FIXME: If this layer's overlap bounds include its children, we don't need to add its 755 // FIXME: If this layer's overlap bounds include its children, we don't need to add its
756 // children's bounds to the overlap map. 756 // children's bounds to the overlap map.
757 layerBounds = enclosingIntRect(overlapMap.geometryMap().absoluteRect(lay er->overlapBounds())); 757 layerBounds = enclosingIntRect(overlapMap.geometryMap().absoluteRect(lay er->overlapBounds()));
758 // Empty rects never intersect, but we need them to for the purposes of overlap testing. 758 // Empty rects never intersect, but we need them to for the purposes of overlap testing.
759 if (layerBounds.isEmpty()) 759 if (layerBounds.isEmpty())
760 layerBounds.setSize(IntSize(1, 1)); 760 layerBounds.setSize(IntSize(1, 1));
761 boundsComputed = true; 761 boundsComputed = true;
762 } 762 }
763 763
764 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundClipRect(C lipRectsContext(rootRenderLayer(), 0, AbsoluteClipRects)).rect()); // FIXME: Inc orrect for CSS regions. 764 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundClipRect(C lipRectsContext(rootRenderLayer(), AbsoluteClipRects)).rect());
765 clipRect.intersect(layerBounds); 765 clipRect.intersect(layerBounds);
766 overlapMap.add(layer, clipRect); 766 overlapMap.add(layer, clipRect);
767 } 767 }
768 768
769 void RenderLayerCompositor::addToOverlapMapRecursive(OverlapMap& overlapMap, Ren derLayer* layer, RenderLayer* ancestorLayer) 769 void RenderLayerCompositor::addToOverlapMapRecursive(OverlapMap& overlapMap, Ren derLayer* layer, RenderLayer* ancestorLayer)
770 { 770 {
771 if (!canBeComposited(layer) || overlapMap.contains(layer)) 771 if (!canBeComposited(layer) || overlapMap.contains(layer))
772 return; 772 return;
773 773
774 // A null ancestorLayer is an indication that 'layer' has already been pushe d. 774 // A null ancestorLayer is an indication that 'layer' has already been pushe d.
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 if (next == compositingAncestor) { 1746 if (next == compositingAncestor) {
1747 computeClipRoot = curr; 1747 computeClipRoot = curr;
1748 break; 1748 break;
1749 } 1749 }
1750 curr = next; 1750 curr = next;
1751 } 1751 }
1752 1752
1753 if (!computeClipRoot || computeClipRoot == layer) 1753 if (!computeClipRoot || computeClipRoot == layer)
1754 return false; 1754 return false;
1755 1755
1756 return layer->clipper().backgroundClipRect(ClipRectsContext(computeClipRoot, 0, TemporaryClipRects)).rect() != PaintInfo::infiniteRect(); // FIXME: Incorrec t for CSS regions. 1756 return layer->clipper().backgroundClipRect(ClipRectsContext(computeClipRoot, TemporaryClipRects)).rect() != PaintInfo::infiniteRect();
1757 } 1757 }
1758 1758
1759 // Return true if the given layer is a stacking context and has compositing chil d 1759 // Return true if the given layer is a stacking context and has compositing chil d
1760 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer 1760 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer
1761 // into the hierarchy between this layer and its children in the z-order hierarc hy. 1761 // into the hierarchy between this layer and its children in the z-order hierarc hy.
1762 bool RenderLayerCompositor::clipsCompositingDescendants(const RenderLayer* layer ) const 1762 bool RenderLayerCompositor::clipsCompositingDescendants(const RenderLayer* layer ) const
1763 { 1763 {
1764 return layer->hasCompositingDescendant() && layer->renderer()->hasClipOrOver flowClip(); 1764 return layer->hasCompositingDescendant() && layer->renderer()->hasClipOrOver flowClip();
1765 } 1765 }
1766 1766
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 } else if (graphicsLayer == m_scrollLayer.get()) { 2656 } else if (graphicsLayer == m_scrollLayer.get()) {
2657 name = "Frame Scrolling Layer"; 2657 name = "Frame Scrolling Layer";
2658 } else { 2658 } else {
2659 ASSERT_NOT_REACHED(); 2659 ASSERT_NOT_REACHED();
2660 } 2660 }
2661 2661
2662 return name; 2662 return name;
2663 } 2663 }
2664 2664
2665 } // namespace WebCore 2665 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerClipper.cpp ('k') | Source/core/rendering/RenderLayerStackingNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698