Skip to content

Instantly share code, notes, and snippets.

View jonahwilliams's full-sized avatar

Jonah Williams jonahwilliams

View GitHub Profile
diff --git a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java
index b8b781912..0febc8b60 100644
--- a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java
+++ b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java
@@ -50,7 +50,7 @@ final class VideoPlayer {
private Surface surface;
- private final TextureRegistry.SurfaceTextureEntry textureEntry;
+ private final TextureRegistry.SurfaceProducer textureProducer;
diff --git a/impeller/entity/render_target_cache.cc b/impeller/entity/render_target_cache.cc
index 3a9710a93e..574019faa9 100644
--- a/impeller/entity/render_target_cache.cc
+++ b/impeller/entity/render_target_cache.cc
@@ -33,7 +33,11 @@ RenderTarget RenderTargetCache::CreateOffscreen(
int mip_count,
const std::string& label,
RenderTarget::AttachmentConfig color_attachment_config,
- std::optional<RenderTarget::AttachmentConfig> stencil_attachment_config) {
+ std::optional<RenderTarget::AttachmentConfig> stencil_attachment_config,
@jonahwilliams
jonahwilliams / main.dart
Created February 26, 2024 17:27
minimal repro
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
group('Shadows on ShapeDecoration', () {
Widget build(int elevation) {
return Center(
child: RepaintBoundary(
child: Container(
margin: const EdgeInsets.all(150.0),
decoration: ShapeDecoration(
@jonahwilliams
jonahwilliams / output.svg
Created February 2, 2024 01:30
profile example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonahwilliams
jonahwilliams / main.dart
Created January 22, 2024 20:39
page transition gif
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Page1(),
routes: {'/foo': (context) {
return Page2();
}},
)
@jonahwilliams
jonahwilliams / main.txt
Last active December 4, 2023 23:17
What to do for stable Impeller on Android
# Vulkan
~1. Surface Texture support: https://github.com/flutter/flutter/issues/137639~
1a. Update: we can't do this, instead we'll add a new API and migrate flutter/packages.
2. Fragment program API support: https://github.com/flutter/flutter/issues/123741
3. Framebuffer fetch: https://github.com/flutter/flutter/issues/128911
# GLES
typedef AdaptiveThemeCallback = Object? Function(ThemeData theme, Type type, Object? defaultValue);
Object? defaultCallback(ThemeData theme, Type type, Object? defaultValue) => defaultValue;
class ThemeData {
factory ThemeData({ AdaptiveThemeCallback? callback }) {
return ThemeData.raw(callback: callback ?? defaultCallback);
}
typedef AdaptiveThemeCallback<T> = T Function(ThemeData theme, T defaultValue);
class ThemeMapper<T> {
ThemeMapper(this.callback);
final AdaptiveThemeCallback<T> callback;
Type get type => T;
T invoke(ThemeData theme, T defaultValue) {
class ThemeMapper<T> {
ThemeMapper(this.callback);
final T Function(T value) callback;
T invoke(T defaultValue) {
return callback(defaultValue);
}
}
import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';
final _random = Random();
void main() => runApp(const BackdropFilterDemo());
class BackdropFilterDemo extends StatelessWidget {