1/* 2 * Copyright 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package { 18 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "external_renderscript_intrinsics_replacement_toolkit_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 default_applicable_licenses: [ 24 "external_renderscript_intrinsics_replacement_toolkit_license", 25 ], 26} 27 28cc_defaults { 29 name: "renderscripttoolkit_native_defaults", 30 sdk_version: "current", 31 static_libs: [ 32 "cpufeatures", 33 ], 34 shared_libs: [ 35 "libjnigraphics", 36 "liblog", 37 ], 38 cflags: [ 39 "-Wall", 40 "-Werror", 41 "-Wextra", 42 "-Wno-unused-parameter", 43 "-Wno-unused-variable", 44 "-Wthread-safety", 45 ], 46 stl: "libc++_static", 47} 48 49cc_library_static { 50 name: "librenderscripttoolkit_native_static", 51 defaults: ["renderscripttoolkit_native_defaults"], 52 srcs: [ 53 "Blend.cpp", 54 "Blur.cpp", 55 "ColorMatrix.cpp", 56 "Convolve3x3.cpp", 57 "Convolve5x5.cpp", 58 "Histogram.cpp", 59 "Lut.cpp", 60 "Lut3d.cpp", 61 "RenderScriptToolkit.cpp", 62 "Resize.cpp", 63 "TaskProcessor.cpp", 64 "Utils.cpp", 65 "YuvToRgb.cpp", 66 ], 67 arch: { 68 arm64: { 69 cflags: [ 70 "-DARCH_ARM64_HAVE_NEON", 71 "-DARCH_ARM64_USE_INTRINSICS", 72 "-DARCH_ARM_USE_INTRINSICS", 73 ], 74 srcs: [ 75 "Blend_advsimd.S", 76 "Blur_advsimd.S", 77 "ColorMatrix_advsimd.S", 78 "Convolve_advsimd.S", 79 "Lut3d_advsimd.S", 80 "Resize_advsimd.S", 81 "YuvToRgb_advsimd.S", 82 ], 83 }, 84 arm: { 85 cflags: [ 86 "-DARCH_ARM_HAVE_NEON", 87 "-DARCH_ARM_HAVE_VFP", 88 "-DARCH_ARM_USE_INTRINSICS", 89 ], 90 srcs: [ 91 "Blend_neon.S", 92 "Blur_neon.S", 93 "ColorMatrix_neon.S", 94 "Convolve_neon.S", 95 "Lut3d_neon.S", 96 "Resize_neon.S", 97 "YuvToRgb_neon.S", 98 ], 99 }, 100 }, 101} 102 103cc_library_shared { 104 name: "librenderscript-toolkit", 105 defaults: ["renderscripttoolkit_native_defaults"], 106 srcs: ["JniEntryPoints.cpp"], 107 static_libs: [ 108 "librenderscripttoolkit_native_static", 109 ], 110 header_libs: ["jni_headers"], 111} 112