Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: ui/gfx/image/image_skia_rep.h

Issue 11910005: Add additional error handling and null checking to ImageSkiaOperations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_tests failures Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/image/image_skia_operations.cc ('k') | ui/gfx/image/image_skia_rep.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia_rep.h
diff --git a/ui/gfx/image/image_skia_rep.h b/ui/gfx/image/image_skia_rep.h
index 809ab98132419334c66892fd6094268505959359..1314215d242a59eb5443ca29167240a817498a99 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;
« no previous file with comments | « ui/gfx/image/image_skia_operations.cc ('k') | ui/gfx/image/image_skia_rep.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698