Hi All,
I am attempting to build aosp (8.0.0_r34) for a sim config that is still
using HWC1. I am getting the following build error for FramebufferSurface
because it is using HWCompser::setClientTarget() outside of the #ifdef
USE_HWC2 check. setClientTarget() is a function signature defined for HWC2
only (see HWComposer.h and HWComposer_hwc1.h).
<console snipppet>
frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp:180:18:
error: no member named 'setClientTarget' in 'android::HWComposer'
mHwc.setClientTarget(mDisplayType, outSlot, outFence,
outBuffer, outDataspace);
~~~~ ^
frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp:180:48:
error: use of undeclared identifier 'outSlot'
mHwc.setClientTarget(mDisplayType, outSlot, outFence,
outBuffer, outDataspace);
^
frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp:180:78:
error: use of undeclared identifier 'outDataspace'
mHwc.setClientTarget(mDisplayType, outSlot, outFence,
outBuffer, outDataspace);
^
3 errors generated.
[ 80% 38974/48129] //frameworks/base:libplatformprotos clang++
.intermediates/frameworks/base/libplatformprotos/linux_x86_64_static/gen/proto/frameworks/base/core/proto/android/providers/settings.pb.cc
[linux]
ninja: build stopped: subcommand failed.
16:17:08 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
<end console snipppet>
Running git annotate on FramebufferSurface.cpp, I can see that the below
commit moved the setClientTarget() call from
FramebufferSurface::advanceFrame() to FramebufferSurface::nextBuffer(), but
it looks like it should have been placed within the USE_HWC2 guard. I was
able to go around the error by doing just that.
commit 281e8113d0ce20c702e847caf971663021eb65e3
Communicate composition buffer dataspace to HWC
Test: adb shell dumpsys SurfaceFlinger
look for dataspace info in DisplayDevice section
Bug: 63146977
Change-Id: If427171994fbc91faacf5bad9cc736ddfbd35ec3
(cherry picked from commit 79d272442ce13418c3ea81c95d7fea0159b4b481)
It doesn't look like placing the setClientTarget() call outside of the
USE_HWC2 guard was intentional, but as I have little knowledge of
surfaceflinger internals, I thought to raise the question. The workaround
means on HWC1 builds, FramebufferSurface::nextBuffer() will just return
NO_ERROR but I have yet to complete my build to see if this works. I have
also not found any bug reports or active reviews related to this.
Any thoughts?
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.