aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2012-09-11 15:51:38 +0900
committerSatoshi Kataoka <satok@google.com>2012-09-11 17:04:10 +0900
commit952ec4977d772607140773ae7d8868f86a7e0097 (patch)
treedfa5462f981cc15cacf91279f5a536f7a8bcc0f8 /native/jni/src
parent2935276110cf3588e2986b833cc78a7bab6253cc (diff)
downloadlatinime-952ec4977d772607140773ae7d8868f86a7e0097.tar.gz
latinime-952ec4977d772607140773ae7d8868f86a7e0097.tar.xz
latinime-952ec4977d772607140773ae7d8868f86a7e0097.zip
Debug flag
Change-Id: Ied846162fd5052a33fd3c8596e73dfdd48c446ee
Diffstat (limited to 'native/jni/src')
-rw-r--r--native/jni/src/defines.h4
-rw-r--r--native/jni/src/proximity_info_state.cpp12
2 files changed, 14 insertions, 2 deletions
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h
index 95a90275d..ad526fb7f 100644
--- a/native/jni/src/defines.h
+++ b/native/jni/src/defines.h
@@ -220,7 +220,11 @@ static inline void prof_out(void) {
#define DEBUG_CORRECTION_FREQ false
#define DEBUG_WORDS_PRIORITY_QUEUE false
+#ifdef FLAG_FULL_DBG
+#define DEBUG_GEO_FULL true
+#else
#define DEBUG_GEO_FULL false
+#endif
#else // FLAG_DBG
diff --git a/native/jni/src/proximity_info_state.cpp b/native/jni/src/proximity_info_state.cpp
index a4eb7e353..f21d00b1f 100644
--- a/native/jni/src/proximity_info_state.cpp
+++ b/native/jni/src/proximity_info_state.cpp
@@ -124,8 +124,8 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
const int x = proximityOnly ? NOT_A_COORDINATE : xCoordinates[i];
const int y = proximityOnly ? NOT_A_COORDINATE : yCoordinates[i];
const int time = times ? times[i] : -1;
- if (pushTouchPoint(i, c, x, y, time, isGeometric, i == lastInputIndex,
- currentNearKeysDistances, prevNearKeysDistances,
+ if (pushTouchPoint(i, c, x, y, time, isGeometric /* do sampling */,
+ i == lastInputIndex, currentNearKeysDistances, prevNearKeysDistances,
prevPrevNearKeysDistances)) {
// Previous point information was popped.
NearKeysDistanceMap *tmp = prevNearKeysDistances;
@@ -218,6 +218,10 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
}
}
}
+
+ if (DEBUG_GEO_FULL) {
+ AKLOGI("ProximityState init finished: %d points out of %d", mInputSize, inputSize);
+ }
}
bool ProximityInfoState::checkAndReturnIsContinuationPossible(const int inputSize,
@@ -402,6 +406,10 @@ bool ProximityInfoState::pushTouchPoint(const int inputIndex, const int nodeChar
mInputYs.push_back(y);
mTimes.push_back(time);
mInputIndice.push_back(inputIndex);
+ if (DEBUG_GEO_FULL) {
+ AKLOGI("pushTouchPoint: x = %03d, y = %03d, time = %d, index = %d, popped ? %01d",
+ x, y, time, inputIndex, popped);
+ }
return popped;
}