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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 REPORTER_ASSERT(reporter, NULL == info0.fPicture); | 1014 REPORTER_ASSERT(reporter, NULL == info0.fPicture); |
1015 REPORTER_ASSERT(reporter, kWidth == info0.fBounds.width() && | 1015 REPORTER_ASSERT(reporter, kWidth == info0.fBounds.width() && |
1016 kHeight == info0.fBounds.height()); | 1016 kHeight == info0.fBounds.height()); |
1017 REPORTER_ASSERT(reporter, info0.fLocalMat.isIdentity()); | 1017 REPORTER_ASSERT(reporter, info0.fLocalMat.isIdentity()); |
1018 REPORTER_ASSERT(reporter, info0.fPreMat.isIdentity()); | 1018 REPORTER_ASSERT(reporter, info0.fPreMat.isIdentity()); |
1019 REPORTER_ASSERT(reporter, 0 == info0.fBounds.fLeft && 0 == info0.fBo
unds.fTop); | 1019 REPORTER_ASSERT(reporter, 0 == info0.fBounds.fLeft && 0 == info0.fBo
unds.fTop); |
1020 REPORTER_ASSERT(reporter, NULL != info0.fPaint); | 1020 REPORTER_ASSERT(reporter, NULL != info0.fPaint); |
1021 REPORTER_ASSERT(reporter, !info0.fIsNested && !info0.fHasNestedLayer
s); | 1021 REPORTER_ASSERT(reporter, !info0.fIsNested && !info0.fHasNestedLayer
s); |
1022 | 1022 |
1023 REPORTER_ASSERT(reporter, NULL == info1.fPicture); | 1023 REPORTER_ASSERT(reporter, NULL == info1.fPicture); |
1024 REPORTER_ASSERT(reporter, kWidth == info1.fBounds.width() && | 1024 REPORTER_ASSERT(reporter, kWidth/2.0f == info1.fBounds.width() && |
1025 kHeight == info1.fBounds.height()); | 1025 kHeight/2.0f == info1.fBounds.height()); |
1026 REPORTER_ASSERT(reporter, info1.fLocalMat.isIdentity()); | 1026 REPORTER_ASSERT(reporter, info1.fLocalMat.isIdentity()); |
1027 REPORTER_ASSERT(reporter, info1.fPreMat.isIdentity()); | 1027 REPORTER_ASSERT(reporter, info1.fPreMat.isIdentity()); |
1028 REPORTER_ASSERT(reporter, 0 == info1.fBounds.fLeft && 0 == info1.fBo
unds.fTop); | 1028 REPORTER_ASSERT(reporter, kWidth / 2.0f == info1.fBounds.fLeft && |
| 1029 kHeight / 2.0f == info1.fBounds.fTop); |
1029 REPORTER_ASSERT(reporter, NULL == info1.fPaint); | 1030 REPORTER_ASSERT(reporter, NULL == info1.fPaint); |
1030 REPORTER_ASSERT(reporter, !info1.fIsNested && | 1031 REPORTER_ASSERT(reporter, !info1.fIsNested && |
1031 info1.fHasNestedLayers); // has a nested S
L | 1032 info1.fHasNestedLayers); // has a nested S
L |
1032 | 1033 |
1033 REPORTER_ASSERT(reporter, NULL == info2.fPicture); | 1034 REPORTER_ASSERT(reporter, NULL == info2.fPicture); |
1034 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fBounds.width() && | 1035 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fBounds.width() && |
1035 kHeight / 2 == info2.fBounds.height()); //
bound reduces size | 1036 kHeight / 2 == info2.fBounds.height()); //
bound reduces size |
1036 REPORTER_ASSERT(reporter, !info2.fLocalMat.isIdentity()); | 1037 REPORTER_ASSERT(reporter, !info2.fLocalMat.isIdentity()); |
1037 REPORTER_ASSERT(reporter, info2.fPreMat.isIdentity()); | 1038 REPORTER_ASSERT(reporter, info2.fPreMat.isIdentity()); |
1038 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fBounds.fLeft && //
translated | 1039 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fBounds.fLeft && //
translated |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1909 | 1910 |
1910 // The picture shares the immutable pixels but copies the mutable ones. | 1911 // The picture shares the immutable pixels but copies the mutable ones. |
1911 REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 1912 REPORTER_ASSERT(r, mut.pixelRef()->unique()); |
1912 REPORTER_ASSERT(r, !immut.pixelRef()->unique()); | 1913 REPORTER_ASSERT(r, !immut.pixelRef()->unique()); |
1913 | 1914 |
1914 // When the picture goes away, it's just our bitmaps holding the refs. | 1915 // When the picture goes away, it's just our bitmaps holding the refs. |
1915 pic.reset(NULL); | 1916 pic.reset(NULL); |
1916 REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 1917 REPORTER_ASSERT(r, mut.pixelRef()->unique()); |
1917 REPORTER_ASSERT(r, immut.pixelRef()->unique()); | 1918 REPORTER_ASSERT(r, immut.pixelRef()->unique()); |
1918 } | 1919 } |
OLD | NEW |