From 38a7fabd96566a229a276e7066ac1caf5157e127 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Mon, 30 Aug 2010 03:02:23 -0700 Subject: Input device calibration and capabilities. Finished the input device capability API. Added a mechanism for calibrating touch devices to obtain more accurate information about the touch contact area. Improved pointer location to show new coordinates and capabilities. Optimized pointer location display and formatting to avoid allocating large numbers of temporary objects. The GC churn was causing the application to stutter very badly when more than a couple of fingers were down). Added more diagnostics. Change-Id: Ie25380278ed6f16c5b04cd9df848015850383498 --- libs/ui/InputDispatcher.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'libs/ui/InputDispatcher.cpp') diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp index e35050cb6e..886c7856de 100644 --- a/libs/ui/InputDispatcher.cpp +++ b/libs/ui/InputDispatcher.cpp @@ -405,12 +405,15 @@ void InputDispatcher::processMotionLockedInterruptible( sampleCount += 1; } for (uint32_t i = 0; i < entry->pointerCount; i++) { - LOGD(" Pointer %d: id=%d, x=%f, y=%f, pressure=%f, size=%f", + LOGD(" Pointer %d: id=%d, x=%f, y=%f, pressure=%f, size=%f, " + "touchMajor=%f, touchMinor=%d, toolMajor=%f, toolMinor=%f, " + "orientation=%f", i, entry->pointerIds[i], - sample->pointerCoords[i].x, - sample->pointerCoords[i].y, - sample->pointerCoords[i].pressure, - sample->pointerCoords[i].size); + sample->pointerCoords[i].x, sample->pointerCoords[i].y, + sample->pointerCoords[i].pressure, sample->pointerCoords[i].size, + sample->pointerCoords[i].touchMajor, sample->pointerCoords[i].touchMinor, + sample->pointerCoords[i].toolMajor, sample->pointerCoords[i].toolMinor, + sample->pointerCoords[i].orientation); } // Keep in mind that due to batching, it is possible for the number of samples actually @@ -1080,9 +1083,14 @@ void InputDispatcher::notifyMotion(nsecs_t eventTime, int32_t deviceId, int32_t eventTime, deviceId, source, policyFlags, action, metaState, edgeFlags, xPrecision, yPrecision, downTime); for (uint32_t i = 0; i < pointerCount; i++) { - LOGD(" Pointer %d: id=%d, x=%f, y=%f, pressure=%f, size=%f", + LOGD(" Pointer %d: id=%d, x=%f, y=%f, pressure=%f, size=%f, " + "touchMajor=%f, touchMinor=%d, toolMajor=%f, toolMinor=%f, " + "orientation=%f", i, pointerIds[i], pointerCoords[i].x, pointerCoords[i].y, - pointerCoords[i].pressure, pointerCoords[i].size); + pointerCoords[i].pressure, pointerCoords[i].size, + pointerCoords[i].touchMajor, pointerCoords[i].touchMinor, + pointerCoords[i].toolMajor, pointerCoords[i].toolMinor, + pointerCoords[i].orientation); } #endif -- cgit v1.2.3-59-g8ed1b