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

Side by Side Diff: third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp

Issue 2810503002: Only store previous clip rects for PaintLayers that support subsequences. (Closed)
Patch Set: none Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PrePaintTreeWalk.h" 5 #include "core/paint/PrePaintTreeWalk.h"
6 6
7 #include "core/dom/DocumentLifecycle.h" 7 #include "core/dom/DocumentLifecycle.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" 10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (!object.HasLayer()) 147 if (!object.HasLayer())
148 return; 148 return;
149 149
150 PaintLayer& paint_layer = *ToLayoutBoxModelObject(object).Layer(); 150 PaintLayer& paint_layer = *ToLayoutBoxModelObject(object).Layer();
151 if (object.StyleRef().HasTransform() || 151 if (object.StyleRef().HasTransform() ||
152 &object == 152 &object ==
153 context.paint_invalidator_context.paint_invalidation_container) { 153 context.paint_invalidator_context.paint_invalidation_container) {
154 context.ancestor_transformed_or_root_paint_layer = &paint_layer; 154 context.ancestor_transformed_or_root_paint_layer = &paint_layer;
155 } 155 }
156 156
157 // This code below checks whether any clips have changed that might:
158 // (a) invalidate optimizations made for a PaintLayer that supports
159 // subsequence caching, or
160 // (b) impact clipping of descendant visual rects.
161 if (!paint_layer.SupportsSubsequenceCaching() &&
162 !paint_layer.GetLayoutObject().HasClipRelatedProperty())
163 return;
164
157 const auto& ancestor = 165 const auto& ancestor =
158 context.ancestor_transformed_or_root_paint_layer->GetLayoutObject(); 166 context.ancestor_transformed_or_root_paint_layer->GetLayoutObject();
159 PropertyTreeState ancestor_state = *ancestor.LocalBorderBoxProperties(); 167 PropertyTreeState ancestor_state = *ancestor.LocalBorderBoxProperties();
160 168
161 #ifdef CHECK_CLIP_RECTS 169 #ifdef CHECK_CLIP_RECTS
162 ShouldRespectOverflowClipType respectOverflowClip = RespectOverflowClip; 170 ShouldRespectOverflowClipType respectOverflowClip = RespectOverflowClip;
163 #endif 171 #endif
164 if (context.ancestor_transformed_or_root_paint_layer->GetCompositingState() == 172 if (context.ancestor_transformed_or_root_paint_layer->GetCompositingState() ==
165 kPaintsIntoOwnBacking) { 173 kPaintsIntoOwnBacking) {
166 const auto* ancestor_properties = ancestor.PaintProperties(); 174 const auto* ancestor_properties = ancestor.PaintProperties();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 310 }
303 Walk(*ToFrameView(frame_view_base), context); 311 Walk(*ToFrameView(frame_view_base), context);
304 } 312 }
305 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). 313 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281).
306 } 314 }
307 315
308 object.GetMutableForPainting().ClearPaintFlags(); 316 object.GetMutableForPainting().ClearPaintFlags();
309 } 317 }
310 318
311 } // namespace blink 319 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerTest.cpp ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698