diff options
author | Jason Macnak <natsu@google.com> | 2022-01-28 15:18:49 -0800 |
---|---|---|
committer | Jason Macnak <natsu@google.com> | 2022-01-28 15:18:49 -0800 |
commit | b5e6d0b579f8e7d01932ca0bc67ef398fad7aac5 (patch) | |
tree | c719f3ec98298ed0b57379c2ee6c506c1ff598f9 | |
parent | 5c653761dbbbc131159892682a5850630f80d6cf (diff) | |
download | goldfish-opengl-b5e6d0b579f8e7d01932ca0bc67ef398fad7aac5.tar.gz |
Avoid an extra copy for RGBA layers
... as the "conversion" would just be a DoCopy().
Bug: b/213913429
Test: cvd start --gpu_mode=guest_swiftshader
Test: android.hardware.camera2.cts.RecordingTest#testVideoSnapshot[1]
Change-Id: I89fb947d05d246ee93a407528df153a2ae2cdfcd
-rw-r--r-- | system/hwc2/GuestComposer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system/hwc2/GuestComposer.cpp b/system/hwc2/GuestComposer.cpp index f1bdfe61..a807d10b 100644 --- a/system/hwc2/GuestComposer.cpp +++ b/system/hwc2/GuestComposer.cpp @@ -908,7 +908,8 @@ HWC2::Error GuestComposer::composeLayerInto( BufferSpec srcLayerSpec = *srcLayerSpecOpt; // TODO(jemoreira): Remove the hardcoded fomat. - bool needsConversion = srcLayerSpec.drmFormat != DRM_FORMAT_XBGR8888; + bool needsConversion = srcLayerSpec.drmFormat != DRM_FORMAT_XBGR8888 && + srcLayerSpec.drmFormat != DRM_FORMAT_ABGR8888; bool needsScaling = LayerNeedsScaling(*srcLayer); bool needsRotation = rotation != libyuv::kRotate0; bool needsTranspose = needsRotation && rotation != libyuv::kRotate180; |