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

Side by Side Diff: platform_tools/android/gyp_gen/generate_user_config.py

Issue 221063003: Rename test SkUserConfig files. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change .h to .txt to skip housekeeping. Created 6 years, 8 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
« no previous file with comments | « no previous file | platform_tools/android/tests/expectations/SkUserConfig.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright 2014 Google Inc. 3 # Copyright 2014 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 """Function for generating the SkUserConfig file, customized for Android.""" 8 """Function for generating the SkUserConfig file, customized for Android."""
9 9
10 import os 10 import os
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 # Now add the defines specific to Android. Write a custom build guard to 69 # Now add the defines specific to Android. Write a custom build guard to
70 # ensure they don't get defined more than once. 70 # ensure they don't get defined more than once.
71 dst.write('\n// Android defines:\n') 71 dst.write('\n// Android defines:\n')
72 dst.write('#ifndef ' + BUILD_GUARD + '\n') 72 dst.write('#ifndef ' + BUILD_GUARD + '\n')
73 dst.write('#define ' + BUILD_GUARD + '\n') 73 dst.write('#define ' + BUILD_GUARD + '\n')
74 74
75 # Add conditional defines manually: 75 # Add conditional defines manually:
76 76
77 # do this build check for other tools that still read this header 77 # do this build check for other tools that still read this header
78 dst.write('#ifdef ANDROID\n') 78 dst.write('#ifdef ANDROID\n')
79 dst.write('\t#include <utils/misc.h>\n') 79 dst.write(' #include <utils/misc.h>\n')
80 dst.write('#endif\n\n') 80 dst.write('#endif\n\n')
81 81
82 dst.write('#if __BYTE_ORDER == __BIG_ENDIAN\n') 82 dst.write('#if __BYTE_ORDER == __BIG_ENDIAN\n')
83 dst.write('\t#define SK_CPU_BENDIAN\n') 83 dst.write(' #define SK_CPU_BENDIAN\n')
84 dst.write('\t#undef SK_CPU_LENDIAN\n') 84 dst.write(' #undef SK_CPU_LENDIAN\n')
85 dst.write('#else\n') 85 dst.write('#else\n')
86 dst.write('\t#define SK_CPU_LENDIAN\n') 86 dst.write(' #define SK_CPU_LENDIAN\n')
87 dst.write('\t#undef SK_CPU_BENDIAN\n') 87 dst.write(' #undef SK_CPU_BENDIAN\n')
88 dst.write('#endif\n\n') 88 dst.write('#endif\n\n')
89 89
90 # Now add the defines from the gyp files. 90 # Now add the defines from the gyp files.
91 for item in ordered_set: 91 for item in ordered_set:
92 # Although our defines may have '=' in them, when written to the header 92 # Although our defines may have '=' in them, when written to the header
93 # there should be a space between the macro and what it replaces. 93 # there should be a space between the macro and what it replaces.
94 dst.write('#define ' + item.replace('=', ' ') + '\n') 94 dst.write('#define ' + item.replace('=', ' ') + '\n')
95 95
96 dst.write('\n#endif // ' + BUILD_GUARD + '\n') 96 dst.write('\n#endif // ' + BUILD_GUARD + '\n')
OLDNEW
« no previous file with comments | « no previous file | platform_tools/android/tests/expectations/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698