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

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

Issue 10824296: Enables HiDPI favicon to be displayed in tab strip on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 | « chrome/browser/ui/views/tabs/tab_renderer_data.cc ('k') | 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // done. 60 // done.
61 ImageSkia& operator=(const SkBitmap& other); 61 ImageSkia& operator=(const SkBitmap& other);
62 62
63 // Converts to gfx::ImageSkiaRep and SkBitmap. 63 // Converts to gfx::ImageSkiaRep and SkBitmap.
64 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is 64 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is
65 // done. 65 // done.
66 operator SkBitmap&() const; 66 operator SkBitmap&() const;
67 67
68 ~ImageSkia(); 68 ~ImageSkia();
69 69
70 // Returns true if this object is backed by the same ImageSkiaStorage as
71 // |other|. Will also return true if both images are isNull().
72 bool BackedBySameObjectAs(const gfx::ImageSkia& other) const;
73
70 // Adds |image_rep| to the image reps contained by this object. 74 // Adds |image_rep| to the image reps contained by this object.
71 void AddRepresentation(const gfx::ImageSkiaRep& image_rep); 75 void AddRepresentation(const gfx::ImageSkiaRep& image_rep);
72 76
73 // Removes the image rep of |scale_factor| if present. 77 // Removes the image rep of |scale_factor| if present.
74 void RemoveRepresentation(ui::ScaleFactor scale_factor); 78 void RemoveRepresentation(ui::ScaleFactor scale_factor);
75 79
76 // Returns true if the object owns an image rep whose density matches 80 // Returns true if the object owns an image rep whose density matches
77 // |scale_factor| exactly. 81 // |scale_factor| exactly.
78 bool HasRepresentation(ui::ScaleFactor scale_factor) const; 82 bool HasRepresentation(ui::ScaleFactor scale_factor) const;
79 83
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // If the image rep's bitmap is empty, ImageStorage is set to NULL. 131 // If the image rep's bitmap is empty, ImageStorage is set to NULL.
128 void Init(const gfx::ImageSkiaRep& image_rep); 132 void Init(const gfx::ImageSkiaRep& image_rep);
129 133
130 // A refptr so that ImageRepSkia can be copied cheaply. 134 // A refptr so that ImageRepSkia can be copied cheaply.
131 scoped_refptr<internal::ImageSkiaStorage> storage_; 135 scoped_refptr<internal::ImageSkiaStorage> storage_;
132 }; 136 };
133 137
134 } // namespace gfx 138 } // namespace gfx
135 139
136 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_ 140 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_renderer_data.cc ('k') | ui/gfx/image/image_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698