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

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

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 | « trunk/src/ui/gfx/image/image_skia_operations.cc ('k') | trunk/src/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: trunk/src/ui/gfx/image/image_skia_rep.h
===================================================================
--- trunk/src/ui/gfx/image/image_skia_rep.h (revision 224498)
+++ trunk/src/ui/gfx/image/image_skia_rep.h (working copy)
@@ -6,6 +6,7 @@
#define UI_GFX_IMAGE_IMAGE_SKIA_REP_H_
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/layout.h"
#include "ui/gfx/gfx_export.h"
#include "ui/gfx/size.h"
@@ -20,11 +21,11 @@
// Creates a bitmap with kARGB_8888_Config config with given |size| in DIP.
// This allocates pixels in the bitmap.
- ImageSkiaRep(const gfx::Size& size, float scale);
+ ImageSkiaRep(const gfx::Size& size, ui::ScaleFactor scale_factor);
- // Creates a bitmap with given scale.
+ // Creates a bitmap with given scale factor.
// Adds ref to |src|.
- ImageSkiaRep(const SkBitmap& src, float scale);
+ ImageSkiaRep(const SkBitmap& src, ui::ScaleFactor scale_factor);
// Returns true if the backing bitmap is null.
bool is_null() const { return bitmap_.isNull(); }
@@ -41,7 +42,8 @@
}
// Retrieves the scale that the bitmap will be painted at.
- float scale() const { return scale_; }
+ float GetScale() const;
+ ui::ScaleFactor scale_factor() const { return scale_factor_; }
// Returns backing bitmap.
const SkBitmap& sk_bitmap() const { return bitmap_; }
@@ -51,7 +53,7 @@
SkBitmap& mutable_sk_bitmap() { return bitmap_; }
SkBitmap bitmap_;
- float scale_;
+ ui::ScaleFactor scale_factor_;
};
} // namespace gfx
« no previous file with comments | « trunk/src/ui/gfx/image/image_skia_operations.cc ('k') | trunk/src/ui/gfx/image/image_skia_rep.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698