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

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: Update to ToT 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
« no previous file with comments | « tests/GpuLayerCacheTest.cpp ('k') | tests/RecordDrawTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « tests/GpuLayerCacheTest.cpp ('k') | tests/RecordDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698