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_skia.h" | 5 #include "ui/gfx/image/image_skia.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
8 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" |
9 #include "base/threading/simple_thread.h" | 12 #include "base/threading/simple_thread.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
12 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
13 #include "ui/gfx/image/image_skia_rep.h" | 16 #include "ui/gfx/image/image_skia_rep.h" |
14 #include "ui/gfx/image/image_skia_source.h" | 17 #include "ui/gfx/image/image_skia_source.h" |
15 #include "ui/gfx/switches.h" | 18 #include "ui/gfx/switches.h" |
16 | 19 |
17 // Duplicated from base/threading/non_thread_safe.h so that we can be | 20 // Duplicated from base/threading/non_thread_safe.h so that we can be |
18 // good citizens there and undef the macro. | 21 // good citizens there and undef the macro. |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 EXPECT_EQ(1U, image.image_reps().size()); | 623 EXPECT_EQ(1U, image.image_reps().size()); |
621 | 624 |
622 const ImageSkiaRep& rep12 = image.GetRepresentation(1.2f); | 625 const ImageSkiaRep& rep12 = image.GetRepresentation(1.2f); |
623 EXPECT_EQ(1.0f, rep12.scale()); | 626 EXPECT_EQ(1.0f, rep12.scale()); |
624 EXPECT_EQ("100x200", rep12.pixel_size().ToString()); | 627 EXPECT_EQ("100x200", rep12.pixel_size().ToString()); |
625 EXPECT_TRUE(rep12.unscaled()); | 628 EXPECT_TRUE(rep12.unscaled()); |
626 EXPECT_EQ(1U, image.image_reps().size()); | 629 EXPECT_EQ(1U, image.image_reps().size()); |
627 } | 630 } |
628 | 631 |
629 } // namespace gfx | 632 } // namespace gfx |
OLD | NEW |