Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #include <cpu-features.h> | |
|
bulach
2012/12/10 14:03:07
nit: copyright notice
digit1
2012/12/10 14:44:56
Done.
| |
| 2 | |
| 3 #include "base/android/jni_android.h" | |
| 4 #include "jni/CpuFeatures_jni.h" | |
| 5 | |
| 6 namespace base { | |
| 7 namespace android { | |
| 8 | |
| 9 jint GetCoreCount(JNIEnv*, jclass) { | |
| 10 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.
| |
| 11 } | |
| 12 | |
| 13 jlong GetCpuFeatures(JNIEnv*, jclass) { | |
| 14 return android_getCpuFeatures(); | |
| 15 } | |
| 16 | |
| 17 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.
| |
| 18 android_setCpu(cpuCount, cpuFeatures); | |
| 19 } | |
| 20 | |
| 21 bool RegisterCpuFeatures(JNIEnv* env) { | |
| 22 return RegisterNativesImpl(env); | |
| 23 } | |
| 24 | |
| 25 } // namespace android | |
| 26 } // namespace base | |
| OLD | NEW |