Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: tests/PictureTest.cpp

Issue 549143003: Fix bug in layer hoisting transition to SkRecord backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 REPORTER_ASSERT(reporter, info1.fOriginXform.isIdentity()); 1004 REPORTER_ASSERT(reporter, info1.fOriginXform.isIdentity());
1005 REPORTER_ASSERT(reporter, 0 == info1.fOffset.fX && 0 == info1.fOffse t.fY); 1005 REPORTER_ASSERT(reporter, 0 == info1.fOffset.fX && 0 == info1.fOffse t.fY);
1006 REPORTER_ASSERT(reporter, NULL == info1.fPaint); 1006 REPORTER_ASSERT(reporter, NULL == info1.fPaint);
1007 REPORTER_ASSERT(reporter, !info1.fIsNested && 1007 REPORTER_ASSERT(reporter, !info1.fIsNested &&
1008 info1.fHasNestedLayers); // has a nested S L 1008 info1.fHasNestedLayers); // has a nested S L
1009 1009
1010 REPORTER_ASSERT(reporter, info2.fValid); 1010 REPORTER_ASSERT(reporter, info2.fValid);
1011 REPORTER_ASSERT(reporter, pict->uniqueID() == info2.fPictureID); 1011 REPORTER_ASSERT(reporter, pict->uniqueID() == info2.fPictureID);
1012 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fSize.fWidth && 1012 REPORTER_ASSERT(reporter, kWidth / 2 == info2.fSize.fWidth &&
1013 kHeight/2 == info2.fSize.fHeight); // boun d reduces size 1013 kHeight/2 == info2.fSize.fHeight); // boun d reduces size
1014 REPORTER_ASSERT(reporter, info2.fOriginXform.isIdentity()); 1014 REPORTER_ASSERT(reporter, !info2.fOriginXform.isIdentity());
1015 REPORTER_ASSERT(reporter, kWidth/2 == info2.fOffset.fX && // trans lated 1015 REPORTER_ASSERT(reporter, kWidth/2 == info2.fOffset.fX && // trans lated
1016 kHeight/2 == info2.fOffset.fY); 1016 kHeight/2 == info2.fOffset.fY);
1017 REPORTER_ASSERT(reporter, NULL == info1.fPaint); 1017 REPORTER_ASSERT(reporter, NULL == info1.fPaint);
1018 REPORTER_ASSERT(reporter, info2.fIsNested && !info2.fHasNestedLayers ); // is nested 1018 REPORTER_ASSERT(reporter, info2.fIsNested && !info2.fHasNestedLayers ); // is nested
1019 1019
1020 REPORTER_ASSERT(reporter, info3.fValid); 1020 REPORTER_ASSERT(reporter, info3.fValid);
1021 REPORTER_ASSERT(reporter, pict->uniqueID() == info3.fPictureID); 1021 REPORTER_ASSERT(reporter, pict->uniqueID() == info3.fPictureID);
1022 REPORTER_ASSERT(reporter, kWidth == info3.fSize.fWidth && 1022 REPORTER_ASSERT(reporter, kWidth == info3.fSize.fWidth &&
1023 kHeight == info3.fSize.fHeight); 1023 kHeight == info3.fSize.fHeight);
1024 REPORTER_ASSERT(reporter, info3.fOriginXform.isIdentity()); 1024 REPORTER_ASSERT(reporter, info3.fOriginXform.isIdentity());
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 1943
1944 // The picture shares the immutable pixels but copies the mutable ones. 1944 // The picture shares the immutable pixels but copies the mutable ones.
1945 REPORTER_ASSERT(r, mut.pixelRef()->unique()); 1945 REPORTER_ASSERT(r, mut.pixelRef()->unique());
1946 REPORTER_ASSERT(r, !immut.pixelRef()->unique()); 1946 REPORTER_ASSERT(r, !immut.pixelRef()->unique());
1947 1947
1948 // When the picture goes away, it's just our bitmaps holding the refs. 1948 // When the picture goes away, it's just our bitmaps holding the refs.
1949 pic.reset(NULL); 1949 pic.reset(NULL);
1950 REPORTER_ASSERT(r, mut.pixelRef()->unique()); 1950 REPORTER_ASSERT(r, mut.pixelRef()->unique());
1951 REPORTER_ASSERT(r, immut.pixelRef()->unique()); 1951 REPORTER_ASSERT(r, immut.pixelRef()->unique());
1952 } 1952 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698