| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ReplacedPainter_h | 5 #ifndef ReplacedPainter_h |
| 6 #define ReplacedPainter_h | 6 #define ReplacedPainter_h |
| 7 | 7 |
| 8 #include "wtf/Allocator.h" | 8 #include "platform/wtf/Allocator.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 struct PaintInfo; | 12 struct PaintInfo; |
| 13 class LayoutPoint; | 13 class LayoutPoint; |
| 14 class LayoutReplaced; | 14 class LayoutReplaced; |
| 15 | 15 |
| 16 class ReplacedPainter { | 16 class ReplacedPainter { |
| 17 STACK_ALLOCATED(); | 17 STACK_ALLOCATED(); |
| 18 | 18 |
| 19 public: | 19 public: |
| 20 ReplacedPainter(const LayoutReplaced& layout_replaced) | 20 ReplacedPainter(const LayoutReplaced& layout_replaced) |
| 21 : layout_replaced_(layout_replaced) {} | 21 : layout_replaced_(layout_replaced) {} |
| 22 | 22 |
| 23 void Paint(const PaintInfo&, const LayoutPoint&); | 23 void Paint(const PaintInfo&, const LayoutPoint&); |
| 24 | 24 |
| 25 // The adjustedPaintOffset should include the location (offset) of the object | 25 // The adjustedPaintOffset should include the location (offset) of the object |
| 26 // itself. | 26 // itself. |
| 27 bool ShouldPaint(const PaintInfo&, | 27 bool ShouldPaint(const PaintInfo&, |
| 28 const LayoutPoint& adjusted_paint_offset) const; | 28 const LayoutPoint& adjusted_paint_offset) const; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 const LayoutReplaced& layout_replaced_; | 31 const LayoutReplaced& layout_replaced_; |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace blink | 34 } // namespace blink |
| 35 | 35 |
| 36 #endif // ReplacedPainter_h | 36 #endif // ReplacedPainter_h |
| OLD | NEW |