This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct FragInfo | |
{ | |
vec2 start_point; | |
vec2 end_point; | |
float tile_mode; | |
float texture_sampler_y_coord_scale; | |
float alpha; | |
vec2 half_texel; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <metal_stdlib> | |
#include <simd/simd.h> | |
using namespace metal; | |
struct FragInfo | |
{ | |
float2 start_point; | |
float2 end_point; | |
float tile_mode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:ui' as ui; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
Future<ui.Image> loadImageFromAsset(String assetName) async { | |
if (kIsWeb) { | |
WidgetsFlutterBinding.ensureInitialized(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart | |
index 81dd56d75e..bea3526d4d 100644 | |
--- a/packages/flutter_tools/lib/src/asset.dart | |
+++ b/packages/flutter_tools/lib/src/asset.dart | |
@@ -413,8 +413,7 @@ class ManifestAssetBundle implements AssetBundle { | |
// For all platforms, include the shaders unconditionally. They are | |
// small, and whether they're used is determined only by the app source | |
// code and not by the Flutter manifest. | |
- if (targetPlatform != TargetPlatform.web_javascript) | |
- ..._getMaterialShaders(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ui' as ui show window; | |
import 'package:flutter/material.dart'; | |
void main() { | |
final binding = WidgetsFlutterBinding.ensureInitialized(); | |
ui.window.onPointerDataPacket = null; | |
var root = MediaQuery.fromWindow( | |
child: Directionality( | |
textDirection: TextDirection.ltr, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/web_ui/lib/src/engine/canvaskit/painting.dart b/lib/web_ui/lib/src/engine/canvaskit/painting.dart | |
index 8cd9fc1ab8..3f7e536ac4 100644 | |
--- a/lib/web_ui/lib/src/engine/canvaskit/painting.dart | |
+++ b/lib/web_ui/lib/src/engine/canvaskit/painting.dart | |
@@ -423,11 +423,12 @@ class CkFragmentProgram implements ui.FragmentProgram { | |
if (type == UniformType.SampledImage) { | |
textureCount += 1; | |
} else { | |
+ final Object? rows = rawUniformData['rows']; | |
final Object? bitWidth = rawUniformData['bit_width']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart | |
index ea0104f8ef..44e5110df1 100644 | |
--- a/packages/flutter_tools/lib/src/asset.dart | |
+++ b/packages/flutter_tools/lib/src/asset.dart | |
@@ -412,8 +412,7 @@ class ManifestAssetBundle implements AssetBundle { | |
// For all platforms, include the shaders unconditionally. They are | |
// small, and whether they're used is determined only by the app source | |
// code and not by the Flutter manifest. | |
- if (targetPlatform != TargetPlatform.web_javascript) | |
- ..._getMaterialShaders(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExpensivePainter extends CustomPainter { | |
@override | |
void paint(Canvas canvas, Size size) { | |
final double boxWidth = size.width / 50; | |
final double boxHeight = size.height / 50; | |
for (int i = 0; i < 50; i++) { | |
for (int j = 0; j < 50; j++) { | |
final Rect rect = Rect.fromLTWH(i * boxWidth, j * boxHeight, boxWidth, boxHeight); | |
canvas.drawRect(rect, Paint() | |
..style = PaintingStyle.fill |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 120 | |
#ifdef GL_ARB_shading_language_420pack | |
#extension GL_ARB_shading_language_420pack : require | |
#endif | |
struct FragInfo | |
{ | |
vec2 texture_size; | |
vec2 direction; | |
float texture_sampler_y_coord_scale; |