summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-08-09 05:12:28 +0200
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-08-09 05:12:28 +0200
commit14a52ccf1b7518df9fd397788cf99a12d2eb7021 (patch)
tree364abd79e0c8ea200089fd6e31c4da4a3c01b908
parentSnap for 4939473 from f2c45419d68cc7a22492c33c63c3f726bb4067d8 to qt-release (diff)
parentMerge "Revert "Build and use minadbd as a shared library."" am: 08cf9ccb2f am: 60e218cb5e am: 60fafd50d3 (diff)
downloadandroid_bootable_recovery-14a52ccf1b7518df9fd397788cf99a12d2eb7021.tar
android_bootable_recovery-14a52ccf1b7518df9fd397788cf99a12d2eb7021.tar.gz
android_bootable_recovery-14a52ccf1b7518df9fd397788cf99a12d2eb7021.tar.bz2
android_bootable_recovery-14a52ccf1b7518df9fd397788cf99a12d2eb7021.tar.lz
android_bootable_recovery-14a52ccf1b7518df9fd397788cf99a12d2eb7021.tar.xz
android_bootable_recovery-14a52ccf1b7518df9fd397788cf99a12d2eb7021.tar.zst
android_bootable_recovery-14a52ccf1b7518df9fd397788cf99a12d2eb7021.zip
-rw-r--r--minui/Android.bp2
-rw-r--r--minui/graphics_drm.cpp10
2 files changed, 8 insertions, 4 deletions
diff --git a/minui/Android.bp b/minui/Android.bp
index 19d28be62..31022e1d6 100644
--- a/minui/Android.bp
+++ b/minui/Android.bp
@@ -35,7 +35,7 @@ cc_library {
whole_static_libs: [
"libadf",
"libdrm",
- "libsync_recovery",
+ "libsync",
],
shared_libs: [
diff --git a/minui/graphics_drm.cpp b/minui/graphics_drm.cpp
index 9336a1e63..630b80180 100644
--- a/minui/graphics_drm.cpp
+++ b/minui/graphics_drm.cpp
@@ -117,12 +117,16 @@ GRSurfaceDrm* MinuiBackendDrm::DrmCreateSurface(int width, int height) {
uint32_t format;
PixelFormat pixel_format = gr_pixel_format();
+ // PixelFormat comes in byte order, whereas DRM_FORMAT_* uses little-endian
+ // (external/libdrm/include/drm/drm_fourcc.h). Note that although drm_fourcc.h also defines a
+ // macro of DRM_FORMAT_BIG_ENDIAN, it doesn't seem to be actually supported (see the discussion
+ // in https://lists.freedesktop.org/archives/amd-gfx/2017-May/008560.html).
if (pixel_format == PixelFormat::ABGR) {
- format = DRM_FORMAT_ABGR8888;
+ format = DRM_FORMAT_RGBA8888;
} else if (pixel_format == PixelFormat::BGRA) {
- format = DRM_FORMAT_BGRA8888;
+ format = DRM_FORMAT_ARGB8888;
} else if (pixel_format == PixelFormat::RGBX) {
- format = DRM_FORMAT_RGBX8888;
+ format = DRM_FORMAT_XBGR8888;
} else {
format = DRM_FORMAT_RGB565;
}