Skip to content

Instantly share code, notes, and snippets.

View yjbanov's full-sized avatar
💭
Building a Web runtime for Flutter: http://bit.ly/flutter-web

Yegor yjbanov

💭
Building a Web runtime for Flutter: http://bit.ly/flutter-web
View GitHub Profile
@yjbanov
yjbanov / ck_androd_issue.js
Created August 16, 2022 21:28
Attempts to reproduce CanvasKit issue on Nexus 5X
const transforms = [
[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -0.01, 1],
[1, 0, 0, 0, 0, 0.996917333733128, -0.07845909572784494, -2.353772871835348, 0, 0.07845909572784494, 0.996917333733128, -0.0924799880061613, 0, -0.0007845909572784495, -0.00996917333733128,
1.0009247998800617],
[1, 0, 0, 0, 0, 0.9876883405951378, -0.15643446504023087, -4.693033951206926, 0, 0.15643446504023087, 0.9876883405951378, -0.3693497821458678, 0, -0.0015643446504023087, -0.009876883405951378,
1.0036934978214587],
[1, 0, 0, 0, 0, 0.9723699203976766, -0.2334453638559054, -7.0033609156771615, 0, 0.2334453638559054, 0.9723699203976766, -0.8289023880697037, 0, -0.002334453638559054, -0.009723699203976767,
1.008289023880697],
[1, 0, 0, 0, 0, 0.9510565162951535, -0.3090169943749474, -9.270509831248422, 0, 0.3090169943749474, 0.9510565162951535, -1.4683045111453943, 0, -0.0030901699437494742, -0.009510565162951536,
1.014683045111454],
@yjbanov
yjbanov / raw_dart_ui.dart
Created May 9, 2022 16:28
An example that uses raw dart:ui to fill the screen with green color
import 'dart:ui';
void main() {
var recorder = PictureRecorder();
var canvas = Canvas(recorder, Rect.largest);
canvas.drawColor(const Color(0xFF00FF00), BlendMode.srcOver);
var picture = recorder.endRecording();
var sceneBuilder = SceneBuilder();
sceneBuilder.addPicture(Offset.zero, picture);
var scene = sceneBuilder.build();
@yjbanov
yjbanov / image_decoder_stress_test.html
Created January 5, 2022 00:27
ImageDecoder stress test
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ImageDecoder memory usage test</title>
</head>
<body>
<script>
@yjbanov
yjbanov / disappearing_test.html
Created December 14, 2021 01:08
CanvasKit text disappears in the presence of MakeLazyImageFromTextureSource image
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Where's text?</title>
</head>
<body>
<canvas id=foo width=300 height=300></canvas>
@yjbanov
yjbanov / frame-order-skia-vs-webcodecs.html
Created December 8, 2021 22:42
frame decode order skia vs webcodecs
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>SkImage.readPixels</title>
</head>
<body>
<canvas id=foo width=300 height=300></canvas>
@yjbanov
yjbanov / flutter-analyze-2.txt
Created November 29, 2021 21:16
flutter update-packages && flutter analyze --flutter-repo
$ flutter update-packages
Running "flutter pub get" in flutter_update_packages.RFBKQF... 4.5s
Ran pub get in dev/integration_tests/web in 1.2s...
Ran pub get in dev/integration_tests/web_compile_tests in 1.3s...
Ran pub get in dev/tools/vitool in 1.5s...
Ran pub get in packages/flutter_test in 1.6s...
Ran pub get in packages/flutter_tools/test/data/asset_test/main in 2.1s...
Ran pub get in examples/platform_view in 2.1s...
Ran pub get in packages/integration_test/integration_test_macos in 0.9s...
Ran pub get in packages/flutter_test/test/test_config/project_root in 2.2s...
@yjbanov
yjbanov / flutter-analyze.txt
Created November 24, 2021 19:18
Unexpectedly failing framework analysis
$ dart --enable-asserts dev/bots/analyze.dart
▌11:11:21▐ STARTING ANALYSIS
▌11:11:21▐ No runtimeType in toString...
▌11:11:21▐ Debug mode instead of checked mode...
▌11:11:22▐ Links for creating GitHub issues
▌11:11:23▐ Unexpected binaries...
▌11:11:23▐ Trailing spaces...
▌11:11:24▐ Deprecations...
▌11:11:25▐ Goldens...
▌11:11:26▐ Skip test comments...
class IPromiseIAmImmutable {
IPromiseIAmImmutable(this.field);
final int? field;
}
class OhYeahWatchThis implements IPromiseIAmImmutable {
int? _field;
@override
import 'dart:ui';
import 'package:flutter/material.dart';
const N = 10000;
void main() {
runApp(MyApp());
}
In file included from ../../flutter/third_party/accessibility/ax/ax_event_generator.cc:5:
../../flutter/third_party/accessibility/ax/ax_event_generator.h(129,21): warning: 'iterator<std::input_iterator_tag, ui::AXEventGenerator::TargetedEvent, long long, ui::AXEventGenerator::TargetedEvent *, ui::AXEventGenerator::TargetedEvent &>' is deprecated: warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> header is NOT deprecated.) The C++ Standard has never required user-defined iterators to derive from std::iterator. To fix this warning, stop deriving from std::iterator and start providing publicly accessible typedefs named iterator_category, value_type, difference_type, pointer, and reference. Note that value_type is required to be non-const, even for constant iterators. You can define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning. [