Chromium Code Reviews| 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 ImagePainter_h | 5 #ifndef ImagePainter_h |
| 6 #define ImagePainter_h | 6 #define ImagePainter_h |
| 7 | 7 |
| 8 #include "wtf/Allocator.h" | 8 #include "wtf/Allocator.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class GraphicsContext; | 12 class GraphicsContext; |
| 13 struct PaintInfo; | 13 struct PaintInfo; |
| 14 class LayoutPoint; | 14 class LayoutPoint; |
| 15 class LayoutRect; | 15 class LayoutRect; |
| 16 class LayoutImage; | 16 class LayoutImage; |
| 17 | 17 |
| 18 class ImagePainter { | 18 class ImagePainter { |
| 19 STACK_ALLOCATED(); | 19 STACK_ALLOCATED(); |
| 20 public: | 20 public: |
| 21 ImagePainter(const LayoutImage& layoutImage) : m_layoutImage(layoutImage) { } | 21 ImagePainter(const LayoutImage& layoutImage) : m_layoutImage(layoutImage) { } |
| 22 | 22 |
| 23 void paint(const PaintInfo&, const LayoutPoint& paintOffset); | 23 void paint(const PaintInfo&, const LayoutPoint& paintOffset); |
| 24 void paintReplaced(const PaintInfo&, const LayoutPoint& paintOffset); | 24 void paintReplaced(const PaintInfo&, const LayoutPoint& paintOffset); |
| 25 void paintIntoRect(GraphicsContext&, const LayoutRect&); | 25 |
| 26 // Paint the full image into the dest, after clipping by the content rect. | |
|
chrishtr
2016/07/11 18:11:24
"into |destRect|, after clipping by |contentRect|"
pdr.
2016/07/11 19:58:17
Done.
| |
| 27 void paintIntoRect(GraphicsContext&, const LayoutRect& destRect, const Layou tRect& contentRect); | |
| 26 | 28 |
| 27 private: | 29 private: |
| 28 void paintAreaElementFocusRing(const PaintInfo&, const LayoutPoint& paintOff set); | 30 void paintAreaElementFocusRing(const PaintInfo&, const LayoutPoint& paintOff set); |
| 29 | 31 |
| 30 const LayoutImage& m_layoutImage; | 32 const LayoutImage& m_layoutImage; |
| 31 }; | 33 }; |
| 32 | 34 |
| 33 } // namespace blink | 35 } // namespace blink |
| 34 | 36 |
| 35 #endif // ImagePainter_h | 37 #endif // ImagePainter_h |
| OLD | NEW |