@@ -327,8 +327,29 @@ void GfxExternalViewEmbedder::SubmitFrame(
327
327
const float view_elevation =
328
328
kScenicZElevationBetweenLayers * scenic_layer_index +
329
329
embedded_views_height;
330
- FML_CHECK (view_mutators.total_transform ==
331
- view_params.transformMatrix ());
330
+
331
+ // Verify that we're unpacking the mutators' transform matrix correctly
332
+ // on debug builds Use built-in get method for SkMatrix to get values
333
+ // See:
334
+ // https://source.corp.google.com/piper///depot/google3/third_party/skia/HEAD/include/core/SkMatrix.h;l=391
335
+ #ifdef NDEBUG
336
+ for (int index = 0 ; index < 9 ; index++) {
337
+ const SkScalar mutators_transform_value =
338
+ view_mutators.total_transform .get (index);
339
+ const SkScalar params_transform_value =
340
+ view_params.transformMatrix ().get (index);
341
+ if (!SkScalarNearlyEqual (mutators_transform_value,
342
+ params_transform_value, 0 .0005f )) {
343
+ FML_LOG (FATAL)
344
+ << " Assertion failed: view_mutators.total_transform[" << index
345
+ << " ] (" << mutators_transform_value
346
+ << " ) != view_params.transformMatrix()[" << index << " ] ("
347
+ << params_transform_value
348
+ << " ). This likely means there is a bug with the "
349
+ << " logic for parsing embedded views' transform matrices." ;
350
+ }
351
+ }
352
+ #endif
332
353
333
354
// Set clips for the platform view.
334
355
if (view_mutators.clips != view_holder.mutators .clips ) {
0 commit comments