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

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

Issue 264013002: Allow layers that need squashing to draw into the squashing layer in some cases. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adjust. 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
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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 return const_cast<RenderLayer*>(this); 1127 return const_cast<RenderLayer*>(this);
1128 1128
1129 for (const RenderLayer* curr = compositingContainer(); curr; curr = curr->co mpositingContainer()) { 1129 for (const RenderLayer* curr = compositingContainer(); curr; curr = curr->co mpositingContainer()) {
1130 if (curr->compositingState() != NotComposited && curr->compositingState( ) != PaintsIntoGroupedBacking) 1130 if (curr->compositingState() != NotComposited && curr->compositingState( ) != PaintsIntoGroupedBacking)
1131 return const_cast<RenderLayer*>(curr); 1131 return const_cast<RenderLayer*>(curr);
1132 } 1132 }
1133 1133
1134 return 0; 1134 return 0;
1135 } 1135 }
1136 1136
1137 RenderLayer* RenderLayer::containingGroupedLayer() const
1138 {
1139 ASSERT(isAllowedToQueryCompositingState());
1140
1141 for (const RenderLayer* curr = this; curr; curr = curr->parent()) {
abarth-chromium 2014/05/05 21:37:40 Is this the right parent chain to walk? I would h
chrishtr 2014/05/05 21:58:51 Right this is I think the issue with this CL.
1142 switch (curr->compositingState()) {
1143 case NotComposited:
1144 continue;
1145 case PaintsIntoGroupedBacking:
1146 return const_cast<RenderLayer*>(curr);
1147 break;
1148 default:
1149 return 0;
1150 break;
1151 }
1152 }
1153
1154 return 0;
1155 }
1156
1137 RenderLayer* RenderLayer::enclosingCompositingLayerForRepaint(IncludeSelfOrNot i ncludeSelf) const 1157 RenderLayer* RenderLayer::enclosingCompositingLayerForRepaint(IncludeSelfOrNot i ncludeSelf) const
1138 { 1158 {
1139 ASSERT(isAllowedToQueryCompositingState()); 1159 ASSERT(isAllowedToQueryCompositingState());
1140 1160
1141 if ((includeSelf == IncludeSelf) && (compositingState() == PaintsIntoOwnBack ing || compositingState() == PaintsIntoGroupedBacking)) 1161 if ((includeSelf == IncludeSelf) && (compositingState() == PaintsIntoOwnBack ing || compositingState() == PaintsIntoGroupedBacking))
1142 return const_cast<RenderLayer*>(this); 1162 return const_cast<RenderLayer*>(this);
1143 1163
1144 for (const RenderLayer* curr = compositingContainer(); curr; curr = curr->co mpositingContainer()) { 1164 for (const RenderLayer* curr = compositingContainer(); curr; curr = curr->co mpositingContainer()) {
1145 if (curr->compositingState() == PaintsIntoOwnBacking || curr->compositin gState() == PaintsIntoGroupedBacking) 1165 if (curr->compositingState() == PaintsIntoOwnBacking || curr->compositin gState() == PaintsIntoGroupedBacking)
1146 return const_cast<RenderLayer*>(curr); 1166 return const_cast<RenderLayer*>(curr);
(...skipping 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after
4021 } 4041 }
4022 } 4042 }
4023 4043
4024 void showLayerTree(const WebCore::RenderObject* renderer) 4044 void showLayerTree(const WebCore::RenderObject* renderer)
4025 { 4045 {
4026 if (!renderer) 4046 if (!renderer)
4027 return; 4047 return;
4028 showLayerTree(renderer->enclosingLayer()); 4048 showLayerTree(renderer->enclosingLayer());
4029 } 4049 }
4030 #endif 4050 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/compositing/CompositedLayerMappingPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698