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/skbitmap_operations.h" | 5 #include "ui/gfx/skbitmap_operations.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
9 #include "third_party/skia/include/core/SkCanvas.h" | 11 #include "third_party/skia/include/core/SkCanvas.h" |
10 #include "third_party/skia/include/core/SkColorPriv.h" | 12 #include "third_party/skia/include/core/SkColorPriv.h" |
11 #include "third_party/skia/include/core/SkRect.h" | 13 #include "third_party/skia/include/core/SkRect.h" |
12 #include "third_party/skia/include/core/SkRegion.h" | 14 #include "third_party/skia/include/core/SkRegion.h" |
13 #include "third_party/skia/include/core/SkUnPreMultiply.h" | 15 #include "third_party/skia/include/core/SkUnPreMultiply.h" |
14 | 16 |
15 namespace { | 17 namespace { |
16 | 18 |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 | 558 |
557 for (int x=0; x < src_w; ++x) { | 559 for (int x=0; x < src_w; ++x) { |
558 for (int y=0; y < src_h; ++y) { | 560 for (int y=0; y < src_h; ++y) { |
559 ASSERT_EQ(*src.getAddr32(x,y), *rotate90.getAddr32(src_h - (y+1),x)); | 561 ASSERT_EQ(*src.getAddr32(x,y), *rotate90.getAddr32(src_h - (y+1),x)); |
560 ASSERT_EQ(*src.getAddr32(x,y), *rotate270.getAddr32(y, src_w - (x+1))); | 562 ASSERT_EQ(*src.getAddr32(x,y), *rotate270.getAddr32(y, src_w - (x+1))); |
561 ASSERT_EQ(*src.getAddr32(x,y), | 563 ASSERT_EQ(*src.getAddr32(x,y), |
562 *rotate180.getAddr32(src_w - (x+1), src_h - (y+1))); | 564 *rotate180.getAddr32(src_w - (x+1), src_h - (y+1))); |
563 } | 565 } |
564 } | 566 } |
565 } | 567 } |
OLD | NEW |