-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/engine
#36058Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: imagesLoading, displaying, rendering imagesLoading, displaying, rendering imagesc: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering levele: web_htmlHTML rendering backend for WebHTML rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specifically
Description
Steps to repro:
- Create new flutter app with 'flutter create'
- Create method 'exerciseGraphics':
import 'dart:ui' as ui;
Future<void> exerciseGraphics() async {
final image = await _createImage();
print('${image.runtimeType}');
}
Future<ui.Image> _createImage() => _createPicture().toImage(10, 10);
ui.Picture _createPicture() {
final ui.PictureRecorder recorder = ui.PictureRecorder();
final ui.Canvas canvas = ui.Canvas(recorder);
const ui.Rect rect = ui.Rect.fromLTWH(0.0, 0.0, 100.0, 100.0);
canvas.clipRect(rect);
return recorder.endRecording();
}
- Invoke it in incrementCounter:
void _incrementCounter() async {
await exerciseGraphics();
setState(() {
_counter++;
});
}
- Run application with html renderer:
flutter run -d chrome --web-renderer html
- Click the button '+' and get the error in console:
Error: [object Event]
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 299:10 createErrorWithStack
dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 341:28 _throw
dart-sdk/lib/core/errors.dart 116:5 throwWithStackTrace
dart-sdk/lib/async/zone.dart 1385:11 callback
dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 166:15 <fn>
- Check the code works for canvas renderer:
flutter run -d chrome
See the full example at: https://github.com/polina-c/spikes/tree/master/graphics
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: imagesLoading, displaying, rendering imagesLoading, displaying, rendering imagesc: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering levele: web_htmlHTML rendering backend for WebHTML rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specifically