OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBBoxHierarchy.h" | 8 #include "SkBBoxHierarchy.h" |
9 #include "SkBlurImageFilter.h" | 9 #include "SkBlurImageFilter.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 REPORTER_ASSERT(reporter, NULL == info0.fPicture); | 1011 REPORTER_ASSERT(reporter, NULL == info0.fPicture); |
1012 REPORTER_ASSERT(reporter, kWidth == info0.fBounds.width() && | 1012 REPORTER_ASSERT(reporter, kWidth == info0.fBounds.width() && |
1013 kHeight == info0.fBounds.height()); | 1013 kHeight == info0.fBounds.height()); |
1014 REPORTER_ASSERT(reporter, info0.fLocalMat.isIdentity()); | 1014 REPORTER_ASSERT(reporter, info0.fLocalMat.isIdentity()); |
1015 REPORTER_ASSERT(reporter, info0.fPreMat.isIdentity()); | 1015 REPORTER_ASSERT(reporter, info0.fPreMat.isIdentity()); |
1016 REPORTER_ASSERT(reporter, 0 == info0.fBounds.fLeft && 0 == info0.fBo
unds.fTop); | 1016 REPORTER_ASSERT(reporter, 0 == info0.fBounds.fLeft && 0 == info0.fBo
unds.fTop); |
1017 REPORTER_ASSERT(reporter, NULL != info0.fPaint); | 1017 REPORTER_ASSERT(reporter, NULL != info0.fPaint); |
1018 REPORTER_ASSERT(reporter, !info0.fIsNested && !info0.fHasNestedLayer
s); | 1018 REPORTER_ASSERT(reporter, !info0.fIsNested && !info0.fHasNestedLayer
s); |
1019 | 1019 |
1020 REPORTER_ASSERT(reporter, NULL == info1.fPicture); | 1020 REPORTER_ASSERT(reporter, NULL == info1.fPicture); |
1021 REPORTER_ASSERT(reporter, kWidth == info1.fBounds.width() && | 1021 REPORTER_ASSERT(reporter, kWidth/2.0 == info1.fBounds.width() && |
1022 kHeight == info1.fBounds.height()); | 1022 kHeight/2.0 == info1.fBounds.height()); |
1023 REPORTER_ASSERT(reporter, info1.fLocalMat.isIdentity()); | 1023 REPORTER_ASSERT(reporter, info1.fLocalMat.isIdentity()); |
1024 REPORTER_ASSERT(reporter, info1.fPreMat.isIdentity()); | 1024 REPORTER_ASSERT(reporter, info1.fPreMat.isIdentity()); |
1025 REPORTER_ASSERT(reporter, 0 == info1.fBounds.fLeft && 0 == info1.fBo
unds.fTop); | 1025 REPORTER_ASSERT(reporter, kWidth/2.0 == info1.fBounds.fLeft && |
| 1026 kHeight/2.0 == info1.fBounds.fTop); |
1026 REPORTER_ASSERT(reporter, NULL == info1.fPaint); | 1027 REPORTER_ASSERT(reporter, NULL == info1.fPaint); |
1027 REPORTER_ASSERT(reporter, !info1.fIsNested && | 1028 REPORTER_ASSERT(reporter, !info1.fIsNested && |
1028 info1.fHasNestedLayers); // has a nested S
L | 1029 info1.fHasNestedLayers); // has a nested S
L |
1029 | 1030 |
1030 REPORTER_ASSERT(reporter, NULL == info2.fPicture); | 1031 REPORTER_ASSERT(reporter, NULL == info2.fPicture); |
1031 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fBounds.width() && | 1032 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fBounds.width() && |
1032 kHeight / 2 == info2.fBounds.height()); //
bound reduces size | 1033 kHeight / 2 == info2.fBounds.height()); //
bound reduces size |
1033 REPORTER_ASSERT(reporter, !info2.fLocalMat.isIdentity()); | 1034 REPORTER_ASSERT(reporter, !info2.fLocalMat.isIdentity()); |
1034 REPORTER_ASSERT(reporter, info2.fPreMat.isIdentity()); | 1035 REPORTER_ASSERT(reporter, info2.fPreMat.isIdentity()); |
1035 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fBounds.fLeft && //
translated | 1036 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fBounds.fLeft && //
translated |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1906 | 1907 |
1907 // The picture shares the immutable pixels but copies the mutable ones. | 1908 // The picture shares the immutable pixels but copies the mutable ones. |
1908 REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 1909 REPORTER_ASSERT(r, mut.pixelRef()->unique()); |
1909 REPORTER_ASSERT(r, !immut.pixelRef()->unique()); | 1910 REPORTER_ASSERT(r, !immut.pixelRef()->unique()); |
1910 | 1911 |
1911 // When the picture goes away, it's just our bitmaps holding the refs. | 1912 // When the picture goes away, it's just our bitmaps holding the refs. |
1912 pic.reset(NULL); | 1913 pic.reset(NULL); |
1913 REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 1914 REPORTER_ASSERT(r, mut.pixelRef()->unique()); |
1914 REPORTER_ASSERT(r, immut.pixelRef()->unique()); | 1915 REPORTER_ASSERT(r, immut.pixelRef()->unique()); |
1915 } | 1916 } |
OLD | NEW |