-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
e: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine team
Description
E.g. the ColorFilter - matrix test in color_filter_test.dart is broken for Impeller.
This is a small app that should cycle between two colors every 250ms, but on Impeller it stays solid:
import 'dart:ui';
void main() {
const List<double> greyscaleColorMatrix = <double>[
0.2126, 0.7152, 0.0722, 0, 0, //
0.2126, 0.7152, 0.0722, 0, 0, //
0.2126, 0.7152, 0.0722, 0, 0, //
0, 0, 0, 1, 0, //
];
const Color green = Color(0xFF00AA00);
final Paint paint = Paint()
..color = green
..colorFilter = const ColorFilter.matrix(greyscaleColorMatrix);
window.onBeginFrame = (_) {
final recorder = PictureRecorder();
final canvas = Canvas(recorder);
canvas.drawPaint(paint);
final picture = recorder.endRecording();
final builder = SceneBuilder();
builder.addPicture(Offset.zero, picture);
final scene = builder.build();
window.render(scene);
scene.dispose();
picture.dispose();
paint.invertColors = !paint.invertColors;
Future.delayed(const Duration(milliseconds: 250)).then((_) {
window.scheduleFrame();
});
};
window.scheduleFrame();
}Metadata
Metadata
Assignees
Labels
e: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine team