Chromium Code Reviews| Index: base/android/cpu_features.cc |
| diff --git a/base/android/cpu_features.cc b/base/android/cpu_features.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b6e0156220a3be2d1fa3f70c1573301abb9406f4 |
| --- /dev/null |
| +++ b/base/android/cpu_features.cc |
| @@ -0,0 +1,26 @@ |
| +#include <cpu-features.h> |
|
bulach
2012/12/10 14:03:07
nit: copyright notice
digit1
2012/12/10 14:44:56
Done.
|
| + |
| +#include "base/android/jni_android.h" |
| +#include "jni/CpuFeatures_jni.h" |
| + |
| +namespace base { |
| +namespace android { |
| + |
| +jint GetCoreCount(JNIEnv*, jclass) { |
| + return android_getCpuCount(); |
|
bulach
2012/12/10 14:03:07
nit: the indentation seems off here and the two ca
digit1
2012/12/10 14:44:56
Done.
|
| +} |
| + |
| +jlong GetCpuFeatures(JNIEnv*, jclass) { |
| + return android_getCpuFeatures(); |
| +} |
| + |
| +void SetCpu(JNIEnv*, jclass, jint cpuCount, jlong cpuFeatures) { |
|
bulach
2012/12/10 14:03:07
nit: hacker_style for cpu_count and cpu_features
digit1
2012/12/10 14:44:56
Done.
|
| + android_setCpu(cpuCount, cpuFeatures); |
| +} |
| + |
| +bool RegisterCpuFeatures(JNIEnv* env) { |
| + return RegisterNativesImpl(env); |
| +} |
| + |
| +} // namespace android |
| +} // namespace base |