Chromium Code Reviews| Index: ui/views/controls/image_view.h |
| diff --git a/ui/views/controls/image_view.h b/ui/views/controls/image_view.h |
| index 18c4ba13241ac01afe2d2604b3e361350dd32de5..5ca63dd54bdb2458c9e59c14de8e17bf8b867fbe 100644 |
| --- a/ui/views/controls/image_view.h |
| +++ b/ui/views/controls/image_view.h |
| @@ -84,6 +84,11 @@ class VIEWS_EXPORT ImageView : public View { |
| virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; |
| private: |
| + // Returns true if |img| is the same as the last image we painted. This is |
| + // intended to be a quick check, not exhaustive. In other words it's possible |
| + // this may return false even though the images are in fact equal. |
|
pkotwicz
2013/11/15 20:57:09
Nit: "this may return false" -> "that this returns
sky
2013/11/15 22:19:13
Done.
|
| + bool IsImageEqual(const gfx::ImageSkia& img) const; |
| + |
| // Compute the image origin given the desired size and the receiver alignment |
| // properties. |
| gfx::Point ComputeImageOrigin(const gfx::Size& image_size) const; |
| @@ -109,6 +114,13 @@ class VIEWS_EXPORT ImageView : public View { |
| // A flag controlling hit test handling for interactivity. |
| bool interactive_; |
| + // Scale last painted at. |
| + float last_paint_scale_; |
| + |
| + // Address of bytes we last painted. This is used only for comparison, so its |
| + // safe to cache. |
| + void* last_painted_image_; |
|
pkotwicz
2013/11/15 20:57:09
Maybe |last_painted_bitmap_| I try to reserve the
sky
2013/11/15 22:19:13
I went with last_painted_bitmap_pixels_
|
| + |
| DISALLOW_COPY_AND_ASSIGN(ImageView); |
| }; |