summaryrefslogtreecommitdiffstats
path: root/ui/gfx/image/image_skia_rep.h
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-16 20:35:51 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-16 20:35:51 +0000
commitf41c1d0944fb943048d1eb2af850d4934b5befe0 (patch)
treedadeb9a6d5cec5d1082760b76e7c10f8463d2aa6 /ui/gfx/image/image_skia_rep.h
parent89bd2690e4bdcf9aa8f2247af58567d36f20c33d (diff)
downloadchromium_src-f41c1d0944fb943048d1eb2af850d4934b5befe0.zip
chromium_src-f41c1d0944fb943048d1eb2af850d4934b5befe0.tar.gz
chromium_src-f41c1d0944fb943048d1eb2af850d4934b5befe0.tar.bz2
Add additional error handling and null checking to ImageSkiaOperations
BUG=167788 Test=None Review URL: https://chromiumcodereview.appspot.com/11910005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177210 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/image/image_skia_rep.h')
-rw-r--r--ui/gfx/image/image_skia_rep.h5
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;