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

Side by Side Diff: tests/PictureTest.cpp

Issue 716913003: Move SkRecordComputeLayers and CollectLayers into SkRecordDraw.cpp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review issues Created 6 years, 1 month 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 | « src/gpu/GrPictureUtils.cpp ('k') | no next file » | 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 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/GrPictureUtils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698