SkMatrix44(const SkMatrix&) needs to initialize the type mask
Review URL: https://codereview.chromium.org/791723006
This commit is contained in:
parent
478dd72336
commit
88640cf363
@ -939,7 +939,7 @@ static void initFromMatrix(SkMScalar dst[4][4], const SkMatrix& src) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SkMatrix44::SkMatrix44(const SkMatrix& src) {
|
SkMatrix44::SkMatrix44(const SkMatrix& src) {
|
||||||
initFromMatrix(fMat, src);
|
this->operator=(src);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkMatrix44& SkMatrix44::operator=(const SkMatrix& src) {
|
SkMatrix44& SkMatrix44::operator=(const SkMatrix& src) {
|
||||||
|
@ -104,6 +104,14 @@ static void test_constructor(skiatest::Reporter* reporter) {
|
|||||||
REPORTER_ASSERT(reporter, testMatrix == placeholderMatrix);
|
REPORTER_ASSERT(reporter, testMatrix == placeholderMatrix);
|
||||||
REPORTER_ASSERT(reporter, testMatrix->isIdentity());
|
REPORTER_ASSERT(reporter, testMatrix->isIdentity());
|
||||||
REPORTER_ASSERT(reporter, *testMatrix == SkMatrix44::I());
|
REPORTER_ASSERT(reporter, *testMatrix == SkMatrix44::I());
|
||||||
|
|
||||||
|
// Verify that that constructing from an SkMatrix initializes everything.
|
||||||
|
SkMatrix44 scaleMatrix(SkMatrix44::kUninitialized_Constructor);
|
||||||
|
scaleMatrix.setScale(3, 4, 5);
|
||||||
|
REPORTER_ASSERT(reporter, scaleMatrix.isScale());
|
||||||
|
testMatrix = new(&scaleMatrix) SkMatrix44(SkMatrix::I());
|
||||||
|
REPORTER_ASSERT(reporter, testMatrix->isIdentity());
|
||||||
|
REPORTER_ASSERT(reporter, *testMatrix == SkMatrix44::I());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_translate(skiatest::Reporter* reporter) {
|
static void test_translate(skiatest::Reporter* reporter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user