summaryrefslogtreecommitdiff
path: root/native/graphics
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-10-07 18:38:31 -0700
committerColin Cross <ccross@android.com>2017-10-10 01:38:44 +0000
commit4ed3557b95180d99bd1569642101cfb5bdf23163 (patch)
treea09183705e6f7e6b8b319e1c78bad309a6b29d56 /native/graphics
parented8d236319a112a0b19b1f05ea55a90ba93e8aa2 (diff)
Convert libjnigraphics to Android.bp
See build/soong/README.md for more information. Test: m -j Change-Id: If302f63276fa815423f50df0f12c1700975dbc43 Merged-In: If302f63276fa815423f50df0f12c1700975dbc43 (cherry picked from commit 02a8657837321c12ec81207bf43e3ace61b3962f)
Diffstat (limited to 'native/graphics')
-rw-r--r--native/graphics/jni/Android.bp27
-rw-r--r--native/graphics/jni/Android.mk40
-rw-r--r--native/graphics/jni/bitmap.cpp3
3 files changed, 28 insertions, 42 deletions
diff --git a/native/graphics/jni/Android.bp b/native/graphics/jni/Android.bp
index d456950037d4..d7695ef17a08 100644
--- a/native/graphics/jni/Android.bp
+++ b/native/graphics/jni/Android.bp
@@ -12,6 +12,33 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+cc_library_shared {
+ name: "libjnigraphics",
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+
+ // our source files
+ //
+ srcs: ["bitmap.cpp"],
+
+ shared_libs: [
+ "libandroid_runtime",
+ "libskia",
+ ],
+
+ arch: {
+ arm: {
+ // TODO: This is to work around b/24465209. Remove after root cause is fixed
+ ldflags: ["-Wl,--hash-style=both"],
+ },
+ },
+}
+
// The headers module is in frameworks/native/Android.bp.
ndk_library {
name: "libjnigraphics",
diff --git a/native/graphics/jni/Android.mk b/native/graphics/jni/Android.mk
deleted file mode 100644
index ec4b35aac9c3..000000000000
--- a/native/graphics/jni/Android.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-BASE_PATH := $(call my-dir)
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-# setup for skia optimizations
-#
-ifneq ($(ARCH_ARM_HAVE_VFP),true)
- LOCAL_CFLAGS += -DSK_SOFTWARE_FLOAT
-endif
-
-ifeq ($(ARCH_ARM_HAVE_NEON),true)
- LOCAL_CFLAGS += -D__ARM_HAVE_NEON
-endif
-
-# our source files
-#
-LOCAL_SRC_FILES:= \
- bitmap.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libandroid_runtime \
- libskia \
- libui \
- libandroidfw
-
-LOCAL_C_INCLUDES += \
- frameworks/base/native/include \
- frameworks/base/core/jni/android/graphics \
- frameworks/base/libs/hwui
-
-LOCAL_MODULE:= libjnigraphics
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-# TODO: This is to work around b/24465209. Remove after root cause is fixed
-LOCAL_LDFLAGS_arm := -Wl,--hash-style=both
-
-include $(BUILD_SHARED_LIBRARY)
-
diff --git a/native/graphics/jni/bitmap.cpp b/native/graphics/jni/bitmap.cpp
index bf5cabbe4bc2..ff14832a2f0f 100644
--- a/native/graphics/jni/bitmap.cpp
+++ b/native/graphics/jni/bitmap.cpp
@@ -15,7 +15,7 @@
*/
#include <android/bitmap.h>
-#include <Bitmap.h>
+#include <android/graphics/Bitmap.h>
int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap,
AndroidBitmapInfo* info) {
@@ -56,4 +56,3 @@ int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap) {
}
return ANDROID_BITMAP_RESULT_SUCCESS;
}
-