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

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

Issue 10860004: image-skia: Remove implicit conversion to SkBitmap on linux and chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_unittest.cc » ('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 5050c9ad4fe7bd8261a961bfeab6704f86287b51..b2ede647ad0b52cb33016a3018f624cc88fb1a47 100644
--- a/ui/gfx/image/image_skia.cc
+++ b/ui/gfx/image/image_skia.cc
@@ -276,7 +276,18 @@ std::vector<ImageSkiaRep> ImageSkia::image_reps() const {
return image_reps;
}
-ImageSkia::operator SkBitmap&() const {
+void ImageSkia::Init(const ImageSkiaRep& image_rep) {
+ // TODO(pkotwicz): The image should be null whenever image rep is null.
+ if (image_rep.sk_bitmap().empty()) {
+ storage_ = NULL;
+ return;
+ }
+ storage_ = new internal::ImageSkiaStorage(
+ NULL, gfx::Size(image_rep.GetWidth(), image_rep.GetHeight()));
+ storage_->image_reps().push_back(image_rep);
+}
+
+SkBitmap& ImageSkia::GetBitmap() const {
if (isNull()) {
// Callers expect a ImageSkiaRep even if it is |isNull()|.
// TODO(pkotwicz): Fix this.
@@ -290,15 +301,4 @@ ImageSkia::operator SkBitmap&() const {
return NullImageRep().mutable_sk_bitmap();
}
-void ImageSkia::Init(const ImageSkiaRep& image_rep) {
- // TODO(pkotwicz): The image should be null whenever image rep is null.
- if (image_rep.sk_bitmap().empty()) {
- storage_ = NULL;
- return;
- }
- storage_ = new internal::ImageSkiaStorage(
- NULL, gfx::Size(image_rep.GetWidth(), image_rep.GetHeight()));
- storage_->image_reps().push_back(image_rep);
-}
-
} // namespace gfx
« no previous file with comments | « ui/gfx/image/image_skia.h ('k') | ui/gfx/image/image_skia_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698