[fuchsia] Remove strict equality check for SkMatrix comparison for Fl… (flutter/engine#43309)

Flatland version of
010e710512

Bug: fxb/126648
This commit is contained in:
Emircan Uysaler
2023-06-29 12:01:12 -04:00
committed by GitHub
parent eb4725c362
commit d69d614045

View File

@@ -235,8 +235,26 @@ void FlatlandExternalViewEmbedder::SubmitFrame(
const ViewMutators view_mutators =
ParseMutatorStack(view_params.mutatorsStack());
const SkSize view_size = view_params.sizePoints();
FML_CHECK(view_mutators.total_transform ==
view_params.transformMatrix());
// Verify that we're unpacking the mutators' transform matrix correctly.
// Use built-in get method for SkMatrix to get values, see:
// https://source.corp.google.com/piper///depot/google3/third_party/skia/HEAD/include/core/SkMatrix.h;l=391
for (int index = 0; index < 9; index++) {
const SkScalar mutators_transform_value =
view_mutators.total_transform.get(index);
const SkScalar params_transform_value =
view_params.transformMatrix().get(index);
if (!SkScalarNearlyEqual(mutators_transform_value,
params_transform_value, 0.0005f)) {
FML_LOG(ERROR)
<< "Assertion failed: view_mutators.total_transform[" << index
<< "] (" << mutators_transform_value
<< ") != view_params.transformMatrix()[" << index << "] ("
<< params_transform_value
<< "). This likely means there is a bug with the "
<< "logic for parsing embedded views' transform matrices.";
}
}
if (viewport.pending_create_viewport_callback) {
if (view_size.fWidth && view_size.fHeight) {