| 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
|
|
|