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

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

graphics: add gralloc tests to VTS

Test: vts-tradefed run vts -m HalGraphicsAllocatorHidlTargetTest
Test: vts-tradefed run vts -m HalGraphicsMapperHidlTargetTest
Change-Id: I35e03b42e693da1bd3cfc6beac2a64771e0b8ed9
parent 98f99cf4
Loading
Loading
Loading
Loading

graphics/Android.mk

0 → 100644
+19 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := $(call my-dir)

include $(call all-subdir-makefiles)
+19 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := $(call my-dir)

include $(call all-subdir-makefiles)
+169 −0
Original line number Diff line number Diff line
component_class: HAL_HIDL
component_type_version: 2.0
component_name: "IAllocatorClient"

package: "android.hardware.graphics.allocator"

import: "android.hardware.graphics.allocator@2.0::types"
import: "android.hardware.graphics.common@1.0::types"

interface: {
    attribute: {
        name: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient::BufferDescriptorInfo"
        type: TYPE_STRUCT
        struct_value: {
            name: "width"
            type: TYPE_SCALAR
            scalar_type: "uint32_t"
        }
        struct_value: {
            name: "height"
            type: TYPE_SCALAR
            scalar_type: "uint32_t"
        }
        struct_value: {
            name: "layerCount"
            type: TYPE_SCALAR
            scalar_type: "uint32_t"
        }
        struct_value: {
            name: "format"
            type: TYPE_ENUM
            predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
        }
        struct_value: {
            name: "producerUsageMask"
            type: TYPE_SCALAR
            scalar_type: "uint64_t"
        }
        struct_value: {
            name: "consumerUsageMask"
            type: TYPE_SCALAR
            scalar_type: "uint64_t"
        }
    }

    api: {
        name: "createDescriptor"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
        }
        return_type_hidl: {
            type: TYPE_SCALAR
            scalar_type: "uint64_t"
        }
        arg: {
            type: TYPE_STRUCT
            predefined_type: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient::BufferDescriptorInfo"
        }
        callflow: {
            entry: true
        }
        callflow: {
            next: "*"
        }
    }

    api: {
        name: "destroyDescriptor"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
        }
        arg: {
            type: TYPE_SCALAR
            scalar_type: "uint64_t"
        }
        callflow: {
            exit: true
        }
        callflow: {
            next: "*"
        }
    }

    api: {
        name: "testAllocate"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
        }
        arg: {
            type: TYPE_VECTOR
            vector_value: {
                type: TYPE_SCALAR
                scalar_type: "uint64_t"
            }
        }
        callflow: {
            next: "allocate"
        }
    }

    api: {
        name: "allocate"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
        }
        return_type_hidl: {
            type: TYPE_VECTOR
            vector_value: {
                type: TYPE_SCALAR
                scalar_type: "uint64_t"
            }
        }
        arg: {
            type: TYPE_VECTOR
            vector_value: {
                type: TYPE_SCALAR
                scalar_type: "uint64_t"
            }
        }
        callflow: {
            next: "exportHandle"
        }
    }

    api: {
        name: "free"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
        }
        arg: {
            type: TYPE_SCALAR
            scalar_type: "uint64_t"
        }
        callflow: {
            exit: true
        }
        callflow: {
            next: "*"
        }
    }

    api: {
        name: "exportHandle"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
        }
        return_type_hidl: {
            type: TYPE_HANDLE
        }
        arg: {
            type: TYPE_SCALAR
            scalar_type: "uint64_t"
        }
        arg: {
            type: TYPE_SCALAR
            scalar_type: "uint64_t"
        }
        callflow: {
            next: "free"
        }
    }

}
+19 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := $(call my-dir)

include $(LOCAL_PATH)/functional/vts/testcases/hal/graphics/allocator/hidl/target/Android.mk
+4 −0
Original line number Diff line number Diff line
@@ -31,7 +31,11 @@ cc_test {
    ],
    static_libs: ["libgtest"],
    cflags: [
        "--coverage",
        "-O0",
        "-g",
    ],
    ldflags: [
        "--coverage",
    ],
}
Loading