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

Commit bdd8532a authored by Stephen Hines's avatar Stephen Hines
Browse files

Fix mips-related build breakage.

Bug: http://b/34396220
Test: Builds successfully.

MIPS targets predefine _mips to 1, which will conflict with the _mips
variable name that was being used in the HAL here. Rename it to _amips
instead, so that it won't conflict.

Change-Id: Id13f34b740959852dff600259e3405eb72d0983a
parent 5af256b5
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -73,30 +73,30 @@ Return<Type> Context::allocationGetType(Allocation allocation) {
    return rs_to_hidl<Type>(_type);
}

Return<Allocation> Context::allocationCreateTyped(Type type, AllocationMipmapControl mips, int32_t usage, Ptr ptr) {
Return<Allocation> Context::allocationCreateTyped(Type type, AllocationMipmapControl amips, int32_t usage, Ptr ptr) {
    RsType _type = hidl_to_rs<RsType>(type);
    RsAllocationMipmapControl _mips = static_cast<RsAllocationMipmapControl>(mips);
    RsAllocationMipmapControl _amips = static_cast<RsAllocationMipmapControl>(amips);
    uint32_t _usage = usage;
    uintptr_t _ptr = hidl_to_rs<uintptr_t>(ptr);
    RsAllocation _allocation = Device::getHal().AllocationCreateTyped(mContext, _type, _mips, _usage, _ptr);
    RsAllocation _allocation = Device::getHal().AllocationCreateTyped(mContext, _type, _amips, _usage, _ptr);
    return rs_to_hidl<Allocation>(_allocation);
}

Return<Allocation> Context::allocationCreateFromBitmap(Type type, AllocationMipmapControl mips, const hidl_vec<uint8_t>& bitmap, int32_t usage) {
Return<Allocation> Context::allocationCreateFromBitmap(Type type, AllocationMipmapControl amips, const hidl_vec<uint8_t>& bitmap, int32_t usage) {
    RsType _type = hidl_to_rs<RsType>(type);
    RsAllocationMipmapControl _mips = static_cast<RsAllocationMipmapControl>(mips);
    RsAllocationMipmapControl _amips = static_cast<RsAllocationMipmapControl>(amips);
    const hidl_vec<uint8_t>& _bitmap = bitmap;
    uint32_t _usage = usage;
    RsAllocation _allocation = Device::getHal().AllocationCreateFromBitmap(mContext, _type, _mips, _bitmap.data(), _bitmap.size(), _usage);
    RsAllocation _allocation = Device::getHal().AllocationCreateFromBitmap(mContext, _type, _amips, _bitmap.data(), _bitmap.size(), _usage);
    return rs_to_hidl<Allocation>(_allocation);
}

Return<Allocation> Context::allocationCubeCreateFromBitmap(Type type, AllocationMipmapControl mips, const hidl_vec<uint8_t>& bitmap, int32_t usage) {
Return<Allocation> Context::allocationCubeCreateFromBitmap(Type type, AllocationMipmapControl amips, const hidl_vec<uint8_t>& bitmap, int32_t usage) {
    RsType _type = hidl_to_rs<RsType>(type);
    RsAllocationMipmapControl _mips = static_cast<RsAllocationMipmapControl>(mips);
    RsAllocationMipmapControl _amips = static_cast<RsAllocationMipmapControl>(amips);
    const hidl_vec<uint8_t>& _bitmap = bitmap;
    uint32_t _usage = usage;
    RsAllocation _allocation = Device::getHal().AllocationCubeCreateFromBitmap(mContext, _type, _mips, _bitmap.data(), _bitmap.size(), _usage);
    RsAllocation _allocation = Device::getHal().AllocationCubeCreateFromBitmap(mContext, _type, _amips, _bitmap.data(), _bitmap.size(), _usage);
    return rs_to_hidl<Allocation>(_allocation);
}

+3 −3
Original line number Diff line number Diff line
@@ -40,9 +40,9 @@ struct Context : public IContext {
    Return<Allocation> allocationAdapterCreate(Type type, Allocation baseAlloc) override;
    Return<void> allocationAdapterOffset(Allocation alloc, const hidl_vec<uint32_t>& offsets) override;
    Return<Type> allocationGetType(Allocation allocation) override;
    Return<Allocation> allocationCreateTyped(Type type, AllocationMipmapControl mips, int32_t usage, Ptr ptr) override;
    Return<Allocation> allocationCreateFromBitmap(Type type, AllocationMipmapControl mips, const hidl_vec<uint8_t>& bitmap, int32_t usage) override;
    Return<Allocation> allocationCubeCreateFromBitmap(Type type, AllocationMipmapControl mips, const hidl_vec<uint8_t>& bitmap, int32_t usage) override;
    Return<Allocation> allocationCreateTyped(Type type, AllocationMipmapControl amips, int32_t usage, Ptr ptr) override;
    Return<Allocation> allocationCreateFromBitmap(Type type, AllocationMipmapControl amips, const hidl_vec<uint8_t>& bitmap, int32_t usage) override;
    Return<Allocation> allocationCubeCreateFromBitmap(Type type, AllocationMipmapControl amips, const hidl_vec<uint8_t>& bitmap, int32_t usage) override;
    Return<NativeWindow> allocationGetNativeWindow(Allocation allocation) override;
    Return<void> allocationSetNativeWindow(Allocation allocation, NativeWindow nativewindow) override;
    Return<void> allocationSetupBufferQueue(Allocation alloc, uint32_t numBuffer) override;