Chuyển đến nội dung chính

Bài đăng

Hiển thị các bài đăng có nhãn Vulkan

Hybrid Composition++: sửa platform view Android hết jank

Nhúng WebView hoặc Google Map từng là đánh đổi: Virtual Display (rét hình, input lạ) hoặc Hybrid Composition (CPU cao hơn). Hybrid Composition++ (HCPP) để Android tự compositing layer qua Vulkan hardware-buffer swapchain và SurfaceControl transaction, đồng bộ với frame Flutter. Bật HCPP < meta-data android:name = "io.flutter.embedding.android.EnableHcpp" android:value = "true" /> Hoặc chạy --enable-hcpp . Không có API Dart mới — platform view hiện có được nâng cấp. Yêu cầu và giới hạn Bị chặn bởi API level và phần cứng; không phải máy nào cũng dùng được dù đã opt-in. Nội dung SurfaceView trở nên khả thi — mode cũ rất khó. Sẽ thành mặc định sau này — hãy validate luồng map/WebView sản phẩm ngay. Đo gì FPS scroll bên trong WebView /map, không chỉ list Flutter quanh nó. Độ chính xác chạm gần mép view nhúng. Bàn phím show/hide đè lên platform view. Nếu vẫn rét hình, kiểm tra cờ có trong manifest đã build (flavor có thể ghi đè) và m...

Hybrid Composition++: fixing Android platform views without the jank

Embedding a WebView or Google Map used to force a tradeoff: Virtual Display (tearing, input quirks) or Hybrid Composition (higher CPU). Hybrid Composition++ (HCPP) lets Android own layer compositing through Vulkan hardware-buffer swapchains and SurfaceControl transactions, synchronized with the Flutter frame. Enable HCPP < meta-data android:name = "io.flutter.embedding.android.EnableHcpp" android:value = "true" /> Or run with --enable-hcpp . There is no new Dart API — existing platform views upgrade. Requirements and limits API level and hardware support gates apply; not every device can use HCPP even when opted in. SurfaceView -based content becomes realistic, which older modes struggled with. Expect this to become the default rendering mode later — validate your maps/WebView product flows now. What to measure Scroll FPS inside a WebView or map, not only the Flutter list around it. Touch accuracy near the edges of the embedded vie...