This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5+ import '../../lib/gpu/lib/gpu.dart' as gpu;
56import 'package:flutter/material.dart' ;
67import 'package:flutter/foundation.dart'
78 show debugDefaultTargetPlatformOverride;
89
910void main () {
11+ // Ensure Flutter GPU symbols are available by forcing the GPU context to instantiate.
12+ try {
13+ // ignore: unnecessary_statements
14+ gpu.gpuContext; // Force the context to instantiate.
15+ } catch (e) {
16+ // If impeller is not enabled, make sure the exception isn't about symbols missing.
17+ assert (e.toString ().contains (
18+ 'Flutter GPU requires the Impeller rendering backend to be enabled.' ));
19+ }
20+
1021 // This is a hack to make Flutter think you are running on Google Fuchsia,
1122 // otherwise you will get an error about running from an unsupported platform.
1223 debugDefaultTargetPlatformOverride = TargetPlatform .fuchsia;
Original file line number Diff line number Diff line change 1313 kDartIsolateSnapshotInstructions;
1414 kDartVmSnapshotData;
1515 kDartVmSnapshotInstructions;
16+ InternalFlutterGpu*;
17+ kInternalFlutterGpu*;
1618 local:
1719 *;
1820};
You can’t perform that action at this time.
0 commit comments