Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: platform_tools/android/gyp/skia_android.gypi

Issue 1164403002: Visual bench on native android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tiny cleanup Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 Google Inc.
2 #
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 # This GYP file stores the dependencies necessary to build Skia on the Android
7 # platform. The OS doesn't provide many stable libraries as part of the
8 # distribution so we have to build a few of them ourselves.
1 # 9 #
2 { 10 {
11 'variables': {
12 'conditions': [
13 [ 'skia_arch_type == "arm" and arm_version != 7', {
14 'android_arch%': "armeabi",
15 }],
16 [ 'skia_arch_type == "arm" and arm_version == 7', {
17 'android_arch%': "armeabi-v7a",
18 }],
19 [ 'skia_arch_type == "arm64"', {
20 'android_arch%': "arm64-v8a",
21 }],
22 [ 'skia_arch_type == "x86"', {
23 'android_arch%': "x86",
24 }],
25 [ 'skia_arch_type == "x86_64"', {
26 'android_arch%': "x86_64",
27 }],
28 [ 'skia_arch_type == "mips" and skia_arch_width == 32', {
29 'android_arch%': "mips",
30 }],
31 [ 'skia_arch_type == "mips" and skia_arch_width == 64', {
32 'android_arch%': "mips64",
33 }],
34 ],
35 },
3 'targets': [ 36 'targets': [
4 { 37 {
5 'target_name': 'CopySampleAppDeps', 38 'target_name': 'CopySampleAppDeps',
6 'type': 'none', 39 'type': 'none',
7 'dependencies': [ 40 'dependencies': [
8 'skia_lib.gyp:skia_lib', 41 'skia_lib.gyp:skia_lib',
9 'SampleApp.gyp:SampleApp', 42 'SampleApp.gyp:SampleApp',
10 ], 43 ],
11 'variables': {
12 'conditions': [
13 [ 'skia_arch_type == "arm" and arm_version != 7', {
14 'android_arch%': "armeabi",
15 }],
16 [ 'skia_arch_type == "arm" and arm_version == 7', {
17 'android_arch%': "armeabi-v7a",
18 }],
19 [ 'skia_arch_type == "arm64"', {
20 'android_arch%': "arm64-v8a",
21 }],
22 [ 'skia_arch_type == "x86"', {
23 'android_arch%': "x86",
24 }],
25 [ 'skia_arch_type == "x86_64"', {
26 'android_arch%': "x86_64",
27 }],
28 [ 'skia_arch_type == "mips" and skia_arch_width == 32', {
29 'android_arch%': "mips",
30 }],
31 [ 'skia_arch_type == "mips" and skia_arch_width == 64', {
32 'android_arch%': "mips64",
33 }],
34 ],
35 },
36 'copies': [ 44 'copies': [
37 # Copy all shared libraries into the Android app's libs folder. Note 45 # Copy all shared libraries into the Android app's libs folder. Note
38 # that this copy requires us to build SkiaAndroidApp after those 46 # that this copy requires us to build SkiaAndroidApp after those
39 # libraries, so that they exist by the time it occurs. If there are no 47 # libraries, so that they exist by the time it occurs. If there are no
40 # libraries to copy, this will cause an error in Make, but the app will 48 # libraries to copy, this will cause an error in Make, but the app will
41 # still build. 49 # still build.
42 { 50 {
43 'destination': '<(PRODUCT_DIR)/android/libs/<(android_arch)', 51 'destination': '<(PRODUCT_DIR)/android/SampleApp/libs/<(android_arch)' ,
44 'conditions': [ 52 'conditions': [
45 [ 'skia_shared_lib', { 53 [ 'skia_shared_lib', {
46 'files': [ 54 'files': [
47 '<(SHARED_LIB_DIR)/libSampleApp.so', 55 '<(SHARED_LIB_DIR)/libSampleApp.so',
48 '<(SHARED_LIB_DIR)/libskia_android.so', 56 '<(SHARED_LIB_DIR)/libskia_android.so',
49 ]}, { 57 ]}, {
50 'files': [ 58 'files': [
51 '<(SHARED_LIB_DIR)/libSampleApp.so', 59 '<(SHARED_LIB_DIR)/libSampleApp.so',
52 ]} 60 ]}
53 ], 61 ],
54 ], 62 ],
55 }, 63 },
56 ], 64 ],
57 }, 65 },
58 { 66 {
59 'target_name': 'SampleApp_APK', 67 'target_name': 'SampleApp_APK',
60 'type': 'none', 68 'type': 'none',
61 'dependencies': [ 69 'dependencies': [
62 'CopySampleAppDeps', 70 'CopySampleAppDeps',
63 ], 71 ],
64 'variables': { 72 'variables': {
65 'ANDROID_SDK_ROOT': '<!(echo $ANDROID_SDK_ROOT)', 73 'ANDROID_SDK_ROOT': '<!(echo $ANDROID_SDK_ROOT)',
66 # the ninja generator treats PRODUCT_DIR as a relative path to the 74 # the ninja generator treats PRODUCT_DIR as a relative path to the
67 # gyp directory but android ant build wants a path relative to the 75 # gyp directory but android ant build wants a path relative to the
68 # build.xml file so we do that adjustment here. 76 # build.xml file so we do that adjustment here.
69 'ANDROID_OUT': '../../<(PRODUCT_DIR)/android' 77 'ANDROID_OUT': '../../<(PRODUCT_DIR)/android/SampleApp'
70 }, 78 },
71 'actions': [ 79 'actions': [
72 { 80 {
73 'action_name': 'SkiaAndroid_apk', 81 'action_name': 'SkiaAndroid_apk',
74 'inputs': [ 82 'inputs': [
75 '<(android_base)/app/AndroidManifest.xml', 83 '<(android_base)/app/AndroidManifest.xml',
76 '<(android_base)/app/build.xml', 84 '<(android_base)/app/build.xml',
77 '<(android_base)/app/project.properties', 85 '<(android_base)/app/project.properties',
78 '<(android_base)/app/jni/com_skia_SkiaSampleRenderer.h', 86 '<(android_base)/app/jni/com_skia_SkiaSampleRenderer.h',
79 '<(android_base)/app/jni/com_skia_SkiaSampleRenderer.cpp', 87 '<(android_base)/app/jni/com_skia_SkiaSampleRenderer.cpp',
80 '<(android_base)/app/src/com/skia/SkiaSampleActivity.java', 88 '<(android_base)/app/src/com/skia/SkiaSampleActivity.java',
81 '<(android_base)/app/src/com/skia/SkiaSampleRenderer.java', 89 '<(android_base)/app/src/com/skia/SkiaSampleRenderer.java',
82 '<(android_base)/app/src/com/skia/SkiaSampleView.java', 90 '<(android_base)/app/src/com/skia/SkiaSampleView.java',
83 ], 91 ],
84 'outputs': [ 92 'outputs': [
85 '<(PRODUCT_DIR)/../android/bin/SkiaAndroid.apk', 93 '<(PRODUCT_DIR)/../android/SampleApp/bin/SkiaAndroid.apk',
86 ], 94 ],
87 'action': [ 95 'action': [
88 'ant', 96 'ant',
89 '-quiet', 97 '-quiet',
90 '-f', 98 '-f',
91 '<(android_base)/app/build.xml', 99 '<(android_base)/app/build.xml',
92 '-Dout.dir=<(ANDROID_OUT)/bin', 100 '-Dout.dir=<(ANDROID_OUT)/bin',
93 '-Dgen.absolute.dir=<(ANDROID_OUT)/gen', 101 '-Dgen.absolute.dir=<(ANDROID_OUT)/gen',
94 '-Dnative.libs.absolute.dir=<(ANDROID_OUT)/libs', 102 '-Dnative.libs.absolute.dir=<(ANDROID_OUT)/libs',
95 '-Dout.final.file=<(ANDROID_OUT)/bin/SkiaAndroid.apk', 103 '-Dout.final.file=<(ANDROID_OUT)/bin/SkiaAndroid.apk',
96 '-Dsdk.dir=<(ANDROID_SDK_ROOT)', 104 '-Dsdk.dir=<(ANDROID_SDK_ROOT)',
97 'debug', 105 'debug',
98 ], 106 ],
99 }, 107 },
100 ], 108 ],
101 }, 109 },
110 {
111 'target_name': 'CopyVisualBenchDeps',
112 'type': 'none',
113 'dependencies': [
114 'skia_lib.gyp:skia_lib',
115 'visualbench.gyp:visualbench',
116 ],
117
118 'copies': [
119 # Copy all shared libraries into the Android app's libs folder. Note
120 # that this copy requires us to build SkiaAndroidApp after those
121 # libraries, so that they exist by the time it occurs. If there are no
122 # libraries to copy, this will cause an error in Make, but the app will
123 # still build.
124 {
125 'destination': '<(PRODUCT_DIR)/android/VisualBench/libs/<(android_arch )',
126 'conditions': [
127 [ 'skia_shared_lib', {
128 'files': [
129 '<(SHARED_LIB_DIR)/libskia_android.so',
130 '<(SHARED_LIB_DIR)/libvisualbench.so',
131 ]}, {
132 'files': [
133 '<(SHARED_LIB_DIR)/libvisualbench.so',
134 ]}
135 ],
136 ],
137 },
138 ],
139 },
140 {
141 'target_name': 'VisualBench_APK',
142 'type': 'none',
143 'dependencies': [
144 'CopyVisualBenchDeps',
145 ],
146 'variables': {
147 'ANDROID_SDK_ROOT': '<!(echo $ANDROID_SDK_ROOT)',
148 # the ninja generator treats PRODUCT_DIR as a relative path to the
149 # gyp directory but android ant build wants a path relative to the
150 # build.xml file so we do that adjustment here.
151 'ANDROID_OUT': '../../<(PRODUCT_DIR)/android/VisualBench/'
152 },
153 'actions': [
154 {
155 'action_name': 'SkiaVisualBench_apk',
156 'inputs': [
157 '<(android_base)/visualbench/AndroidManifest.xml',
158 '<(android_base)/visualbench/build.xml',
159 '<(android_base)/visualbench/project.properties',
160 '<(android_base)/visualbench/src/com/skia/VisualBenchActivity.java',
161 ],
162 'outputs': [
163 '<(PRODUCT_DIR)/../android/VisualBench/bin/VisualBench.apk',
164 ],
165 'action': [
166 'ant',
167 '-quiet',
168 '-f',
169 '<(android_base)/visualbench/build.xml',
170 '-Dout.dir=<(ANDROID_OUT)/bin',
171 '-Dgen.absolute.dir=<(ANDROID_OUT)/gen',
172 '-Dnative.libs.absolute.dir=<(ANDROID_OUT)/libs',
173 '-Dout.final.file=<(ANDROID_OUT)/bin/VisualBench.apk',
174 '-Dsdk.dir=<(ANDROID_SDK_ROOT)',
175 'debug',
176 ],
177 },
178 ],
179 },
102 ], 180 ],
103 } 181 }
OLDNEW
« no previous file with comments | « platform_tools/android/gyp/dependencies.gypi ('k') | platform_tools/android/visualbench/AndroidManifest.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698