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

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

Issue 10880063: image: Remove operator for converting from SkBitmap to ImageSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/image/image_skia.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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 ImageSkia(const SkBitmap& bitmap); 46 ImageSkia(const SkBitmap& bitmap);
47 47
48 ImageSkia(const gfx::ImageSkiaRep& image_rep); 48 ImageSkia(const gfx::ImageSkiaRep& image_rep);
49 49
50 // Copies a reference to |other|'s storage. 50 // Copies a reference to |other|'s storage.
51 ImageSkia(const ImageSkia& other); 51 ImageSkia(const ImageSkia& other);
52 52
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.
57 // Adds ref to passed in bitmap.
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
60 // done.
61 ImageSkia& operator=(const SkBitmap& other);
62
63 #if defined(OS_WIN) 56 #if defined(OS_WIN)
64 // Converts to gfx::ImageSkiaRep and SkBitmap. 57 // Converts to gfx::ImageSkiaRep and SkBitmap.
65 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is 58 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is
66 // done. 59 // done.
67 operator SkBitmap&() const { return GetBitmap(); } 60 operator SkBitmap&() const { return GetBitmap(); }
68 #endif 61 #endif
69 62
70 ~ImageSkia(); 63 ~ImageSkia();
71 64
72 // Returns true if this object is backed by the same ImageSkiaStorage as 65 // Returns true if this object is backed by the same ImageSkiaStorage as
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 120
128 SkBitmap& GetBitmap() const; 121 SkBitmap& GetBitmap() const;
129 122
130 // A refptr so that ImageRepSkia can be copied cheaply. 123 // A refptr so that ImageRepSkia can be copied cheaply.
131 scoped_refptr<internal::ImageSkiaStorage> storage_; 124 scoped_refptr<internal::ImageSkiaStorage> storage_;
132 }; 125 };
133 126
134 } // namespace gfx 127 } // namespace gfx
135 128
136 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_ 129 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/image/image_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698