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

Unified Diff: ui/gfx/image/image_skia.cc

Issue 10696130: Get rid of implicit conversion to and from ImageSkiaRep (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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.h ('k') | ui/gfx/image/image_skia_rep.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia.cc
diff --git a/ui/gfx/image/image_skia.cc b/ui/gfx/image/image_skia.cc
index 3d8acf135fb0b991938abca1660b94229af48897..9472cda8b6be4d26c4bc42e63e0a893e4536ff34 100644
--- a/ui/gfx/image/image_skia.cc
+++ b/ui/gfx/image/image_skia.cc
@@ -141,7 +141,7 @@ ImageSkia::ImageSkia(ImageSkiaSource* source, const gfx::Size& size)
}
ImageSkia::ImageSkia(const SkBitmap& bitmap) {
- Init(ImageSkiaRep(bitmap));
+ Init(ImageSkiaRep(bitmap, ui::SCALE_FACTOR_100P));
}
ImageSkia::ImageSkia(const ImageSkiaRep& image_rep) {
@@ -157,12 +157,7 @@ ImageSkia& ImageSkia::operator=(const ImageSkia& other) {
}
ImageSkia& ImageSkia::operator=(const SkBitmap& other) {
- Init(ImageSkiaRep(other));
- return *this;
-}
-
-ImageSkia& ImageSkia::operator=(const ImageSkiaRep& other) {
- Init(other);
+ Init(ImageSkiaRep(other, ui::SCALE_FACTOR_100P));
return *this;
}
@@ -173,13 +168,6 @@ ImageSkia::operator SkBitmap&() const {
return const_cast<SkBitmap&>(storage_->image_reps()[0].sk_bitmap());
}
-ImageSkia::operator ImageSkiaRep&() const {
- if (isNull())
- return NullImageRep();
-
- return storage_->image_reps()[0];
-}
-
ImageSkia::~ImageSkia() {
}
« no previous file with comments | « ui/gfx/image/image_skia.h ('k') | ui/gfx/image/image_skia_rep.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698