mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
Define ComputedOperation::InterpolateMatrix.
We use this arm to store the interpolated result of two mismatched transform lists, and we resolve it until we know the reference box size (on Gecko side). The conversion from ComputedOperation::InterpolateMatrix to eCSSKeyword_interpolatematrix will be implemented later in this patch series.
This commit is contained in:
parent
f388c0ab1e
commit
a6099d0fc0
4 changed files with 56 additions and 4 deletions
|
@ -1643,6 +1643,9 @@ fn build_identity_transform_list(list: &[TransformOperation]) -> Vec<TransformOp
|
|||
let identity = ComputedMatrix::identity();
|
||||
result.push(TransformOperation::Matrix(identity));
|
||||
}
|
||||
TransformOperation::InterpolateMatrix { .. } => {
|
||||
panic!("Building the identity matrix for InterpolateMatrix is not supported");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1744,8 +1747,13 @@ fn add_weighted_transform_lists(from_list: &[TransformOperation],
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// TODO(gw): Implement matrix decomposition and interpolation
|
||||
result.extend_from_slice(from_list);
|
||||
use values::specified::Percentage;
|
||||
let from_transform_list = TransformList(Some(from_list.to_vec()));
|
||||
let to_transform_list = TransformList(Some(to_list.to_vec()));
|
||||
result.push(
|
||||
TransformOperation::InterpolateMatrix { from_list: from_transform_list,
|
||||
to_list: to_transform_list,
|
||||
progress: Percentage(other_portion as f32) });
|
||||
}
|
||||
|
||||
TransformList(Some(result))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue