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

Side by Side Diff: sky/engine/core/rendering/RenderView.h

Issue 823123003: Delete PaintInvalidationState. It's unused. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: proper diff Created 5 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 | « sky/engine/core/rendering/RenderObject.cpp ('k') | sky/engine/core/rendering/RenderView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #ifndef SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_ 22 #ifndef SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_
23 #define SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_ 23 #define SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_
24 24
25 #include "sky/engine/core/frame/FrameView.h" 25 #include "sky/engine/core/frame/FrameView.h"
26 #include "sky/engine/core/rendering/LayoutState.h" 26 #include "sky/engine/core/rendering/LayoutState.h"
27 #include "sky/engine/core/rendering/PaintInvalidationState.h"
28 #include "sky/engine/core/rendering/RenderBlockFlow.h" 27 #include "sky/engine/core/rendering/RenderBlockFlow.h"
29 #include "sky/engine/core/rendering/RenderIFrame.h" 28 #include "sky/engine/core/rendering/RenderIFrame.h"
30 #include "sky/engine/platform/scroll/ScrollableArea.h" 29 #include "sky/engine/platform/scroll/ScrollableArea.h"
31 #include "sky/engine/wtf/OwnPtr.h" 30 #include "sky/engine/wtf/OwnPtr.h"
32 31
33 namespace blink { 32 namespace blink {
34 33
35 // The root of the render tree, corresponding to the CSS initial containing bloc k. 34 // The root of the render tree, corresponding to the CSS initial containing bloc k.
36 // It's dimensions match that of the logical viewport (which may be different fr om 35 // It's dimensions match that of the logical viewport (which may be different fr om
37 // the visible viewport in fixed-layout mode), and it is always at position (0,0 ) 36 // the visible viewport in fixed-layout mode), and it is always at position (0,0 )
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 double layoutViewportHeight() const; 106 double layoutViewportHeight() const;
108 107
109 void pushLayoutState(LayoutState&); 108 void pushLayoutState(LayoutState&);
110 void popLayoutState(); 109 void popLayoutState();
111 110
112 void addIFrame(RenderIFrame* iframe); 111 void addIFrame(RenderIFrame* iframe);
113 void removeIFrame(RenderIFrame* iframe); 112 void removeIFrame(RenderIFrame* iframe);
114 void updateIFramesAfterLayout(); 113 void updateIFramesAfterLayout();
115 114
116 private: 115 private:
117 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, const PaintInvalidationState* = 0) const override; 116 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const override;
118 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override; 117 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override;
119 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override; 118 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override;
120 119
121 bool shouldInvalidatePaint(const LayoutRect&) const; 120 bool shouldInvalidatePaint(const LayoutRect&) const;
122 121
123 void layoutContent(); 122 void layoutContent();
124 #if ENABLE(ASSERT) 123 #if ENABLE(ASSERT)
125 void checkLayoutState(); 124 void checkLayoutState();
126 #endif 125 #endif
127 126
128 void positionDialog(RenderBox*); 127 void positionDialog(RenderBox*);
129 void positionDialogs(); 128 void positionDialogs();
130 129
131 friend class ForceHorriblySlowRectMapping;
132
133 RenderObject* backgroundRenderer() const; 130 RenderObject* backgroundRenderer() const;
134 131
135 FrameView* m_frameView; 132 FrameView* m_frameView;
136 133
137 RawPtr<RenderObject> m_selectionStart; 134 RawPtr<RenderObject> m_selectionStart;
138 RawPtr<RenderObject> m_selectionEnd; 135 RawPtr<RenderObject> m_selectionEnd;
139 136
140 int m_selectionStartPos; 137 int m_selectionStartPos;
141 int m_selectionEndPos; 138 int m_selectionEndPos;
142 139
143 LayoutState* m_layoutState; 140 LayoutState* m_layoutState;
144 141
145 unsigned m_renderCounterCount; 142 unsigned m_renderCounterCount;
146 143
147 unsigned m_hitTestCount; 144 unsigned m_hitTestCount;
148 145
149 WTF::HashSet<RenderIFrame*> m_iframes; 146 WTF::HashSet<RenderIFrame*> m_iframes;
150 }; 147 };
151 148
152 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); 149 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView());
153 150
154 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms
155 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the render
156 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item
157 // moves its list marker around). Note that even when disabled, LayoutState is s till used to
158 // store layoutDelta.
159 class ForceHorriblySlowRectMapping {
160 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping);
161 public:
162 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation State)
163 : m_paintInvalidationState(paintInvalidationState)
164 , m_didDisable(m_paintInvalidationState && m_paintInvalidationState->cac hedOffsetsEnabled())
165 {
166 if (m_paintInvalidationState)
167 m_paintInvalidationState->m_cachedOffsetsEnabled = false;
168 }
169
170 ~ForceHorriblySlowRectMapping()
171 {
172 if (m_didDisable)
173 m_paintInvalidationState->m_cachedOffsetsEnabled = true;
174 }
175 private:
176 const PaintInvalidationState* m_paintInvalidationState;
177 bool m_didDisable;
178 };
179
180 } // namespace blink 151 } // namespace blink
181 152
182 #endif // SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_ 153 #endif // SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.cpp ('k') | sky/engine/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698