-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Steps to reproduce
When investigating #144307 (comment), I discovered a typo in a log message in context_vk.cc.
I believe the source of the typo is at:
https://github.com/flutter/engine/blob/a9a6f598f0072e7a5712372efb87953f26f0bf34/impeller/renderer/backend/vulkan/context_vk.cc#L290
It should be relatively straightforward to fix, but I have no experience compiling/linking/testing the c++ code. So, filing an issue in case someone more familiar with the compile process would like to address it sooner than I can.
Expected results
I/flutter (27134): [INFO:flutter/impeller/renderer/backend/vulkan/context_vk.cc(290)] Dedicated transfer queue not available.
Actual results
I/flutter (27134): [INFO:flutter/impeller/renderer/backend/vulkan/context_vk.cc(290)] Dedicated transfer queue not avialable.
Code sample
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(const MaterialApp(
title: 'Navigation Basics',
home: FirstRoute(),
));
}
class FirstRoute extends StatefulWidget {
const FirstRoute({super.key});
@override
State<FirstRoute> createState() => _FirstRouteState();
}
class _FirstRouteState extends State<FirstRoute> {
@override
void initState() {
super.initState();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
}
@override
Widget build(BuildContext context) {
print('${DateTime.now().millisecondsSinceEpoch}: Building first route');
var widget = Scaffold(
appBar: AppBar(
title: const Text('First Route'),
),
body: Center(
child: ElevatedButton(
child: const Text('Open route'),
onPressed: () {
_navigateToSecondPage(context);
// _navigateToSecondPageAsync(context);
}
)
)
);
print('${DateTime.now().millisecondsSinceEpoch}: Done building first route');
return widget;
}
_navigateToSecondPage(BuildContext context) {
print('${DateTime.now().millisecondsSinceEpoch}: Pushing second route');
// Navigator.push returns a Future that completes after calling
// Navigator.pop on the Selection Screen.
// See: https://docs.flutter.dev/cookbook/navigation/returning-data#2-add-a-button-that-launches-the-selection-screen
Navigator.push(
context,
// Create the SelectionScreen in the next step.
MaterialPageRoute(builder: (context) => const SecondRoute()),
);
print('${DateTime.now().millisecondsSinceEpoch}: Done pushing second route');
}
Future<void> _navigateToSecondPageAsync(BuildContext context) async {
print('${DateTime.now().millisecondsSinceEpoch}: Pushing second route async');
// Navigator.push returns a Future that completes after calling
// Navigator.pop on the Selection Screen.
// See: https://docs.flutter.dev/cookbook/navigation/returning-data#2-add-a-button-that-launches-the-selection-screen
await Navigator.push(
context,
// Create the SelectionScreen in the next step.
MaterialPageRoute(builder: (context) => const SecondRoute()),
);
print('${DateTime.now().millisecondsSinceEpoch}: Done pushing second route async');
}
}
class SecondRoute extends StatefulWidget {
const SecondRoute({super.key});
@override
State<SecondRoute> createState() => _SecondRouteState();
}
class _SecondRouteState extends State<SecondRoute> {
var _orientation = 0;
@override
void initState() {
super.initState();
print('${DateTime.now().millisecondsSinceEpoch}: Setting landscape orientation');
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
print('${DateTime.now().millisecondsSinceEpoch}: Done setting landscape orientation');
}
@override
void dispose() {
super.dispose();
print('${DateTime.now().millisecondsSinceEpoch}: Setting portrait orientation');
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
print('${DateTime.now().millisecondsSinceEpoch}: Done setting portrait orientation');
}
@override
Widget build(BuildContext context) {
_toggleOrientation();
print('${DateTime.now().millisecondsSinceEpoch}: Building second route');
var widget = Scaffold(
appBar: AppBar(
title: const Text('Second Route'),
),
body: Container(
margin: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
ElevatedButton(
child: const Text('Go back!'),
onPressed: () {
print('${DateTime.now().millisecondsSinceEpoch}: Popping second route');
Navigator.pop(context);
print('${DateTime.now().millisecondsSinceEpoch}: Done popping second route');
}
),
ElevatedButton(
child: const Text('Just rotate!'),
onPressed: () {
setState(() {
if (_orientation == 0) {
_orientation = 1;
} else {
_orientation = 0;
}
});
}
)
]
)
)
);
print('${DateTime.now().millisecondsSinceEpoch}: Done building second route');
return widget;
}
_toggleOrientation() {
print('${DateTime.now().millisecondsSinceEpoch}: Togging orientation ${_orientation == 1 ? "portrait" : "landscape"}');
if (_orientation == 1) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
} else {
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft,
]);
}
print('${DateTime.now().millisecondsSinceEpoch}: Done toggling orientation');
}
}Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
aunching lib/main.dart on SM S918U1 in profile mode...
Running Gradle task 'assembleProfile'...
✓ Built build/app/outputs/flutter-apk/app-profile.apk (210.7MB)
I/flutter (27134): [INFO:flutter/impeller/renderer/backend/vulkan/capabilities_vk.cc(54)] Vulkan validations are enabled.
I/flutter (27134): [INFO:flutter/impeller/renderer/backend/vulkan/context_vk.cc(290)] Dedicated transfer queue not avialable.
I/flutter (27134): [IMPORTANT:flutter/shell/platform/android/android_context_vulkan_impeller.cc(64)] Using the Impeller rendering backend (Vulkan with Validation Layers).
I/flutter (27134): A message on the flutter/lifecycle channel was discarded before it could be handled.
I/flutter (27134): This happens when a plugin sends messages to the framework side before the framework has had an opportunity to register a listener. See the ChannelBuffers API documentation for details on how to configure the channel to expect more messages, or to expect messages to get discarded:
I/flutter (27134): https://api.flutter.dev/flutter/dart-ui/ChannelBuffers-class.html
I/flutter (27134): The capacity of the flutter/lifecycle channel is 1 message.
I/flutter (27134): A message on the flutter/lifecycle channel was discarded before it could be handled.Flutter Doctor output
Doctor output
[!] Flutter (Channel main, 3.22.0-13.0.pre.13, on macOS 14.4.1 23E224 darwin-arm64, locale en)
• Flutter version 3.22.0-13.0.pre.13 on channel main at /Users/mossman/Development/projects/flutter
! Upstream repository git@github.com:mossmana/flutter.git is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to git@github.com:mossmana/flutter.git to dismiss this error.
• Framework revision cd43d06c44 (2 days ago), 2024-04-17 11:43:37 -0400
• Engine revision 25b09e883d
• Dart version 3.5.0 (build 3.5.0-70.0.dev)
• DevTools version 2.35.0-dev.8
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/mossman/Development/android
• Platform android-34, build-tools 33.0.1
• ANDROID_HOME = /Users/mossman/Development/android
• Java binary at: /Applications/Android Studio Iguana.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
! Flutter recommends a minimum Xcode version of 15.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio Iguana.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
[✓] VS Code (version 1.87.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.86.0
[✓] Connected device (4 available)
• SM S918U1 (mobile) • R5CW13NKMPV • android-arm64 • Android 14 (API 34)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.4.1 23E224 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.4.1 23E224 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.60
[✓] Network resources
• All expected network resources are available.