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

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

Issue 2653433002: Share GeometryMapper cache between pre-paint and compositing. (Closed)
Patch Set: none Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #ifndef PrePaintTreeWalk_h 5 #ifndef PrePaintTreeWalk_h
6 #define PrePaintTreeWalk_h 6 #define PrePaintTreeWalk_h
7 7
8 #include "core/paint/PaintInvalidator.h" 8 #include "core/paint/PaintInvalidator.h"
9 #include "core/paint/PaintPropertyTreeBuilder.h" 9 #include "core/paint/PaintPropertyTreeBuilder.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class FrameView; 13 class FrameView;
14 class GeometryMapper;
14 class LayoutObject; 15 class LayoutObject;
15 struct PrePaintTreeWalkContext; 16 struct PrePaintTreeWalkContext;
16 17
17 // This class walks the whole layout tree, beginning from the root FrameView, 18 // This class walks the whole layout tree, beginning from the root FrameView,
18 // across frame boundaries. Helper classes are called for each tree node to 19 // across frame boundaries. Helper classes are called for each tree node to
19 // perform actual actions. It expects to be invoked in InPrePaint phase. 20 // perform actual actions. It expects to be invoked in InPrePaint phase.
20 class PrePaintTreeWalk { 21 class PrePaintTreeWalk {
21 public: 22 public:
23 PrePaintTreeWalk(GeometryMapper& geometryMapper)
24 : m_paintInvalidator(geometryMapper) {}
22 void walk(FrameView& rootFrame); 25 void walk(FrameView& rootFrame);
23 26
24 private: 27 private:
25 // Throttled rendering (see: FrameView::shouldThrottleRendering()) can prevent 28 // Throttled rendering (see: FrameView::shouldThrottleRendering()) can prevent
26 // updating a subtree. We return true if the subtree was fully walked/updated, 29 // updating a subtree. We return true if the subtree was fully walked/updated,
27 // and false if the walk was interrupted by throttling. 30 // and false if the walk was interrupted by throttling.
28 bool walk(FrameView&, const PrePaintTreeWalkContext&); 31 bool walk(FrameView&, const PrePaintTreeWalkContext&);
29 bool walk(const LayoutObject&, const PrePaintTreeWalkContext&); 32 bool walk(const LayoutObject&, const PrePaintTreeWalkContext&);
30 33
31 PaintPropertyTreeBuilder m_propertyTreeBuilder; 34 PaintPropertyTreeBuilder m_propertyTreeBuilder;
32 PaintInvalidator m_paintInvalidator; 35 PaintInvalidator m_paintInvalidator;
33 }; 36 };
34 37
35 } // namespace blink 38 } // namespace blink
36 39
37 #endif // PrePaintTreeWalk_h 40 #endif // PrePaintTreeWalk_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698