Use BGRA format for sprite
This change converts the SpriteController pixel format from RGBA to BGRA, and changes the bitmap icon format similarly. This conversion affects the format of the buffer that is allocated for the SpriteController's surface, but does not result in any user-facing changes to the appearance of the sprite. The BGRA format is required for the cursor to be presented on the cursor plane (instead of e.g. an overlay plane.) To support the BGRA format, this change also introduces ANDROID_BITMAP_FORMAT_BGRA_8888 as an anonymous enum member, and cases are added where appropriate. It is not directly added as a member of AndroidBitmapFormat because it is only inteded for internal usage, and doing so in this manner prevents it from being exposed in the Android API. Bug: b/371003205 Flag: com.android.graphics.libgui.flags.cursor_plane_compatibility (cherry picked from https://android-review.googlesource.com/q/commit:a22a92b690324a6d7abb52d60130e37454426940) Change-Id: I58911d7ab40ff0637efb47a7115c84eb03a2d824
Loading
Please register or sign in to comment