OLD | NEW |
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 ScrollRecorder_h | 5 #ifndef ScrollRecorder_h |
6 #define ScrollRecorder_h | 6 #define ScrollRecorder_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/paint/PaintPhase.h" | 9 #include "core/paint/PaintPhase.h" |
10 #include "platform/geometry/IntSize.h" | 10 #include "platform/geometry/IntSize.h" |
11 #include "platform/graphics/paint/DisplayItem.h" | 11 #include "platform/graphics/paint/DisplayItem.h" |
| 12 #include "platform/graphics/paint/PaintStash.h" |
12 #include "wtf/Allocator.h" | 13 #include "wtf/Allocator.h" |
13 | 14 |
14 namespace blink { | 15 namespace blink { |
15 | 16 |
16 class GraphicsContext; | 17 class GraphicsContext; |
17 | 18 |
18 // Emits display items which represent a region which is scrollable, so that it | 19 // Emits display items which represent a region which is scrollable, so that it |
19 // can be translated by the scroll offset. | 20 // can be translated by the scroll offset. |
20 class CORE_EXPORT ScrollRecorder { | 21 class CORE_EXPORT ScrollRecorder { |
21 USING_FAST_MALLOC(ScrollRecorder); | 22 USING_FAST_MALLOC(ScrollRecorder); |
22 | 23 |
23 public: | 24 public: |
24 ScrollRecorder(GraphicsContext&, | 25 ScrollRecorder(GraphicsContext&, |
25 const DisplayItemClient&, | |
26 DisplayItem::Type, | 26 DisplayItem::Type, |
27 const IntSize& currentOffset); | 27 const IntSize& currentOffset, |
| 28 const LayoutRect& visualRect, |
| 29 const WTF::String& debugName, |
| 30 bool paintedOutputOfObjectHasNoEffectRegardlessOfSize); |
28 ScrollRecorder(GraphicsContext&, | 31 ScrollRecorder(GraphicsContext&, |
29 const DisplayItemClient&, | |
30 PaintPhase, | 32 PaintPhase, |
31 const IntSize& currentOffset); | 33 const IntSize& currentOffset, |
| 34 const LayoutRect& visualRect, |
| 35 const WTF::String& debugName, |
| 36 bool paintedOutputOfObjectHasNoEffectRegardlessOfSize); |
32 ~ScrollRecorder(); | 37 ~ScrollRecorder(); |
33 | 38 |
34 private: | 39 private: |
35 const DisplayItemClient& m_client; | 40 PaintStash m_client; |
36 DisplayItem::Type m_beginItemType; | 41 DisplayItem::Type m_beginItemType; |
37 GraphicsContext& m_context; | 42 GraphicsContext& m_context; |
38 }; | 43 }; |
39 | 44 |
40 } // namespace blink | 45 } // namespace blink |
41 | 46 |
42 #endif // ScrollRecorder_h | 47 #endif // ScrollRecorder_h |
OLD | NEW |