Comments (10)
from flutter.
The cl that made png compression work for skia had unit tests at the skia layer and an integration test that just make sure it didn't error. There may be a different integration problem that the current tests don't cover. I'll give it a look on monday, thanks for the reproduction code.
from flutter.
The CL's are listed in this PR if you want to poke around before monday: flutter/engine#53182
from flutter.
The CL's are listed in this PR if you want to poke around before monday: flutter/engine#53182
Yes, I updated the master branch this morning. The latest code includes this PR, and then I encountered this error.
from flutter.
Thanks for the report. Reproduced this issue on master channel while it works as expected on stable 3.22.2. If I disable Impeller, issue does not appear.
flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.1 23B74 darwin-x64, locale en-VN)
• Flutter version 3.22.2 on channel stable at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 761747bfc5 (31 hours ago), 2024-06-05 22:15:13 +0200
• Engine revision edd8546116
• Dart version 3.4.3
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode15.3.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.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
• android-studio-dir = /Applications/Android Studio.app/
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
[✓] VS Code (version 1.89.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.90.0
[✓] Connected device (3 available)
• iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios • iOS 15.8 19H370
• macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.142
[✓] Network resources
• All expected network resources are available.
• No issues found!
[!] Flutter (Channel master, 3.23.0-13.0.pre.168, on macOS 14.1 23B74 darwin-x64, locale en-VN)
• Flutter version 3.23.0-13.0.pre.168 on channel master at /Users/huynq/Documents/GitHub/flutter_master
! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 32081aab69 (34 hours ago), 2024-06-08 10:35:21 -0700
• Engine revision 1cdbebee19
• Dart version 3.5.0 (build 3.5.0-236.0.dev)
• DevTools version 2.36.0
• 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 34.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode15.3.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.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
• android-studio-dir = /Applications/Android Studio.app/
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
[✓] VS Code (version 1.89.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.90.0
[✓] Connected device (4 available)
• Pixel 7 (mobile) • 2B171FDH20084L • android-arm64 • Android 14 (API 34)
• iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios • iOS 15.8 19H370
• macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.142
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
from flutter.
@gaaclarke assigning to you to investigate.
from flutter.
- I tweaked the skcms change to always return a solid color, but the png is still wrong, having, being vertical lines of red. So, so the error isn't in the skcms change.
- It's weird that the png still has the form. This suggests that the alpha channels and stride are correct.
- I audited the skia CL too, and it doesn't really do much. There isn't much room for there to be a bug. It almost seems like there is some switch statement's default branch we are hitting, the bug is not in the changed code but code that wasn't changed.
from flutter.
There is one bug in skcms but fixing it doesn't solve the weird artifacts we are seeing. I misread the spec and the lowest 6 bits are padding, not the highest. So the following change is needed:
diff --git a/modules/skcms/src/Transform_inl.h b/modules/skcms/src/Transform_inl.h
index b9c27ac395..31259e3d6d 100644
--- a/modules/skcms/src/Transform_inl.h
+++ b/modules/skcms/src/Transform_inl.h
@@ -903,14 +903,14 @@ STAGE(load_101010x_XR, NoCtx) {
}
STAGE(load_10101010_XR, NoCtx) {
- static constexpr float min = -0.752941f;
- static constexpr float max = 1.25098f;
- static constexpr float range = max - min;
+ // static constexpr float min = -0.752941f;
+ // static constexpr float max = 1.25098f;
+ // static constexpr float range = max - min;
U64 rgba = load<U64>(src + 8*i);
- r = cast<F>((rgba >> 0) & 0x3ff) * (1/1023.0f) * range + min;
- g = cast<F>((rgba >> 16) & 0x3ff) * (1/1023.0f) * range + min;
- b = cast<F>((rgba >> 32) & 0x3ff) * (1/1023.0f) * range + min;
- a = cast<F>((rgba >> 48) & 0x3ff) * (1/1023.0f) * range + min;
+ r = (cast<F>((rgba >> (0+6)) & 0x3ff) - 384.f) / 510.f;
+ g = (cast<F>((rgba >> (16+6)) & 0x3ff) - 384.f) / 510.f;
+ b = (cast<F>((rgba >> (32+6)) & 0x3ff) - 384.f) / 510.f;
+ a = (cast<F>((rgba >> (48+6)) & 0x3ff) - 384.f) / 510.f;
}
from flutter.
Okay, got it working, skia also needed this:
--- a/src/encode/SkImageEncoderFns.h
+++ b/src/encode/SkImageEncoderFns.h
@@ -138,7 +138,7 @@ static inline void transform_scanline_bgr_101010x_xr(char* dst, const char* src,
static inline void transform_scanline_bgra_10101010_xr(char* dst, const char* src, int width, int) {
skcms(dst, src, width,
skcms_PixelFormat_BGRA_10101010_XR, skcms_AlphaFormat_Unpremul,
- skcms_PixelFormat_RGB_161616BE, skcms_AlphaFormat_Unpremul);
+ skcms_PixelFormat_RGBA_16161616BE, skcms_AlphaFormat_Unpremul);
}
I'll get everything cleaned up and beef up the tests to get this landed.
from flutter.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
from flutter.
Related Issues (20)
- GPU access using engine built with `--disable-desktop-embeddings` HOT 2
- Replace Moto G4's attached to Windows prod hosts with mokey's HOT 4
- `Unexpected null value` error appears when running multiView on Flutter Web HOT 14
- mac-8 lost external connection phone device. HOT 2
- Navigating from A to B (which has a nav bar) - HOW? (Typed-routing) HOT 3
- linux-35 lost external connection phone device. HOT 2
- Flutter web can not run in flutter 3.24 HOT 9
- Using Platform Views simultaneously in multiple engines causes a crash. HOT 6
- Assets/ should include all subfolders HOT 14
- AppBar leading back button's icon is rendered incorrectly in RTL layout HOT 3
- EXCEPTION CAUGHT BY WIDGETS LIBRARY HOT 5
- Black border appears in Windows window layering penetration HOT 3
- [version 3.24] ThemeData's hintColor not working in TextField, which was working in version 3.22.x HOT 6
- Flutter create bundle identifier should be the same across all platforms HOT 4
- [Impeller] Shaders on a Transform throws: Requested texture size (x, y) exceeds maximum supported size of (8192, 8192) HOT 3
- Flutter Web throws "TypeError: Cannot read properties of undefined" in counter app HOT 13
- CupertinoListTile animations are not running when pressing longer HOT 3
- Add onChanged and autoPlay to CarouselView HOT 4
- [version 3.24] checkerboardOffscreenLayers not working in 3.24, which was working in version 3.22.x HOT 5
- [Impeller] [Android] Native views not rendering on some devices HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.