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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerClipper.h

Issue 1452313004: Don't use cached subsequence when clip changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 LayoutRect localClipRect(const PaintLayer* ancestorLayer) const; 160 LayoutRect localClipRect(const PaintLayer* ancestorLayer) const;
161 161
162 ClipRect backgroundClipRect(const ClipRectsContext&) const; 162 ClipRect backgroundClipRect(const ClipRectsContext&) const;
163 163
164 // This method figures out our layerBounds in coordinates relative to 164 // This method figures out our layerBounds in coordinates relative to
165 // |rootLayer|. It also computes our background and foreground clip rects 165 // |rootLayer|. It also computes our background and foreground clip rects
166 // for painting/event handling. 166 // for painting/event handling.
167 // Pass offsetFromRoot if known. 167 // Pass offsetFromRoot if known.
168 void calculateRects(const ClipRectsContext&, const LayoutRect& paintDirtyRec t, LayoutRect& layerBounds, 168 void calculateRects(const ClipRectsContext&, const LayoutRect& paintDirtyRec t, LayoutRect& layerBounds,
169 ClipRect& backgroundRect, ClipRect& foregroundRect, const LayoutPoint* o ffsetFromRoot = 0) const; 169 ClipRect& backgroundRect, ClipRect& foregroundRect, const LayoutPoint* o ffsetFromRoot = 0) const;
170
171 ClipRects* paintingClipRects(const PaintLayer* rootLayer, ShouldRespectOverf lowClip, const LayoutSize& subpixelAccumulation) const;
172
170 private: 173 private:
171 ClipRects* getClipRects(const ClipRectsContext&) const; 174 ClipRects* getClipRects(const ClipRectsContext&) const;
172 175
173 void calculateClipRects(const ClipRectsContext&, ClipRects&) const; 176 void calculateClipRects(const ClipRectsContext&, ClipRects&) const;
174 ClipRects* clipRectsIfCached(const ClipRectsContext&) const; 177 ClipRects* clipRectsIfCached(const ClipRectsContext&) const;
175 ClipRects* storeClipRectsInCache(const ClipRectsContext&, ClipRects* parentC lipRects, const ClipRects&) const; 178 ClipRects* storeClipRectsInCache(const ClipRectsContext&, ClipRects* parentC lipRects, const ClipRects&) const;
176 179
177 // cachedClipRects looks buggy: It doesn't check whether context.rootLayer a nd entry.root match. 180 // cachedClipRects looks buggy: It doesn't check whether context.rootLayer a nd entry.root match.
178 // FIXME: Move callers to clipRectsIfCached, which does the proper checks. 181 // FIXME: Move callers to clipRectsIfCached, which does the proper checks.
179 ClipRects* cachedClipRects(const ClipRectsContext& context) const 182 ClipRects* cachedClipRects(const ClipRectsContext& context) const
(...skipping 14 matching lines...) Expand all
194 // FIXME: Could this be a LayoutBox? 197 // FIXME: Could this be a LayoutBox?
195 const LayoutBoxModelObject& m_layoutObject; 198 const LayoutBoxModelObject& m_layoutObject;
196 199
197 // Lazily created by 'cache() const'. 200 // Lazily created by 'cache() const'.
198 mutable OwnPtr<ClipRectsCache> m_cache; 201 mutable OwnPtr<ClipRectsCache> m_cache;
199 }; 202 };
200 203
201 } // namespace blink 204 } // namespace blink
202 205
203 #endif // LayerClipper_h 206 #endif // LayerClipper_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698