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 #if defined(USE_SYSTEM_LIBPNG) | |
6 #include <png.h> | |
7 #else | |
8 #include "third_party/libpng/png.h" | |
9 #endif | |
10 | |
11 #include <algorithm> | 5 #include <algorithm> |
12 #include <cmath> | 6 #include <cmath> |
13 | 7 |
14 #include "base/logging.h" | 8 #include "base/logging.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "third_party/libpng/png.h" |
16 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
17 #include "third_party/skia/include/core/SkColorPriv.h" | 12 #include "third_party/skia/include/core/SkColorPriv.h" |
18 #include "third_party/skia/include/core/SkUnPreMultiply.h" | 13 #include "third_party/skia/include/core/SkUnPreMultiply.h" |
19 #include "third_party/zlib/zlib.h" | 14 #include "third_party/zlib/zlib.h" |
20 #include "ui/gfx/codec/png_codec.h" | 15 #include "ui/gfx/codec/png_codec.h" |
21 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
22 | 17 |
23 namespace gfx { | 18 namespace gfx { |
24 | 19 |
25 namespace { | 20 namespace { |
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 ASSERT_EQ(w, outw); | 1119 ASSERT_EQ(w, outw); |
1125 ASSERT_EQ(h, outh); | 1120 ASSERT_EQ(h, outh); |
1126 ASSERT_EQ(original.size(), decoded.size()); | 1121 ASSERT_EQ(original.size(), decoded.size()); |
1127 | 1122 |
1128 // Images must be exactly equal | 1123 // Images must be exactly equal |
1129 ASSERT_TRUE(original == decoded); | 1124 ASSERT_TRUE(original == decoded); |
1130 } | 1125 } |
1131 | 1126 |
1132 | 1127 |
1133 } // namespace gfx | 1128 } // namespace gfx |
OLD | NEW |