OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "cc/test/pixel_comparator.h" | 5 #include "cc/test/pixel_comparator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 ExactPixelComparator::ExactPixelComparator(const bool discard_alpha) | 14 ExactPixelComparator::ExactPixelComparator(const bool discard_alpha) |
15 : discard_alpha_(discard_alpha) { | 15 : discard_alpha_(discard_alpha) { |
16 } | 16 } |
17 | 17 |
18 bool ExactPixelComparator::Compare(const SkBitmap& actual_bmp, | 18 bool ExactPixelComparator::Compare(const SkBitmap& actual_bmp, |
19 const SkBitmap& expected_bmp) const { | 19 const SkBitmap& expected_bmp) const { |
20 // Number of pixels with an error | 20 // Number of pixels with an error |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 } | 201 } |
202 } | 202 } |
203 LOG(ERROR) << "Error Bounding Box : " << error_bounding_rect.ToString(); | 203 LOG(ERROR) << "Error Bounding Box : " << error_bounding_rect.ToString(); |
204 return false; | 204 return false; |
205 } else { | 205 } else { |
206 return true; | 206 return true; |
207 } | 207 } |
208 } | 208 } |
209 | 209 |
210 } // namespace cc | 210 } // namespace cc |
OLD | NEW |