| 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 ScopeRecorder_h | 5 #ifndef ScopeRecorder_h |
| 6 #define ScopeRecorder_h | 6 #define ScopeRecorder_h |
| 7 | 7 |
| 8 #include "wtf/PassOwnPtr.h" | 8 #include "wtf/PassOwnPtr.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class DisplayItemList; | 12 class DisplayItemList; |
| 13 class GraphicsContext; | 13 class GraphicsContext; |
| 14 class LayoutObject; | 14 class LayoutObject; |
| 15 | 15 |
| 16 class ScopeRecorder { | 16 class ScopeRecorder { |
| 17 public: | 17 public: |
| 18 ScopeRecorder(GraphicsContext&, const LayoutObject&); | 18 enum ShouldBegin { BeginOnConstruction, DeferBegin }; |
| 19 ScopeRecorder(GraphicsContext&, const LayoutObject&, ShouldBegin = BeginOnCo
nstruction); |
| 19 ~ScopeRecorder(); | 20 ~ScopeRecorder(); |
| 20 | 21 |
| 22 void begin(); |
| 23 |
| 21 private: | 24 private: |
| 22 DisplayItemList* m_displayItemList; | 25 DisplayItemList* m_displayItemList; |
| 23 const LayoutObject& m_object; | 26 const LayoutObject& m_object; |
| 27 bool m_engaged; |
| 24 }; | 28 }; |
| 25 | 29 |
| 26 } // namespace blink | 30 } // namespace blink |
| 27 | 31 |
| 28 #endif // ScopeRecorder_h | 32 #endif // ScopeRecorder_h |
| OLD | NEW |