Skip to content

Commit 8219b43

Browse files
authored
Let _debugCheckNotUsedAsOldLayer provide hashcode in addition to runtime type (flutter#36985)
* Update compositing.dart * Update compositing.dart * Update compositing.dart
1 parent 2f8b4e7 commit 8219b43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ui/compositing.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,10 @@ abstract class _EngineLayerWrapper implements EngineLayer {
106106
bool _debugWasUsedAsOldLayer = false;
107107

108108
bool _debugCheckNotUsedAsOldLayer() {
109+
// The hashCode formatting should match shortHash in the framework
109110
assert(
110111
!_debugWasUsedAsOldLayer,
111-
'Layer $runtimeType was previously used as oldLayer.\n'
112+
'Layer $runtimeType#${hashCode.toUnsigned(20).toRadixString(16).padLeft(5, '0')} was previously used as oldLayer.\n'
112113
'Once a layer is used as oldLayer, it may not be used again. Instead, '
113114
'after calling one of the SceneBuilder.push* methods and passing an oldLayer '
114115
'to it, use the layer returned by the method as oldLayer in subsequent '

0 commit comments

Comments
 (0)