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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 REPORTER_ASSERT(reporter, info1.fOriginXform.isIdentity()); | 1007 REPORTER_ASSERT(reporter, info1.fOriginXform.isIdentity()); |
1008 REPORTER_ASSERT(reporter, 0 == info1.fOffset.fX && 0 == info1.fOffse
t.fY); | 1008 REPORTER_ASSERT(reporter, 0 == info1.fOffset.fX && 0 == info1.fOffse
t.fY); |
1009 REPORTER_ASSERT(reporter, NULL == info1.fPaint); | 1009 REPORTER_ASSERT(reporter, NULL == info1.fPaint); |
1010 REPORTER_ASSERT(reporter, !info1.fIsNested && | 1010 REPORTER_ASSERT(reporter, !info1.fIsNested && |
1011 info1.fHasNestedLayers); // has a nested S
L | 1011 info1.fHasNestedLayers); // has a nested S
L |
1012 | 1012 |
1013 REPORTER_ASSERT(reporter, info2.fValid); | 1013 REPORTER_ASSERT(reporter, info2.fValid); |
1014 REPORTER_ASSERT(reporter, pict->uniqueID() == info2.fPictureID); | 1014 REPORTER_ASSERT(reporter, pict->uniqueID() == info2.fPictureID); |
1015 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fSize.fWidth && | 1015 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fSize.fWidth && |
1016 kHeight/2 == info2.fSize.fHeight); // boun
d reduces size | 1016 kHeight/2 == info2.fSize.fHeight); // boun
d reduces size |
1017 REPORTER_ASSERT(reporter, info2.fOriginXform.isIdentity()); | 1017 REPORTER_ASSERT(reporter, !info2.fOriginXform.isIdentity()); |
1018 REPORTER_ASSERT(reporter, kWidth/2 == info2.fOffset.fX && // trans
lated | 1018 REPORTER_ASSERT(reporter, kWidth/2 == info2.fOffset.fX && // trans
lated |
1019 kHeight/2 == info2.fOffset.fY); | 1019 kHeight/2 == info2.fOffset.fY); |
1020 REPORTER_ASSERT(reporter, NULL == info1.fPaint); | 1020 REPORTER_ASSERT(reporter, NULL == info1.fPaint); |
1021 REPORTER_ASSERT(reporter, info2.fIsNested && !info2.fHasNestedLayers
); // is nested | 1021 REPORTER_ASSERT(reporter, info2.fIsNested && !info2.fHasNestedLayers
); // is nested |
1022 | 1022 |
1023 REPORTER_ASSERT(reporter, info3.fValid); | 1023 REPORTER_ASSERT(reporter, info3.fValid); |
1024 REPORTER_ASSERT(reporter, pict->uniqueID() == info3.fPictureID); | 1024 REPORTER_ASSERT(reporter, pict->uniqueID() == info3.fPictureID); |
1025 REPORTER_ASSERT(reporter, kWidth == info3.fSize.fWidth && | 1025 REPORTER_ASSERT(reporter, kWidth == info3.fSize.fWidth && |
1026 kHeight == info3.fSize.fHeight); | 1026 kHeight == info3.fSize.fHeight); |
1027 REPORTER_ASSERT(reporter, info3.fOriginXform.isIdentity()); | 1027 REPORTER_ASSERT(reporter, info3.fOriginXform.isIdentity()); |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1946 | 1946 |
1947 // The picture shares the immutable pixels but copies the mutable ones. | 1947 // The picture shares the immutable pixels but copies the mutable ones. |
1948 REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 1948 REPORTER_ASSERT(r, mut.pixelRef()->unique()); |
1949 REPORTER_ASSERT(r, !immut.pixelRef()->unique()); | 1949 REPORTER_ASSERT(r, !immut.pixelRef()->unique()); |
1950 | 1950 |
1951 // When the picture goes away, it's just our bitmaps holding the refs. | 1951 // When the picture goes away, it's just our bitmaps holding the refs. |
1952 pic.reset(NULL); | 1952 pic.reset(NULL); |
1953 REPORTER_ASSERT(r, mut.pixelRef()->unique()); | 1953 REPORTER_ASSERT(r, mut.pixelRef()->unique()); |
1954 REPORTER_ASSERT(r, immut.pixelRef()->unique()); | 1954 REPORTER_ASSERT(r, immut.pixelRef()->unique()); |
1955 } | 1955 } |
OLD | NEW |