Unverified Commit 1f5d9041 authored by xster's avatar xster Committed by GitHub

Re-enable usage of TransformLayers with text in RenderListWheelViewport (#15625)

* Re-enable usage of TransformLayers with text in RenderListWheelViewport

* add test

* linter fix
parent 104858cb
......@@ -562,9 +562,7 @@ class RenderListWheelViewport
);
context.pushTransform(
// Text with TransformLayers and no cullRects currently have an issue rendering
// https://github.com/flutter/flutter/issues/14224.
false,
needsCompositing,
offset,
_centerOriginTransform(transform),
// Pre-transform painting function.
......
......@@ -385,6 +385,39 @@ void main() {
]),
));
});
testWidgets('Painting creates layers', (WidgetTester tester) async {
await tester.pumpWidget(
new Directionality(
textDirection: TextDirection.ltr,
child: new ListWheelScrollView(
itemExtent: 100.0,
children: <Widget>[
new Container(
width: 200.0,
child: const Center(
child: const Text('blah'),
),
),
],
),
),
);
expect(
new List<TransformLayer>.from(
tester.layers.where((Layer layer) => layer is TransformLayer)
)
.map((TransformLayer layer) => layer.transform.storage)
.toList(),
contains(equals(<dynamic>[
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
-1.2, -0.9, 1.0, -0.003,
moreOrLessEquals(0.0), moreOrLessEquals(0.0), 0.0, moreOrLessEquals(1.0),
])),
);
});
});
group('scroll notifications', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment