Skip to content

Instantly share code, notes, and snippets.

View jonahwilliams's full-sized avatar

Jonah Williams jonahwilliams

View GitHub Profile
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct BlendInfo
{
float dst_input_alpha;
float dst_y_coord_scale;
float src_y_coord_scale;
void main() {
print(Foo(
a1: 'a',
a2: 'b',
a3: 'b',
a4: 'b',
a5: 'b',
a6: 'b',
a7: 'b',
a8: 'b',
#version 100
precision mediump float;
precision highp int;
struct GradientInfo
{
highp vec2 center;
highp float radius;
highp float tile_mode;
highp float alpha;
#version 460 core
precision highp float;
layout(location = 0) uniform float width;
layout(location = 1) uniform float height;
layout(location = 2) uniform float animation;
layout(location = 3) uniform sampler2D source;
out vec4 fragColor;
[ERROR:flutter/fml/backtrace.cc(108)] Caught signal SIGABRT during program execution.
Frame 0: 00007FF782A4B348 Unknown
Frame 1: 00007FF782A4AFEC Unknown
Frame 2: 00007FF782A49EAC Unknown
Frame 3: 00007FF782A4956C Unknown
Frame 4: 00007FF782A07DE0 Unknown
Frame 5: 00007FF782A0144D Unknown
Frame 6: 00007FF782A02FAE Unknown
Frame 7: 00007FF782DD258C Unknown
Frame 8: 00007FF9080E7034 BaseThreadInitThunk
// automatically generated by the FlatBuffers compiler, do not modify
// ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable
library impeller.fb;
import 'dart:typed_data' show Uint8List;
import 'package:flat_buffers/flat_buffers.dart' as fb;
class Stage {
@jonahwilliams
jonahwilliams / main.dart
Last active October 4, 2022 22:11
Smart-er image provider
class SmartFileProvider extends ImageProvider<SmartFileProvider> {
const SmartFileProvider({required this.file, this.scale = 1.0});
/// The file to decode into an image.
final File file;
/// The scale to place in the [ImageInfo] object of the image.
final double scale;
static const int _kMaxFileSize = 2147483647; /* exercise left for the reader */
@jonahwilliams
jonahwilliams / main.dart
Created October 4, 2022 19:44
Animated Sampler
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
This file has been truncated, but you can view the full file.
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"><defs><linearGradient id="g1" x1="0" y1="-425" x2="43.4" y2="-499.828" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FF9123"/><stop offset="1" stop-color="#FF552D"/></linearGradient><linearGradient id="g10" x1="0" y1="-825" x2="43.4" y2="-899.828" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FF9123"/><stop offset="1" stop-color="#FF552D"/></linearGradient><linearGradient id="g11" x1="0" y1="-625" x2="43.4" y2="-699.828" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FF9123"/><stop offset="1" stop-color="#FF552D"/></linearGradient><linearGradient id="g12" x1="0" y1="-725" x2="60.76" y2="-829.759" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FF9123"/><stop offset="1" stop-color="#FFEB6E"/></linearGradient><linearGradient id="g13" x1="0" y1="-425" x2="43.4" y2="-499.828" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FF552D"/><stop offset="1" stop-color="#FF552D"/></linearGradient><lin
@jonahwilliams
jonahwilliams / main.dart
Created August 11, 2022 00:35
GPU vs IO image
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:developer';
import 'package:http/http.dart' as http;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';