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

Side by Side Diff: ui/gfx/image/image_skia.h

Issue 10834382: mac: Remove implicit conversion from ImageSkia to SkBitmap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « skia/ext/skia_utils_mac.mm ('k') | ui/gfx/image/image_skia_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_IMAGE_IMAGE_SKIA_H_ 5 #ifndef UI_GFX_IMAGE_IMAGE_SKIA_H_
6 #define UI_GFX_IMAGE_IMAGE_SKIA_H_ 6 #define UI_GFX_IMAGE_IMAGE_SKIA_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // Copies a reference to |other|'s storage. 53 // Copies a reference to |other|'s storage.
54 ImageSkia& operator=(const ImageSkia& other); 54 ImageSkia& operator=(const ImageSkia& other);
55 55
56 // Converts from SkBitmap. 56 // Converts from SkBitmap.
57 // Adds ref to passed in bitmap. 57 // Adds ref to passed in bitmap.
58 // DIP width and height are set based on scale factor of 1x. 58 // DIP width and height are set based on scale factor of 1x.
59 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is 59 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is
60 // done. 60 // done.
61 ImageSkia& operator=(const SkBitmap& other); 61 ImageSkia& operator=(const SkBitmap& other);
62 62
63 #if defined(OS_MACOSX) || defined(OS_WIN) 63 #if defined(OS_WIN)
64 // Converts to gfx::ImageSkiaRep and SkBitmap. 64 // Converts to gfx::ImageSkiaRep and SkBitmap.
65 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is 65 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is
66 // done. 66 // done.
67 operator SkBitmap&() const { return GetBitmap(); } 67 operator SkBitmap&() const { return GetBitmap(); }
68 #endif 68 #endif
69 69
70 ~ImageSkia(); 70 ~ImageSkia();
71 71
72 // Returns true if this object is backed by the same ImageSkiaStorage as 72 // Returns true if this object is backed by the same ImageSkiaStorage as
73 // |other|. Will also return true if both images are isNull(). 73 // |other|. Will also return true if both images are isNull().
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 SkBitmap& GetBitmap() const; 136 SkBitmap& GetBitmap() const;
137 137
138 // A refptr so that ImageRepSkia can be copied cheaply. 138 // A refptr so that ImageRepSkia can be copied cheaply.
139 scoped_refptr<internal::ImageSkiaStorage> storage_; 139 scoped_refptr<internal::ImageSkiaStorage> storage_;
140 }; 140 };
141 141
142 } // namespace gfx 142 } // namespace gfx
143 143
144 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_ 144 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_
OLDNEW
« no previous file with comments | « skia/ext/skia_utils_mac.mm ('k') | ui/gfx/image/image_skia_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698