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

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

Issue 266473009: Fix & clarify some comments in compositing. Rename clippedByAncestor to more accurately (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make conditionals clearer in shouldClipCompositedBounds Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 // FIXME: We disable accelerated compositing for elements in a RenderFlowThr ead as it doesn't work properly. 1202 // FIXME: We disable accelerated compositing for elements in a RenderFlowThr ead as it doesn't work properly.
1203 // See http://webkit.org/b/84900 to re-enable it. 1203 // See http://webkit.org/b/84900 to re-enable it.
1204 return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && layer- >renderer()->flowThreadState() == RenderObject::NotInsideFlowThread; 1204 return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && layer- >renderer()->flowThreadState() == RenderObject::NotInsideFlowThread;
1205 } 1205 }
1206 1206
1207 // Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips, 1207 // Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips,
1208 // up to the enclosing compositing ancestor. This is required because compositin g layers are parented 1208 // up to the enclosing compositing ancestor. This is required because compositin g layers are parented
1209 // according to the z-order hierarchy, yet clipping goes down the renderer hiera rchy. 1209 // according to the z-order hierarchy, yet clipping goes down the renderer hiera rchy.
1210 // Thus, a RenderLayer can be clipped by a RenderLayer that is an ancestor in th e renderer hierarchy, 1210 // Thus, a RenderLayer can be clipped by a RenderLayer that is an ancestor in th e renderer hierarchy,
1211 // but a sibling in the z-order hierarchy. 1211 // but a sibling in the z-order hierarchy.
1212 bool RenderLayerCompositor::clippedByAncestor(const RenderLayer* layer) const 1212 bool RenderLayerCompositor::clippedByNonAncestorInStackingTree(const RenderLayer * layer) const
1213 { 1213 {
1214 if (!layer->hasCompositedLayerMapping() || !layer->parent()) 1214 if (!layer->hasCompositedLayerMapping() || !layer->parent())
1215 return false; 1215 return false;
1216 1216
1217 const RenderLayer* compositingAncestor = layer->ancestorCompositingLayer(); 1217 const RenderLayer* compositingAncestor = layer->ancestorCompositingLayer();
1218 if (!compositingAncestor) 1218 if (!compositingAncestor)
1219 return false; 1219 return false;
1220 1220
1221 RenderObject* clippingContainer = layer->renderer()->clippingContainer(); 1221 RenderObject* clippingContainer = layer->renderer()->clippingContainer();
1222 if (!clippingContainer) 1222 if (!clippingContainer)
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 } else if (graphicsLayer == m_scrollLayer.get()) { 1717 } else if (graphicsLayer == m_scrollLayer.get()) {
1718 name = "LocalFrame Scrolling Layer"; 1718 name = "LocalFrame Scrolling Layer";
1719 } else { 1719 } else {
1720 ASSERT_NOT_REACHED(); 1720 ASSERT_NOT_REACHED();
1721 } 1721 }
1722 1722
1723 return name; 1723 return name;
1724 } 1724 }
1725 1725
1726 } // namespace WebCore 1726 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698