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 <stddef.h> |
| 6 #include <stdint.h> |
| 7 |
5 #include <algorithm> | 8 #include <algorithm> |
6 #include <cmath> | 9 #include <cmath> |
7 | 10 |
8 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/libpng/png.h" | 14 #include "third_party/libpng/png.h" |
11 #include "third_party/skia/include/core/SkBitmap.h" | 15 #include "third_party/skia/include/core/SkBitmap.h" |
12 #include "third_party/skia/include/core/SkColorPriv.h" | 16 #include "third_party/skia/include/core/SkColorPriv.h" |
13 #include "third_party/skia/include/core/SkUnPreMultiply.h" | 17 #include "third_party/skia/include/core/SkUnPreMultiply.h" |
14 #include "third_party/zlib/zlib.h" | 18 #include "third_party/zlib/zlib.h" |
15 #include "ui/gfx/codec/png_codec.h" | 19 #include "ui/gfx/codec/png_codec.h" |
16 #include "ui/gfx/geometry/size.h" | 20 #include "ui/gfx/geometry/size.h" |
17 #include "ui/gfx/skia_util.h" | 21 #include "ui/gfx/skia_util.h" |
18 | 22 |
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 PNGCodec::Decode(&encoded_normal[0], encoded_normal.size(), &decoded)); | 1183 PNGCodec::Decode(&encoded_normal[0], encoded_normal.size(), &decoded)); |
1180 EXPECT_TRUE(BitmapsAreEqual(decoded, original_bitmap)); | 1184 EXPECT_TRUE(BitmapsAreEqual(decoded, original_bitmap)); |
1181 | 1185 |
1182 EXPECT_TRUE( | 1186 EXPECT_TRUE( |
1183 PNGCodec::Decode(&encoded_fast[0], encoded_fast.size(), &decoded)); | 1187 PNGCodec::Decode(&encoded_fast[0], encoded_fast.size(), &decoded)); |
1184 EXPECT_TRUE(BitmapsAreEqual(decoded, original_bitmap)); | 1188 EXPECT_TRUE(BitmapsAreEqual(decoded, original_bitmap)); |
1185 } | 1189 } |
1186 | 1190 |
1187 | 1191 |
1188 } // namespace gfx | 1192 } // namespace gfx |
OLD | NEW |