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

Commit e43d46f0 authored by Miao Wang's avatar Miao Wang Committed by Gerrit Code Review
Browse files

Merge changes from topic 'rs_hidl_impl'

* changes:
  Fix mips-related build breakage.
  RenderScript HIDL HAL definition and server-side implementation.
parents c190f931 746f3cd8
Loading
Loading
Loading
Loading
+175 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen. Do not edit manually.

genrule {
    name: "android.hardware.renderscript@1.0_genc++",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
    srcs: [
        "types.hal",
        "IContext.hal",
        "IDevice.hal",
    ],
    out: [
        "android/hardware/renderscript/1.0/types.cpp",
        "android/hardware/renderscript/1.0/ContextAll.cpp",
        "android/hardware/renderscript/1.0/DeviceAll.cpp",
    ],
}

genrule {
    name: "android.hardware.renderscript@1.0_genc++_headers",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
    srcs: [
        "types.hal",
        "IContext.hal",
        "IDevice.hal",
    ],
    out: [
        "android/hardware/renderscript/1.0/types.h",
        "android/hardware/renderscript/1.0/IContext.h",
        "android/hardware/renderscript/1.0/IHwContext.h",
        "android/hardware/renderscript/1.0/BnHwContext.h",
        "android/hardware/renderscript/1.0/BpHwContext.h",
        "android/hardware/renderscript/1.0/BsContext.h",
        "android/hardware/renderscript/1.0/IDevice.h",
        "android/hardware/renderscript/1.0/IHwDevice.h",
        "android/hardware/renderscript/1.0/BnHwDevice.h",
        "android/hardware/renderscript/1.0/BpHwDevice.h",
        "android/hardware/renderscript/1.0/BsDevice.h",
    ],
}

cc_library_shared {
    name: "android.hardware.renderscript@1.0",
    generated_sources: ["android.hardware.renderscript@1.0_genc++"],
    generated_headers: ["android.hardware.renderscript@1.0_genc++_headers"],
    export_generated_headers: ["android.hardware.renderscript@1.0_genc++_headers"],
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "liblog",
        "libutils",
        "libcutils",
        "android.hidl.base@1.0",
    ],
    export_shared_lib_headers: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libutils",
        "android.hidl.base@1.0",
    ],
}

genrule {
    name: "android.hardware.renderscript.vts.driver@1.0_genc++",
    tools: ["hidl-gen", "vtsc"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
    srcs: [
        "types.hal",
        "IContext.hal",
        "IDevice.hal",
    ],
    out: [
        "android/hardware/renderscript/1.0/types.vts.cpp",
        "android/hardware/renderscript/1.0/Context.vts.cpp",
        "android/hardware/renderscript/1.0/Device.vts.cpp",
    ],
}

genrule {
    name: "android.hardware.renderscript.vts.driver@1.0_genc++_headers",
    tools: ["hidl-gen", "vtsc"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
    srcs: [
        "types.hal",
        "IContext.hal",
        "IDevice.hal",
    ],
    out: [
        "android/hardware/renderscript/1.0/types.vts.h",
        "android/hardware/renderscript/1.0/Context.vts.h",
        "android/hardware/renderscript/1.0/Device.vts.h",
    ],
}

cc_library_shared {
    name: "android.hardware.renderscript.vts.driver@1.0",
    generated_sources: ["android.hardware.renderscript.vts.driver@1.0_genc++"],
    generated_headers: ["android.hardware.renderscript.vts.driver@1.0_genc++_headers"],
    export_generated_headers: ["android.hardware.renderscript.vts.driver@1.0_genc++_headers"],
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "liblog",
        "libutils",
        "libcutils",
        "libvts_common",
        "libvts_datatype",
        "libvts_measurement",
        "libvts_multidevice_proto",
        "libcamera_metadata",
        "libprotobuf-cpp-full",
        "android.hidl.base@1.0",
        "android.hardware.renderscript@1.0",
    ],
    export_shared_lib_headers: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libutils",
        "android.hidl.base@1.0",
    ],
}

genrule {
    name: "android.hardware.renderscript@1.0-vts.profiler_genc++",
    tools: ["hidl-gen", "vtsc"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
    srcs: [
        "types.hal",
        "IContext.hal",
        "IDevice.hal",
    ],
    out: [
        "android/hardware/renderscript/1.0/types.vts.cpp",
        "android/hardware/renderscript/1.0/Context.vts.cpp",
        "android/hardware/renderscript/1.0/Device.vts.cpp",
    ],
}

genrule {
    name: "android.hardware.renderscript@1.0-vts.profiler_genc++_headers",
    tools: ["hidl-gen", "vtsc"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
    srcs: [
        "types.hal",
        "IContext.hal",
        "IDevice.hal",
    ],
    out: [
        "android/hardware/renderscript/1.0/types.vts.h",
        "android/hardware/renderscript/1.0/Context.vts.h",
        "android/hardware/renderscript/1.0/Device.vts.h",
    ],
}

cc_library_shared {
    name: "android.hardware.renderscript@1.0-vts.profiler",
    generated_sources: ["android.hardware.renderscript@1.0-vts.profiler_genc++"],
    generated_headers: ["android.hardware.renderscript@1.0-vts.profiler_genc++_headers"],
    export_generated_headers: ["android.hardware.renderscript@1.0-vts.profiler_genc++_headers"],
    shared_libs: [
        "libbase",
        "libhidlbase",
        "libhidltransport",
        "libvts_profiling",
        "libvts_multidevice_proto",
        "libprotobuf-cpp-full",
        "android.hidl.base@1.0",
        "android.hardware.renderscript@1.0",
    ],
}
+41 −0
Original line number Diff line number Diff line
# This file is autogenerated by hidl-gen. Do not edit manually.

LOCAL_PATH := $(call my-dir)

################################################################################

include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.renderscript@1.0-java-constants
LOCAL_MODULE_CLASS := JAVA_LIBRARIES

intermediates := $(local-generated-sources-dir)

HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
#
GEN := $(intermediates)/android/hardware/renderscript/V1_0/Constants.java
$(GEN): $(HIDL)
$(GEN): $(LOCAL_PATH)/types.hal
$(GEN): $(LOCAL_PATH)/IContext.hal
$(GEN): $(LOCAL_PATH)/IDevice.hal

$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava-constants \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.renderscript@1.0

$(GEN):
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
# Avoid dependency cycle of framework.jar -> this-library -> framework.jar
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj

include $(BUILD_STATIC_JAVA_LIBRARY)



include $(call all-makefiles-under,$(LOCAL_PATH))
+1177 −0

File added.

Preview size limit exceeded, changes collapsed.

+38 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.
 */

package android.hardware.renderscript@1.0;

import android.hardware.renderscript@1.0::types;
import IContext;

interface IDevice {

    /*
     * Creates a RenderScript context.
     *
     * @param sdkVersion Target RS API level
     * @param ct Context type
     * @param flags Optional flags for this context
     * @return context Created context
     */
    @entry
    @callflow(next={"*"})
    contextCreate(uint32_t sdkVersion, ContextType ct,
                  bitfield<ContextFlags> flags)
       generates (IContext context);

};
+22 −0
Original line number Diff line number Diff line
cc_library_shared {
    name: "android.hardware.renderscript@1.0-impl",
    relative_install_path: "hw",
    proprietary: true,
    srcs: [
        "Context.cpp",
        "Device.cpp",
    ],
    include_dirs: [
        "frameworks/rs",
    ],
    shared_libs: [
        "libdl",
        "liblog",
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libutils",
        "android.hardware.renderscript@1.0",
        "android.hidl.base@1.0",
    ],
}
Loading