OLD | NEW |
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 #include "ui/gfx/image/image.h" | 5 #include "ui/gfx/image/image.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
| 13 #include "build/build_config.h" |
12 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
13 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
14 #include "ui/gfx/image/image_png_rep.h" | 16 #include "ui/gfx/image/image_png_rep.h" |
15 #include "ui/gfx/image/image_skia.h" | 17 #include "ui/gfx/image/image_skia.h" |
16 #include "ui/gfx/image/image_skia_source.h" | 18 #include "ui/gfx/image/image_skia_source.h" |
17 | 19 |
18 #if !defined(OS_IOS) | 20 #if !defined(OS_IOS) |
19 #include "ui/gfx/codec/png_codec.h" | 21 #include "ui/gfx/codec/png_codec.h" |
20 #endif | 22 #endif |
21 | 23 |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 return it->second.get(); | 749 return it->second.get(); |
748 } | 750 } |
749 | 751 |
750 void Image::AddRepresentation(scoped_ptr<internal::ImageRep> rep) const { | 752 void Image::AddRepresentation(scoped_ptr<internal::ImageRep> rep) const { |
751 CHECK(storage_.get()); | 753 CHECK(storage_.get()); |
752 RepresentationType type = rep->type(); | 754 RepresentationType type = rep->type(); |
753 storage_->representations().insert(std::make_pair(type, std::move(rep))); | 755 storage_->representations().insert(std::make_pair(type, std::move(rep))); |
754 } | 756 } |
755 | 757 |
756 } // namespace gfx | 758 } // namespace gfx |
OLD | NEW |