Confused about PixelFormat

前端 未结 3 1519
孤街浪徒
孤街浪徒 2021-02-02 00:00

I\'m confused about PixelFormat on Android.

My device is Motorola Defy.

I have two questions:

  • On Android 2.3 getWindowManager().getDefaultDi
3条回答
  •  自闭症患者
    2021-02-02 00:28

    According to this thread on the motodev forums, the return value 5 corresponds to RGBA_8888. The thread states that the documentation for PixelFormat is incomplete and outdated, and links to a bug that was filed for it. However, the link to that bug now returns a 404.

    Additionally, I could not seem to find any thing in the PixelFormat source code(4.1) that supports that claim, as over there RGBA_8888 is assigned the value 1.

    My guess is that this value is specific to Motorola and some other devices, as I am seeing the same output on my Nexus 7 and Galaxy Nexus.

    EDIT: I emailed a Google employee about this, and he told me that 5 corresponded to BGRA_8888, as indicated in MH's answer and the Motorola forum thread I linked to earlier. He recommended that I file a bug for the documentation problem, which I have done. Please star the bug report so that action is taken sooner rather than later.

提交回复
热议问题