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

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

Issue 10783015: Add ability to store hidpi theme images in data pack (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/base/theme_provider.h ('k') | ui/gfx/image/image_skia_operations.h » ('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 4210484963ce4773bea4b057091985182cfcf203..e8b773041f802046879f662cc590fe172b387e71 100644
--- a/ui/gfx/image/image_skia.cc
+++ b/ui/gfx/image/image_skia.cc
@@ -235,17 +235,7 @@ std::vector<ImageSkiaRep> ImageSkia::GetRepresentations() const {
for (size_t i = 0; i < supported_scale_factors.size(); ++i)
storage_->FindRepresentation(supported_scale_factors[i], true);
- ImageSkiaReps internal_image_reps = storage_->image_reps();
- // Create list of image reps to return, skipping null image reps which were
- // added for caching purposes only.
- ImageSkiaReps image_reps;
- for (ImageSkiaReps::iterator it = internal_image_reps.begin();
- it != internal_image_reps.end(); ++it) {
- if (!it->is_null())
- image_reps.push_back(*it);
- }
-
- return image_reps;
+ return image_reps();
}
#endif // OS_MACOSX
@@ -276,7 +266,17 @@ std::vector<ImageSkiaRep> ImageSkia::image_reps() const {
if (isNull())
return std::vector<ImageSkiaRep>();
- return storage_->image_reps();
+ ImageSkiaReps internal_image_reps = storage_->image_reps();
+ // Create list of image reps to return, skipping null image reps which were
+ // added for caching purposes only.
+ ImageSkiaReps image_reps;
+ for (ImageSkiaReps::iterator it = internal_image_reps.begin();
+ it != internal_image_reps.end(); ++it) {
+ if (!it->is_null())
+ image_reps.push_back(*it);
+ }
+
+ return image_reps;
}
const SkBitmap* ImageSkia::bitmap() const {
« no previous file with comments | « ui/base/theme_provider.h ('k') | ui/gfx/image/image_skia_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698