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

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: 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 # 1 #
2 { 2 {
3 'variables': {
4 'conditions': [
5 [ 'skia_arch_type == "arm" and arm_version != 7', {
6 'android_arch%': "armeabi",
7 }],
8 [ 'skia_arch_type == "arm" and arm_version == 7', {
9 'android_arch%': "armeabi-v7a",
10 }],
11 [ 'skia_arch_type == "arm64"', {
12 'android_arch%': "arm64-v8a",
13 }],
14 [ 'skia_arch_type == "x86"', {
15 'android_arch%': "x86",
16 }],
17 [ 'skia_arch_type == "x86_64"', {
18 'android_arch%': "x86_64",
19 }],
20 [ 'skia_arch_type == "mips" and skia_arch_width == 32', {
21 'android_arch%': "mips",
22 }],
23 [ 'skia_arch_type == "mips" and skia_arch_width == 64', {
24 'android_arch%': "mips64",
25 }],
26 ],
27 },
3 'targets': [ 28 'targets': [
4 { 29 {
5 'target_name': 'CopySampleAppDeps', 30 'target_name': 'CopySampleAppDeps',
6 'type': 'none', 31 'type': 'none',
7 'dependencies': [ 32 'dependencies': [
8 'skia_lib.gyp:skia_lib', 33 'skia_lib.gyp:skia_lib',
9 'SampleApp.gyp:SampleApp', 34 'SampleApp.gyp:SampleApp',
10 ], 35 ],
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': [ 36 'copies': [
37 # Copy all shared libraries into the Android app's libs folder. Note 37 # Copy all shared libraries into the Android app's libs folder. Note
38 # that this copy requires us to build SkiaAndroidApp after those 38 # that this copy requires us to build VisualbenchApp after those
djsollen 2015/06/11 20:32:00 I don't think you meant to update this comment.
joshualitt 2015/06/12 15:40:35 Acknowledged.
39 # libraries, so that they exist by the time it occurs. If there are no 39 # 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 40 # libraries to copy, this will cause an error in Make, but the app will
41 # still build. 41 # still build.
42 { 42 {
43 'destination': '<(PRODUCT_DIR)/android/libs/<(android_arch)', 43 'destination': '<(PRODUCT_DIR)/android/SampleApp/libs/<(android_arch)' ,
44 'conditions': [ 44 'conditions': [
45 [ 'skia_shared_lib', { 45 [ 'skia_shared_lib', {
46 'files': [ 46 'files': [
47 '<(SHARED_LIB_DIR)/libSampleApp.so', 47 '<(SHARED_LIB_DIR)/libSampleApp.so',
48 '<(SHARED_LIB_DIR)/libskia_android.so', 48 '<(SHARED_LIB_DIR)/libskia_android.so',
49 ]}, { 49 ]}, {
50 'files': [ 50 'files': [
51 '<(SHARED_LIB_DIR)/libSampleApp.so', 51 '<(SHARED_LIB_DIR)/libSampleApp.so',
52 ]} 52 ]}
53 ], 53 ],
54 ], 54 ],
55 }, 55 },
56 ], 56 ],
57 }, 57 },
58 { 58 {
59 'target_name': 'SampleApp_APK', 59 'target_name': 'SampleApp_APK',
60 'type': 'none', 60 'type': 'none',
61 'dependencies': [ 61 'dependencies': [
62 'CopySampleAppDeps', 62 'CopySampleAppDeps',
63 ], 63 ],
64 'variables': { 64 'variables': {
65 'ANDROID_SDK_ROOT': '<!(echo $ANDROID_SDK_ROOT)', 65 'ANDROID_SDK_ROOT': '<!(echo $ANDROID_SDK_ROOT)',
66 # the ninja generator treats PRODUCT_DIR as a relative path to the 66 # 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 67 # gyp directory but android ant build wants a path relative to the
68 # build.xml file so we do that adjustment here. 68 # build.xml file so we do that adjustment here.
69 'ANDROID_OUT': '../../<(PRODUCT_DIR)/android' 69 'ANDROID_OUT': '../../<(PRODUCT_DIR)/android/SampleApp'
70 }, 70 },
71 'actions': [ 71 'actions': [
72 { 72 {
73 'action_name': 'SkiaAndroid_apk', 73 'action_name': 'SkiaAndroid_apk',
74 'inputs': [ 74 'inputs': [
75 '<(android_base)/app/AndroidManifest.xml', 75 '<(android_base)/app/AndroidManifest.xml',
76 '<(android_base)/app/build.xml', 76 '<(android_base)/app/build.xml',
77 '<(android_base)/app/project.properties', 77 '<(android_base)/app/project.properties',
78 '<(android_base)/app/jni/com_skia_SkiaSampleRenderer.h', 78 '<(android_base)/app/jni/com_skia_SkiaSampleRenderer.h',
79 '<(android_base)/app/jni/com_skia_SkiaSampleRenderer.cpp', 79 '<(android_base)/app/jni/com_skia_SkiaSampleRenderer.cpp',
80 '<(android_base)/app/src/com/skia/SkiaSampleActivity.java', 80 '<(android_base)/app/src/com/skia/SkiaSampleActivity.java',
81 '<(android_base)/app/src/com/skia/SkiaSampleRenderer.java', 81 '<(android_base)/app/src/com/skia/SkiaSampleRenderer.java',
82 '<(android_base)/app/src/com/skia/SkiaSampleView.java', 82 '<(android_base)/app/src/com/skia/SkiaSampleView.java',
83 ], 83 ],
84 'outputs': [ 84 'outputs': [
85 '<(PRODUCT_DIR)/../android/bin/SkiaAndroid.apk', 85 '<(PRODUCT_DIR)/../android/SampleApp/bin/SkiaAndroid.apk',
86 ], 86 ],
87 'action': [ 87 'action': [
88 'ant', 88 'ant',
89 '-quiet', 89 '-quiet',
90 '-f', 90 '-f',
91 '<(android_base)/app/build.xml', 91 '<(android_base)/app/build.xml',
92 '-Dout.dir=<(ANDROID_OUT)/bin', 92 '-Dout.dir=<(ANDROID_OUT)/bin',
93 '-Dgen.absolute.dir=<(ANDROID_OUT)/gen', 93 '-Dgen.absolute.dir=<(ANDROID_OUT)/gen',
94 '-Dnative.libs.absolute.dir=<(ANDROID_OUT)/libs', 94 '-Dnative.libs.absolute.dir=<(ANDROID_OUT)/libs',
95 '-Dout.final.file=<(ANDROID_OUT)/bin/SkiaAndroid.apk', 95 '-Dout.final.file=<(ANDROID_OUT)/bin/SkiaAndroid.apk',
96 '-Dsdk.dir=<(ANDROID_SDK_ROOT)', 96 '-Dsdk.dir=<(ANDROID_SDK_ROOT)',
97 'debug', 97 'debug',
98 ], 98 ],
99 }, 99 },
100 ], 100 ],
101 }, 101 },
102 {
103 'target_name': 'CopyVisualBenchDeps',
104 'type': 'none',
105 'dependencies': [
106 'skia_lib.gyp:skia_lib',
107 'visualbench.gyp:visualbench',
108 ],
109
110 'copies': [
111 # Copy all shared libraries into the Android app's libs folder. Note
112 # that this copy requires us to build SkiaAndroidApp after those
113 # libraries, so that they exist by the time it occurs. If there are no
114 # libraries to copy, this will cause an error in Make, but the app will
115 # still build.
116 {
117 'destination': '<(PRODUCT_DIR)/android/VisualBench/libs/<(android_arch )',
118 'conditions': [
119 [ 'skia_shared_lib', {
120 'files': [
121 '<(SHARED_LIB_DIR)/libskia_android.so',
122 '<(SHARED_LIB_DIR)/libvisualbench.so',
123 ]}, {
124 'files': [
125 '<(SHARED_LIB_DIR)/libvisualbench.so',
126 ]}
127 ],
128 ],
129 },
130 ],
131 },
132 {
133 'target_name': 'VisualBench_APK',
134 'type': 'none',
135 'dependencies': [
136 'CopyVisualBenchDeps',
137 ],
138 'variables': {
139 'ANDROID_SDK_ROOT': '<!(echo $ANDROID_SDK_ROOT)',
140 # the ninja generator treats PRODUCT_DIR as a relative path to the
141 # gyp directory but android ant build wants a path relative to the
142 # build.xml file so we do that adjustment here.
143 'ANDROID_OUT': '../../<(PRODUCT_DIR)/android/VisualBench/'
144 },
145 'actions': [
146 {
147 'action_name': 'SkiaVisualBench_apk',
148 'inputs': [
149 '<(android_base)/visualbench/AndroidManifest.xml',
150 '<(android_base)/visualbench/build.xml',
151 '<(android_base)/visualbench/project.properties',
152 '<(android_base)/visualbench/src/com/skia/VisualBenchActivity.java',
153 ],
154 'outputs': [
155 '<(PRODUCT_DIR)/../android/VisualBench/bin/VisualBench.apk',
djsollen 2015/06/11 20:32:00 update this to <(ANDROID_OUT)/bin/VisualBench.apk
joshualitt 2015/06/12 15:40:35 Hmm, for some reason gyp really doesn't like this
djsollen 2015/06/12 16:27:14 No idea why that is so feel free to leave as is.
156 ],
157 'action': [
158 'ant',
159 '-quiet',
160 '-f',
161 '<(android_base)/visualbench/build.xml',
162 '-Dout.dir=<(ANDROID_OUT)/bin',
163 '-Dgen.absolute.dir=<(ANDROID_OUT)/gen',
164 '-Dnative.libs.absolute.dir=<(ANDROID_OUT)/libs',
165 '-Dout.final.file=<(ANDROID_OUT)/bin/VisualBench.apk',
166 '-Dsdk.dir=<(ANDROID_SDK_ROOT)',
167 'debug',
168 ],
169 },
170 ],
171 },
102 ], 172 ],
103 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698