am 9c0dfa09
: Merge "Eliminate latency when resampling is disabled" into klp-dev
* commit '9c0dfa09731a8366a7cdcd7171dde64b73af0d5c': Eliminate latency when resampling is disabled
This commit is contained in:
commit
06c964d9b3
@ -376,13 +376,13 @@ InputConsumer::~InputConsumer() {
|
|||||||
|
|
||||||
bool InputConsumer::isTouchResamplingEnabled() {
|
bool InputConsumer::isTouchResamplingEnabled() {
|
||||||
char value[PROPERTY_VALUE_MAX];
|
char value[PROPERTY_VALUE_MAX];
|
||||||
int length = property_get("debug.inputconsumer.resample", value, NULL);
|
int length = property_get("ro.input.noresample", value, NULL);
|
||||||
if (length > 0) {
|
if (length > 0) {
|
||||||
if (!strcmp("0", value)) {
|
if (!strcmp("1", value)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (strcmp("1", value)) {
|
if (strcmp("0", value)) {
|
||||||
ALOGD("Unrecognized property value for 'debug.inputconsumer.resample'. "
|
ALOGD("Unrecognized property value for 'ro.input.noresample'. "
|
||||||
"Use '1' or '0'.");
|
"Use '1' or '0'.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -511,7 +511,7 @@ status_t InputConsumer::consumeBatch(InputEventFactoryInterface* factory,
|
|||||||
status_t result;
|
status_t result;
|
||||||
for (size_t i = mBatches.size(); i-- > 0; ) {
|
for (size_t i = mBatches.size(); i-- > 0; ) {
|
||||||
Batch& batch = mBatches.editItemAt(i);
|
Batch& batch = mBatches.editItemAt(i);
|
||||||
if (frameTime < 0) {
|
if (frameTime < 0 || !mResampleTouch) {
|
||||||
result = consumeSamples(factory, batch, batch.samples.size(),
|
result = consumeSamples(factory, batch, batch.samples.size(),
|
||||||
outSeq, outEvent);
|
outSeq, outEvent);
|
||||||
mBatches.removeAt(i);
|
mBatches.removeAt(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user