GrapheneOS / Camera

Modern camera app focused on privacy and security with QR & barcode scanning.
https://grapheneos.org/
MIT License
849 stars 86 forks source link

Support QR mode for devices with hardware acceleration enabled #439

Closed MHShetty closed 2 months ago

MHShetty commented 3 months ago

This PR aims to support QR for devices with hardware acceleration enabled

(Needs testing on a device where the issue #373 is currently being faced on the main branch)

muhomorr commented 3 months ago

Why do you think the linked issue is due to hardware acceleration? Which kind of hardware acceleration are you referring to?

thestinger commented 3 months ago

I think it refers to the layer acceleration.

MHShetty commented 3 months ago

Why do you think the linked issue is due to hardware acceleration? Which kind of hardware acceleration are you referring to?

I wasn't able to find a reference in the official docs directly pointing to PorterDuff.Mode.CLEAR regarding this issue, however there are multiple threads on the internet regarding this issue pointing out to the same thing, including this comment made by an official Google ID (with another fix to this issue) - https://issuetracker.google.com/issues/179644462#comment3

I think it refers to the layer acceleration.

Yes, we're referring to hardware layer rendering mode that devices could have enabled for smoother and faster rendering which seems to be causing PorterDuff.Mode.CLEAR xferMode to not work as expected

However, we might still want to test if this fixes the issue on any device was previously facing to confirm that it helps fix the QR mode on devices where hardware acceleration is enabled by default.