Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12246405 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

configstore: add startGraphicsAllocatorService

Add ISurfaceFlingerConfigs::startGraphicsAllocatorService to control
whether SurfaceFlinger should start IAllocator service.

Bug: 36462585
Test: boots
Change-Id: I421413673246cc7c552bc9eeeb7a9ce2783faf9e
parent 4ebd10a2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -108,4 +108,10 @@ interface ISurfaceFlingerConfigs {
     * FramebufferSurface.
     */
    maxFrameBufferAcquiredBuffers() generates(OptionalInt64 value);

    /**
     * Returns true if surface flinger should start
     * hardware.graphics.allocator@2.0::IAllocator service.
     */
    startGraphicsAllocatorService() generates(OptionalBool value);
};
+10 −0
Original line number Diff line number Diff line
@@ -112,6 +112,16 @@ Return<void> SurfaceFlingerConfigs::useVrFlinger(useVrFlinger_cb _hidl_cb) {
    return Void();
}

Return<void> SurfaceFlingerConfigs::startGraphicsAllocatorService(
    startGraphicsAllocatorService_cb _hidl_cb) {
    bool value = false;
#ifdef START_GRAPHICS_ALLOCATOR_SERVICE
    value = true;
#endif
    _hidl_cb({true, value});
    return Void();
}

}  // namespace implementation
}  // namespace V1_0
}  // namespace configstore
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ struct SurfaceFlingerConfigs : public ISurfaceFlingerConfigs {
    Return<void> hasSyncFramework(hasSyncFramework_cb _hidl_cb) override;
    Return<void> useVrFlinger(useVrFlinger_cb _hidl_cb) override;
    Return<void> maxFrameBufferAcquiredBuffers(maxFrameBufferAcquiredBuffers_cb _hidl_cb) override;
    Return<void> startGraphicsAllocatorService(
        startGraphicsAllocatorService_cb _hidl_cb) override;

    // Methods from ::android::hidl::base::V1_0::IBase follow.

+4 −0
Original line number Diff line number Diff line
@@ -50,3 +50,7 @@ endif
ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
    LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
endif

ifneq ($(SF_START_GRAPHICS_ALLOCATOR_SERVICE),)
    LOCAL_CFLAGS += -DSTART_GRAPHICS_ALLOCATOR_SERVICE
endif