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

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

Issue 233063004: Suppress layer creation for descendants of GPU-rasterized layers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move assert disabler in ~CompositedLayerMapping Created 6 years, 8 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
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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 { 798 {
799 TRACE_EVENT0("blink_rendering", "RenderLayer::updateScrollingStateAfterCompo sitingChange"); 799 TRACE_EVENT0("blink_rendering", "RenderLayer::updateScrollingStateAfterCompo sitingChange");
800 m_hasVisibleNonLayerContent = false; 800 m_hasVisibleNonLayerContent = false;
801 for (RenderObject* r = renderer()->firstChild(); r; r = r->nextSibling()) { 801 for (RenderObject* r = renderer()->firstChild(); r; r = r->nextSibling()) {
802 if (!r->hasLayer()) { 802 if (!r->hasLayer()) {
803 m_hasVisibleNonLayerContent = true; 803 m_hasVisibleNonLayerContent = true;
804 break; 804 break;
805 } 805 }
806 } 806 }
807 807
808 m_compositingProperties.hasNonCompositedChild = false; 808 compositingProperties().hasNonCompositedChild = false;
809 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) { 809 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
810 if (child->compositingState() == NotComposited) { 810 if (child->compositingState() == NotComposited) {
811 m_compositingProperties.hasNonCompositedChild = true; 811 compositingProperties().hasNonCompositedChild = true;
812 return; 812 return;
813 } 813 }
814 } 814 }
815 } 815 }
816 816
817 static bool subtreeContainsOutOfFlowPositionedLayer(const RenderLayer* subtreeRo ot) 817 static bool subtreeContainsOutOfFlowPositionedLayer(const RenderLayer* subtreeRo ot)
818 { 818 {
819 return (subtreeRoot->renderer() && subtreeRoot->renderer()->isOutOfFlowPosit ioned()) || subtreeRoot->hasOutOfFlowPositionedDescendant(); 819 return (subtreeRoot->renderer() && subtreeRoot->renderer()->isOutOfFlowPosit ioned()) || subtreeRoot->hasOutOfFlowPositionedDescendant();
820 } 820 }
821 821
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 1196
1197 void RenderLayer::clearChildNeedsToUpdateAncestorDependantProperties() 1197 void RenderLayer::clearChildNeedsToUpdateAncestorDependantProperties()
1198 { 1198 {
1199 ASSERT(!m_needsToUpdateAncestorDependentProperties); 1199 ASSERT(!m_needsToUpdateAncestorDependentProperties);
1200 m_childNeedsToUpdateAncestorDependantProperties = false; 1200 m_childNeedsToUpdateAncestorDependantProperties = false;
1201 } 1201 }
1202 1202
1203 void RenderLayer::setCompositingReasons(CompositingReasons reasons, CompositingR easons mask) 1203 void RenderLayer::setCompositingReasons(CompositingReasons reasons, CompositingR easons mask)
1204 { 1204 {
1205 ASSERT(reasons == (reasons & mask)); 1205 ASSERT(reasons == (reasons & mask));
1206 if ((m_compositingProperties.compositingReasons & mask) == (reasons & mask)) 1206 if ((compositingProperties().compositingReasons & mask) == (reasons & mask))
1207 return; 1207 return;
1208 m_compositingProperties.compositingReasons = (reasons & mask) | (m_compositi ngProperties.compositingReasons & ~mask); 1208 compositingProperties().compositingReasons = (reasons & mask) | (compositing Properties().compositingReasons & ~mask);
1209 m_clipper.setCompositingClipRectsDirty(); 1209 m_clipper.setCompositingClipRectsDirty();
1210 } 1210 }
1211 1211
1212 bool RenderLayer::hasAncestorWithFilterOutsets() const 1212 bool RenderLayer::hasAncestorWithFilterOutsets() const
1213 { 1213 {
1214 for (const RenderLayer* curr = this; curr; curr = curr->parent()) { 1214 for (const RenderLayer* curr = this; curr; curr = curr->parent()) {
1215 RenderLayerModelObject* renderer = curr->renderer(); 1215 RenderLayerModelObject* renderer = curr->renderer();
1216 if (renderer->style()->hasFilterOutsets()) 1216 if (renderer->style()->hasFilterOutsets())
1217 return true; 1217 return true;
1218 } 1218 }
(...skipping 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after
4045 } 4045 }
4046 } 4046 }
4047 4047
4048 void showLayerTree(const WebCore::RenderObject* renderer) 4048 void showLayerTree(const WebCore::RenderObject* renderer)
4049 { 4049 {
4050 if (!renderer) 4050 if (!renderer)
4051 return; 4051 return;
4052 showLayerTree(renderer->enclosingLayer()); 4052 showLayerTree(renderer->enclosingLayer());
4053 } 4053 }
4054 #endif 4054 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698