diff options
Diffstat (limited to 'ui/gfx/image/image_skia_rep.h')
-rw-r--r-- | ui/gfx/image/image_skia_rep.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/gfx/image/image_skia_rep.h b/ui/gfx/image/image_skia_rep.h index 809ab98..1314215 100644 --- a/ui/gfx/image/image_skia_rep.h +++ b/ui/gfx/image/image_skia_rep.h @@ -8,9 +8,9 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/layout.h" #include "ui/base/ui_export.h" +#include "ui/gfx/size.h" namespace gfx { -class Size; // An ImageSkiaRep represents a bitmap and the scale factor it is intended for. class UI_EXPORT ImageSkiaRep { @@ -37,6 +37,9 @@ class UI_EXPORT ImageSkiaRep { // Get width and height of bitmap in pixels. int pixel_width() const { return bitmap_.width(); } int pixel_height() const { return bitmap_.height(); } + Size pixel_size() const { + return Size(pixel_width(), pixel_height()); + } // Retrieves the scale that the bitmap will be painted at. float GetScale() const; |