Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
cvzi committed Mar 15, 2023
1 parent 892cc00 commit 7f4e2ed
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 26 additions & 26 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ set(CMAKE_CXX_FLAGS "-Wall -Wextra ${CMAKE_CXX_FLAGS}")
#set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Os -DNDEBUG")

#TODO check that the definitions are all needed. Do they have impact outside of our code?
if(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7-a)
if (CMAKE_SYSTEM_PROCESSOR STREQUAL armv7-a)
add_definitions(-DARCH_ARM_USE_INTRINSICS -DARCH_ARM_HAVE_VFP)
set(ASM_SOURCES
Blur_neon.S)
endif()
Blur_neon.S)
endif ()

if(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
if (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
add_definitions(-DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON)
set(ASM_SOURCES
Blur_advsimd.S)
endif()
Blur_advsimd.S)
endif ()
# TODO add also for x86

# Creates and names a library, sets it as either STATIC
Expand All @@ -59,16 +59,16 @@ endif()
# Gradle automatically packages shared libraries with your APK.

add_library(# Sets the name of the library.
renderscript-toolkit
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
Blur.cpp
JniEntryPoints.cpp
RenderScriptToolkit.cpp
TaskProcessor.cpp
Utils.cpp
${ASM_SOURCES})
renderscript-toolkit
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
Blur.cpp
JniEntryPoints.cpp
RenderScriptToolkit.cpp
TaskProcessor.cpp
Utils.cpp
${ASM_SOURCES})

# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
Expand All @@ -77,23 +77,23 @@ add_library(# Sets the name of the library.
# completing its build.

find_library(# Sets the name of the path variable.
log-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
log )
log-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
log)

# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.

target_link_libraries(# Specifies the target library.
renderscript-toolkit
renderscript-toolkit

cpufeatures
jnigraphics
# Links the target library to the log library
# included in the NDK.
${log-lib} )
cpufeatures
jnigraphics
# Links the target library to the log library
# included in the NDK.
${log-lib})

include(AndroidNdkModules)
android_ndk_import_module_cpufeatures()
25 changes: 14 additions & 11 deletions app/src/main/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
Taken from https://github.com/android/renderscript-intrinsics-replacement-toolkit
with changes from https://github.com/Wesley-Ong/renderscript-intrinsics-replacement-toolkit
and the following modifications:
* [Remove all functions but blur](https://github.com/Wesley-Ong/renderscript-intrinsics-replacement-toolkit/commit/254feae0d250cbc6768f18933f8db3e91cb249dc) (by Wesley-Ong)
* Update Gradle/Gradle wrapper
* Update Java
* Update Kotlin
* Update Kotlin libraries
* Update SDK
* Update NDK
* Set minSdkVersion to 29
* Set targetSdkVersion to 33
* Remove unused dependencies
* Move namespace declaration into build.gradle

* [Remove all functions but blur](https://github.com/Wesley-Ong/renderscript-intrinsics-replacement-toolkit/commit/254feae0d250cbc6768f18933f8db3e91cb249dc) (
by Wesley-Ong)
* Update Gradle/Gradle wrapper
* Update Java
* Update Kotlin
* Update Kotlin libraries
* Update SDK
* Update NDK
* Set minSdkVersion to 29
* Set targetSdkVersion to 33
* Remove unused dependencies
* Move namespace declaration into build.gradle
* Add function to blur a bitmap multiple times

```
Expand Down
25 changes: 14 additions & 11 deletions app/src/main/java/com/google/android/renderscript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
Taken from https://github.com/android/renderscript-intrinsics-replacement-toolkit
with changes from https://github.com/Wesley-Ong/renderscript-intrinsics-replacement-toolkit
and the following modifications:
* [Remove all functions but blur](https://github.com/Wesley-Ong/renderscript-intrinsics-replacement-toolkit/commit/254feae0d250cbc6768f18933f8db3e91cb249dc) (by Wesley-Ong)
* Update Gradle/Gradle wrapper
* Update Java
* Update Kotlin
* Update Kotlin libraries
* Update SDK
* Update NDK
* Set minSdkVersion to 29
* Set targetSdkVersion to 33
* Remove unused dependencies
* Move namespace declaration into build.gradle

* [Remove all functions but blur](https://github.com/Wesley-Ong/renderscript-intrinsics-replacement-toolkit/commit/254feae0d250cbc6768f18933f8db3e91cb249dc) (
by Wesley-Ong)
* Update Gradle/Gradle wrapper
* Update Java
* Update Kotlin
* Update Kotlin libraries
* Update SDK
* Update NDK
* Set minSdkVersion to 29
* Set targetSdkVersion to 33
* Remove unused dependencies
* Move namespace declaration into build.gradle
* Add function to blur a bitmap multiple times

```
Expand Down

0 comments on commit 7f4e2ed

Please sign in to comment.