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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/CullRect.h

Issue 1422493003: Change Widget subclasses to use a CullRect instead of an IntRect for painting. (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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CullRect_h
6 #define CullRect_h
7
8 #include "platform/geometry/IntRect.h"
9 #include "platform/transforms/AffineTransform.h"
10 #include "wtf/Allocator.h"
11 #include "wtf/HashMap.h"
12 #include "wtf/ListHashSet.h"
13
14 #include <limits>
15
16 namespace blink {
17
18 class FloatRect;
19 class LayoutBoxModelObject;
20 class LayoutInline;
21 class LayoutObject;
22 class LayoutRect;
23 class LayoutUnit;
24 class PaintInvalidationState;
25
26 class PLATFORM_EXPORT CullRect {
27 public:
28 explicit CullRect(const IntRect& rect) : m_rect(rect) { }
29 CullRect(const CullRect&, const IntPoint& offset);
30 CullRect(const CullRect&, const IntSize& offset);
31
32 bool intersectsCullRect(const AffineTransform&, const FloatRect& boundingBox ) const;
33 void updateCullRect(const AffineTransform& localToParentTransform);
34 bool intersectsCullRect(const IntRect&) const;
35 bool intersectsCullRect(const LayoutRect&) const;
36 bool intersectsHorizontalRange(LayoutUnit lo, LayoutUnit hi) const;
37 bool intersectsVerticalRange(LayoutUnit lo, LayoutUnit hi) const;
38
39 private:
40 IntRect m_rect;
41
42 // TODO(chrishtr): temporary while we implement CullRect everywhere.
43 friend class FramePainter;
44 friend class GridPainter;
45 friend class SVGInlineTextBoxPainter;
46 friend class ScrollbarThemeMacNonOverlayAPI;
47 friend class ReplicaPainter;
48 friend class SVGPaintContext;
49 friend class SVGRootInlineBoxPainter;
50 friend class SVGShapePainter;
51 friend class TableSectionPainter;
52 friend class ThemePainterMac;
53 friend class WebPluginContainerImpl;
54 };
55
56 } // namespace blink
57
58 #endif // CullRect_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/blink_platform.gypi ('k') | third_party/WebKit/Source/platform/graphics/paint/CullRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698