How Android Apps Handle Real-Time Local Processing
Android's on-device machine learning stack lets apps run inference, image recognition, and text processing locally without sending data to servers, reducing latency and protecting privacy.
Shopify2023-10-18Announcement
React Native WebGPU and React Native Skia are presented as a graphics stack for advanced 2D, 3D, and general-purpose GPU workloads in native applications. The work uses Skia Graphite with Dawn, Google’s open-source WebGPU implementation, to replace separate OpenGL and Metal backend implementations with a unified architecture, while enabling Three.js, React Three Fiber, TensorFlow.js, and compute shaders. Three.js Shading Language lets the same shaders target WebGPU and WebGL, and Shopify’s Black Friday globe prototypes run natively with identical results to the web version. Architectural changes in React Native Skia moved from a mutable SkiaDOM to an immutable fabric reconciler, producing reported animation gains of up to 50% on iOS and nearly 200% on Android, plus 98% of reported Android crashes fixed. Graphite remains experimental, but adds dedicated-thread canvases and bidirectional 2D/3D composition, while Skia also supports macOS, tvOS, and headless Node.js rendering.
React Native Skia users are pushing the boundaries of 2D graphics, while its separate OpenGL and Metal implementations require backend-related features to be built twice. The work also addresses the need to bring modern GPU APIs, web ecosystem symmetry, general-purpose GPU computation, and improved animation performance to React Native.
The work introduces Skia Graphite with Dawn, Google’s open-source WebGPU implementation, and uses WebGPU to support Three.js, React Three Fiber, compute shaders, and TensorFlow.js. React Native Skia also moved from the mutable C++ SkiaDOM and paper reconciler to an immutable fabric reconciler, added macOS, tvOS, and headless Node.js support, and enabled dedicated-thread canvases and 2D/3D composition.
Skia Graphite provides a WebGPU-compatible Skia backend, but it is still experimental and can be tested through a React Native Skia flag.
Three.js Shading Language allows shaders to target WebGPU and WebGL from one codebase; Shopify prototypes ran Black Friday globe shaders natively with results identical to the web version.
The immutable fabric reconciler delivered reported animation improvements of up to 50% on iOS and nearly 200% on Android, while fixing 98% of reported Android crashes.
Summaries are generated from the original by a language model. Check the original before relying on it.
See the idea
Android's on-device machine learning stack lets apps run inference, image recognition, and text processing locally without sending data to servers, reducing latency and protecting privacy.
Keep reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
One useful email. Unsubscribe anytime.