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

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

Issue 1640843003: Make PaintLayerClipper objects transient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PaintLayerRareData
Patch Set: Inline PaintLayerClipper ctor Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp ('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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/PaintLayerPainter.h" 5 #include "core/paint/PaintLayerPainter.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/layout/ClipPathOperation.h" 9 #include "core/layout/ClipPathOperation.h"
10 #include "core/layout/LayoutBlock.h" 10 #include "core/layout/LayoutBlock.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 static bool shouldRepaintSubsequence(PaintLayer& paintLayer, const PaintLayerPai ntingInfo& paintingInfo, ShouldRespectOverflowClip respectOverflowClip, const La youtSize& subpixelAccumulation) 217 static bool shouldRepaintSubsequence(PaintLayer& paintLayer, const PaintLayerPai ntingInfo& paintingInfo, ShouldRespectOverflowClip respectOverflowClip, const La youtSize& subpixelAccumulation)
218 { 218 {
219 bool needsRepaint = false; 219 bool needsRepaint = false;
220 220
221 // Repaint subsequence if the layer is marked for needing repaint. 221 // Repaint subsequence if the layer is marked for needing repaint.
222 if (paintLayer.needsRepaint()) 222 if (paintLayer.needsRepaint())
223 needsRepaint = true; 223 needsRepaint = true;
224 224
225 // Repaint if layer's clip changes. 225 // Repaint if layer's clip changes.
226 ClipRects* clipRects = paintLayer.clipper().paintingClipRects(paintingInfo.r ootLayer, respectOverflowClip, subpixelAccumulation); 226 ClipRects& clipRects = paintLayer.clipper().paintingClipRects(paintingInfo.r ootLayer, respectOverflowClip, subpixelAccumulation);
227 ClipRects* previousClipRects = paintLayer.previousPaintingClipRects(); 227 ClipRects* previousClipRects = paintLayer.previousPaintingClipRects();
228 if (!needsRepaint && clipRects != previousClipRects && (!clipRects || !previ ousClipRects || *clipRects != *previousClipRects)) 228 if (!needsRepaint && &clipRects != previousClipRects && (!previousClipRects || clipRects != *previousClipRects))
229 needsRepaint = true; 229 needsRepaint = true;
230 paintLayer.setPreviousPaintingClipRects(clipRects); 230 paintLayer.setPreviousPaintingClipRects(clipRects);
231 231
232 // Repaint if previously the layer might be clipped by paintDirtyRect and pa intDirtyRect changes. 232 // Repaint if previously the layer might be clipped by paintDirtyRect and pa intDirtyRect changes.
233 if (!needsRepaint && paintLayer.previousPaintResult() == PaintLayerPainter:: MayBeClippedByPaintDirtyRect && paintLayer.previousPaintDirtyRect() != paintingI nfo.paintDirtyRect) 233 if (!needsRepaint && paintLayer.previousPaintResult() == PaintLayerPainter:: MayBeClippedByPaintDirtyRect && paintLayer.previousPaintDirtyRect() != paintingI nfo.paintDirtyRect)
234 needsRepaint = true; 234 needsRepaint = true;
235 paintLayer.setPreviousPaintDirtyRect(paintingInfo.paintDirtyRect); 235 paintLayer.setPreviousPaintDirtyRect(paintingInfo.paintDirtyRect);
236 236
237 // Repaint if scroll offset accumulation changes. 237 // Repaint if scroll offset accumulation changes.
238 if (!needsRepaint && paintingInfo.scrollOffsetAccumulation != paintLayer.pre viousScrollOffsetAccumulationForPainting()) 238 if (!needsRepaint && paintingInfo.scrollOffsetAccumulation != paintLayer.pre viousScrollOffsetAccumulationForPainting())
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 if (!m_paintLayer.containsDirtyOverlayScrollbars()) 736 if (!m_paintLayer.containsDirtyOverlayScrollbars())
737 return; 737 return;
738 738
739 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe ct(damageRect)), paintFlags, LayoutSize()); 739 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe ct(damageRect)), paintFlags, LayoutSize());
740 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 740 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
741 741
742 m_paintLayer.setContainsDirtyOverlayScrollbars(false); 742 m_paintLayer.setContainsDirtyOverlayScrollbars(false);
743 } 743 }
744 744
745 } // namespace blink 745 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698