Repository navigation
feat(canvas): add per-draw image tinting - #1200
Conversation
3470605 to
8ff9227
Compare
|
Reviewed.
|
8ff9227 to
f916d73
Compare
|
Rebased onto main again, with the Android runtime rebuilt. Auto-merge is off. Since dc896db on main, Before this rebase, all required checks except the Apple ones passed on f916d73. That includes |
f916d73 to
da853b3
Compare
da853b3 to
e5ce885
Compare
e5ce885 to
d92dbba
Compare
d92dbba to
6af2f00
Compare
|
Reviewed. Rebased onto main, merged the tint with main's image sampling and textured meshes (Android carries nearest and tinted in one flags byte; Windows, Apple, Linux and the web keep both the mesh texture caches and the tinted copies), and split out the HarmonyOS host change so the committed host stays in sync with its templates; HarmonyOS draws tinted images untinted for now, as the docs, roadmap and changelog fragment say. The shared tint pixel sample runs on Linux, the web, Android, the iOS simulator and Windows, and TSX recording is covered in |
6af2f00 to
f58fe64
Compare
f58fe64 to
ee0f84c
Compare
Restores the HarmonyOS part taken out of #1200: canvasOp carries the tint for tinted DrawImage ops, and the ArkTS canvas multiplies the PixelMap's bytes by it in an offscreen context, keeping the last tinted image.
Restores the HarmonyOS part taken out of #1200: canvasOp carries the tint for tinted DrawImage ops, and the ArkTS canvas multiplies the PixelMap's bytes by it in an offscreen context, keeping the last tinted image.
Refs #1111
Changes
DrawTintedImage,DrawTintedImageIn, andDrawTintedImageFromin Go, plusdrawTintedImagein TSX. Tint multiplies the source image's sRGB and alpha channels before the canvas composites it.Bind(ArgColor, ...)on a tint.Verification
HarmonyOS
The ArkTS template implements tint in a separate offscreen canvas. The committed padded host still needs to be rebuilt with OpenHarmony API 26 and tested on an emulator. The roadmap records the remaining work.