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

Side by Side Diff: Source/core/paint/ScrollRecorder.h

Issue 1144203004: Allow certain SP recorder classes to defer their "begin" operation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/paint/ScopeRecorder.cpp ('k') | Source/core/paint/ScrollRecorder.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 // 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/heap/GarbageCollected.h"
12 #include "wtf/FastAllocBase.h" 13 #include "wtf/FastAllocBase.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 WTF_MAKE_FAST_ALLOCATED(ScrollRecorder); 22 WTF_MAKE_FAST_ALLOCATED(ScrollRecorder);
22 public: 23 public:
24 ScrollRecorder(GraphicsContext&, const DisplayItemClientWrapper&, PaintPhase );
23 ScrollRecorder(GraphicsContext&, const DisplayItemClientWrapper&, PaintPhase , const IntSize& currentOffset); 25 ScrollRecorder(GraphicsContext&, const DisplayItemClientWrapper&, PaintPhase , const IntSize& currentOffset);
24 ~ScrollRecorder(); 26 ~ScrollRecorder();
27 void begin(const IntSize& currentOffset);
25 private: 28 private:
26 DisplayItemClientWrapper m_client; 29 DisplayItemClientWrapper m_client;
27 DisplayItem::Type m_beginItemType; 30 DisplayItem::Type m_beginItemType;
28 GraphicsContext& m_context; 31 GraphicsContext& m_context;
32 bool m_engaged;
29 }; 33 };
30 34
31 } // namespace blink 35 } // namespace blink
32 36
33 #endif // ScrollRecorder_h 37 #endif // ScrollRecorder_h
OLDNEW
« no previous file with comments | « Source/core/paint/ScopeRecorder.cpp ('k') | Source/core/paint/ScrollRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698