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

Side by Side Diff: Source/core/rendering/PaintInvalidationState.h

Issue 379073002: Revert of Divorce PaintInvalidationState from LayoutState (https://codereview.chromium.org/36083300… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Correct revert order Created 6 years, 5 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
« no previous file with comments | « Source/core/rendering/LayoutState.cpp ('k') | Source/core/rendering/PaintInvalidationState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PaintInvalidationState_h
6 #define PaintInvalidationState_h
7
8 #include "platform/geometry/LayoutRect.h"
9 #include "wtf/Noncopyable.h"
10
11 namespace WebCore {
12
13 class RenderBox;
14 class RenderInline;
15 class RenderLayerModelObject;
16 class RenderObject;
17 class RenderSVGModelObject;
18
19 class PaintInvalidationState {
20 WTF_MAKE_NONCOPYABLE(PaintInvalidationState);
21 public:
22 PaintInvalidationState(const PaintInvalidationState& next, RenderInline& ren derer, const RenderLayerModelObject& paintInvalidationContainer);
23 PaintInvalidationState(const PaintInvalidationState& next, RenderBox& render er, const RenderLayerModelObject& paintInvalidationContainer);
24 PaintInvalidationState(const PaintInvalidationState& next, RenderSVGModelObj ect& renderer, const RenderLayerModelObject& paintInvalidationContainer);
25
26 explicit PaintInvalidationState(RenderObject&);
27
28 const LayoutRect& clipRect() const { return m_clipRect; }
29 const LayoutSize& paintOffset() const { return m_paintOffset; }
30
31 bool cachedOffsetsEnabled() const { return m_cachedOffsetsEnabled; }
32 bool isClipped() const { return m_clipped; }
33
34 const RenderLayerModelObject& paintInvalidationContainer() const { return m_ paintInvalidationContainer; }
35 RenderObject& renderer() const { return m_renderer; }
36
37 bool canMapToContainer(const RenderLayerModelObject* container) const
38 {
39 return m_cachedOffsetsEnabled && container == &m_paintInvalidationContai ner;
40 }
41 private:
42 void applyClipIfNeeded(const RenderObject&);
43
44 friend class ForceHorriblySlowRectMapping;
45
46 bool m_clipped;
47 mutable bool m_cachedOffsetsEnabled;
48
49 LayoutRect m_clipRect;
50
51 // x/y offset from paint invalidation container. Includes relative positioni ng and scroll offsets.
52 LayoutSize m_paintOffset;
53
54 const RenderLayerModelObject& m_paintInvalidationContainer;
55
56 RenderObject& m_renderer;
57 };
58
59 } // namespace WebCore
60
61 #endif // PaintInvalidationState_h
OLDNEW
« no previous file with comments | « Source/core/rendering/LayoutState.cpp ('k') | Source/core/rendering/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698