am ba7f0d2a: Merge "Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)"
* commit 'ba7f0d2a03643ce429421b81febf18fd50473070': Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
This commit is contained in:
commit
1d99080434
@ -244,7 +244,7 @@ BpMemoryHeap::~BpMemoryHeap() {
|
|||||||
sp<IBinder> binder = const_cast<BpMemoryHeap*>(this)->asBinder();
|
sp<IBinder> binder = const_cast<BpMemoryHeap*>(this)->asBinder();
|
||||||
|
|
||||||
if (VERBOSE) {
|
if (VERBOSE) {
|
||||||
LOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d",
|
ALOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d",
|
||||||
binder.get(), this, mSize, mHeapId);
|
binder.get(), this, mSize, mHeapId);
|
||||||
CallStack stack;
|
CallStack stack;
|
||||||
stack.update();
|
stack.update();
|
||||||
@ -393,7 +393,7 @@ HeapCache::~HeapCache()
|
|||||||
|
|
||||||
void HeapCache::binderDied(const wp<IBinder>& binder)
|
void HeapCache::binderDied(const wp<IBinder>& binder)
|
||||||
{
|
{
|
||||||
//LOGD("binderDied binder=%p", binder.unsafe_get());
|
//ALOGD("binderDied binder=%p", binder.unsafe_get());
|
||||||
free_heap(binder);
|
free_heap(binder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,7 +403,7 @@ sp<IMemoryHeap> HeapCache::find_heap(const sp<IBinder>& binder)
|
|||||||
ssize_t i = mHeapCache.indexOfKey(binder);
|
ssize_t i = mHeapCache.indexOfKey(binder);
|
||||||
if (i>=0) {
|
if (i>=0) {
|
||||||
heap_info_t& info = mHeapCache.editValueAt(i);
|
heap_info_t& info = mHeapCache.editValueAt(i);
|
||||||
LOGD_IF(VERBOSE,
|
ALOGD_IF(VERBOSE,
|
||||||
"found binder=%p, heap=%p, size=%d, fd=%d, count=%d",
|
"found binder=%p, heap=%p, size=%d, fd=%d, count=%d",
|
||||||
binder.get(), info.heap.get(),
|
binder.get(), info.heap.get(),
|
||||||
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
|
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
|
||||||
@ -415,7 +415,7 @@ sp<IMemoryHeap> HeapCache::find_heap(const sp<IBinder>& binder)
|
|||||||
heap_info_t info;
|
heap_info_t info;
|
||||||
info.heap = interface_cast<IMemoryHeap>(binder);
|
info.heap = interface_cast<IMemoryHeap>(binder);
|
||||||
info.count = 1;
|
info.count = 1;
|
||||||
//LOGD("adding binder=%p, heap=%p, count=%d",
|
//ALOGD("adding binder=%p, heap=%p, count=%d",
|
||||||
// binder.get(), info.heap.get(), info.count);
|
// binder.get(), info.heap.get(), info.count);
|
||||||
mHeapCache.add(binder, info);
|
mHeapCache.add(binder, info);
|
||||||
return info.heap;
|
return info.heap;
|
||||||
@ -436,7 +436,7 @@ void HeapCache::free_heap(const wp<IBinder>& binder)
|
|||||||
heap_info_t& info(mHeapCache.editValueAt(i));
|
heap_info_t& info(mHeapCache.editValueAt(i));
|
||||||
int32_t c = android_atomic_dec(&info.count);
|
int32_t c = android_atomic_dec(&info.count);
|
||||||
if (c == 1) {
|
if (c == 1) {
|
||||||
LOGD_IF(VERBOSE,
|
ALOGD_IF(VERBOSE,
|
||||||
"removing binder=%p, heap=%p, size=%d, fd=%d, count=%d",
|
"removing binder=%p, heap=%p, size=%d, fd=%d, count=%d",
|
||||||
binder.unsafe_get(), info.heap.get(),
|
binder.unsafe_get(), info.heap.get(),
|
||||||
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
|
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
|
||||||
@ -468,7 +468,7 @@ void HeapCache::dump_heaps()
|
|||||||
for (int i=0 ; i<c ; i++) {
|
for (int i=0 ; i<c ; i++) {
|
||||||
const heap_info_t& info = mHeapCache.valueAt(i);
|
const heap_info_t& info = mHeapCache.valueAt(i);
|
||||||
BpMemoryHeap const* h(static_cast<BpMemoryHeap const *>(info.heap.get()));
|
BpMemoryHeap const* h(static_cast<BpMemoryHeap const *>(info.heap.get()));
|
||||||
LOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%d)",
|
ALOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%d)",
|
||||||
mHeapCache.keyAt(i).unsafe_get(),
|
mHeapCache.keyAt(i).unsafe_get(),
|
||||||
info.heap.get(), info.count,
|
info.heap.get(), info.count,
|
||||||
h->mHeapId, h->mBase, h->mSize);
|
h->mHeapId, h->mBase, h->mSize);
|
||||||
|
@ -411,7 +411,7 @@ void SimpleBestFitAllocator::dump_l(const char* what) const
|
|||||||
{
|
{
|
||||||
String8 result;
|
String8 result;
|
||||||
dump_l(result, what);
|
dump_l(result, what);
|
||||||
LOGD("%s", result.string());
|
ALOGD("%s", result.string());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleBestFitAllocator::dump(String8& result,
|
void SimpleBestFitAllocator::dump(String8& result,
|
||||||
|
@ -132,7 +132,7 @@ status_t MemoryHeapBase::mapfd(int fd, size_t size, uint32_t offset)
|
|||||||
close(fd);
|
close(fd);
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
//LOGD("mmap(fd=%d, base=%p, size=%lu)", fd, base, size);
|
//ALOGD("mmap(fd=%d, base=%p, size=%lu)", fd, base, size);
|
||||||
mBase = base;
|
mBase = base;
|
||||||
mNeedUnmap = true;
|
mNeedUnmap = true;
|
||||||
} else {
|
} else {
|
||||||
@ -155,7 +155,7 @@ void MemoryHeapBase::dispose()
|
|||||||
int fd = android_atomic_or(-1, &mFD);
|
int fd = android_atomic_or(-1, &mFD);
|
||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
if (mNeedUnmap) {
|
if (mNeedUnmap) {
|
||||||
//LOGD("munmap(fd=%d, base=%p, size=%lu)", fd, mBase, mSize);
|
//ALOGD("munmap(fd=%d, base=%p, size=%lu)", fd, mBase, mSize);
|
||||||
munmap(mBase, mSize);
|
munmap(mBase, mSize);
|
||||||
}
|
}
|
||||||
mBase = 0;
|
mBase = 0;
|
||||||
|
@ -103,7 +103,7 @@ void acquire_object(const sp<ProcessState>& proc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD("Invalid object type 0x%08lx", obj.type);
|
ALOGD("Invalid object type 0x%08lx", obj.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void release_object(const sp<ProcessState>& proc,
|
void release_object(const sp<ProcessState>& proc,
|
||||||
@ -703,7 +703,7 @@ status_t Parcel::writeNativeHandle(const native_handle* handle)
|
|||||||
err = writeDupFileDescriptor(handle->data[i]);
|
err = writeDupFileDescriptor(handle->data[i]);
|
||||||
|
|
||||||
if (err != NO_ERROR) {
|
if (err != NO_ERROR) {
|
||||||
LOGD("write native handle, write dup fd failed");
|
ALOGD("write native handle, write dup fd failed");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
err = write(handle->data + handle->numFds, sizeof(int)*handle->numInts);
|
err = write(handle->data + handle->numFds, sizeof(int)*handle->numInts);
|
||||||
|
@ -101,7 +101,7 @@ bool PermissionCache::checkPermission(
|
|||||||
nsecs_t t = -systemTime();
|
nsecs_t t = -systemTime();
|
||||||
granted = android::checkPermission(permission, pid, uid);
|
granted = android::checkPermission(permission, pid, uid);
|
||||||
t += systemTime();
|
t += systemTime();
|
||||||
LOGD("checking %s for uid=%d => %s (%d us)",
|
ALOGD("checking %s for uid=%d => %s (%d us)",
|
||||||
String8(permission).string(), uid,
|
String8(permission).string(), uid,
|
||||||
granted?"granted":"denied", (int)ns2us(t));
|
granted?"granted":"denied", (int)ns2us(t));
|
||||||
pc.cache(permission, uid, granted);
|
pc.cache(permission, uid, granted);
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
// Macros for including the SurfaceTexture name in log messages
|
// Macros for including the SurfaceTexture name in log messages
|
||||||
#define ST_LOGV(x, ...) ALOGV("[%s] "x, mName.string(), ##__VA_ARGS__)
|
#define ST_LOGV(x, ...) ALOGV("[%s] "x, mName.string(), ##__VA_ARGS__)
|
||||||
#define ST_LOGD(x, ...) LOGD("[%s] "x, mName.string(), ##__VA_ARGS__)
|
#define ST_LOGD(x, ...) ALOGD("[%s] "x, mName.string(), ##__VA_ARGS__)
|
||||||
#define ST_LOGI(x, ...) LOGI("[%s] "x, mName.string(), ##__VA_ARGS__)
|
#define ST_LOGI(x, ...) LOGI("[%s] "x, mName.string(), ##__VA_ARGS__)
|
||||||
#define ST_LOGW(x, ...) LOGW("[%s] "x, mName.string(), ##__VA_ARGS__)
|
#define ST_LOGW(x, ...) LOGW("[%s] "x, mName.string(), ##__VA_ARGS__)
|
||||||
#define ST_LOGE(x, ...) LOGE("[%s] "x, mName.string(), ##__VA_ARGS__)
|
#define ST_LOGE(x, ...) LOGE("[%s] "x, mName.string(), ##__VA_ARGS__)
|
||||||
|
@ -183,13 +183,13 @@ int SurfaceTextureClient::getSlotFromBufferLocked(
|
|||||||
// a buffer.
|
// a buffer.
|
||||||
if (mSlots[i] == NULL) {
|
if (mSlots[i] == NULL) {
|
||||||
if (!dumpedState) {
|
if (!dumpedState) {
|
||||||
LOGD("getSlotFromBufferLocked: encountered NULL buffer in slot %d "
|
ALOGD("getSlotFromBufferLocked: encountered NULL buffer in slot %d "
|
||||||
"looking for buffer %p", i, buffer->handle);
|
"looking for buffer %p", i, buffer->handle);
|
||||||
for (int j = 0; j < NUM_BUFFER_SLOTS; j++) {
|
for (int j = 0; j < NUM_BUFFER_SLOTS; j++) {
|
||||||
if (mSlots[j] == NULL) {
|
if (mSlots[j] == NULL) {
|
||||||
LOGD("getSlotFromBufferLocked: %02d: NULL", j);
|
ALOGD("getSlotFromBufferLocked: %02d: NULL", j);
|
||||||
} else {
|
} else {
|
||||||
LOGD("getSlotFromBufferLocked: %02d: %p", j, mSlots[j]->handle);
|
ALOGD("getSlotFromBufferLocked: %02d: %p", j, mSlots[j]->handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dumpedState = true;
|
dumpedState = true;
|
||||||
|
@ -85,7 +85,7 @@ void GraphicBufferAllocator::dumpToSystemLog()
|
|||||||
{
|
{
|
||||||
String8 s;
|
String8 s;
|
||||||
GraphicBufferAllocator::getInstance().dump(s);
|
GraphicBufferAllocator::getInstance().dump(s);
|
||||||
LOGD("%s", s.string());
|
ALOGD("%s", s.string());
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat format,
|
status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat format,
|
||||||
|
@ -106,11 +106,11 @@ String8 getInputDeviceConfigurationFilePathByName(
|
|||||||
path.append("/usr/");
|
path.append("/usr/");
|
||||||
appendInputDeviceConfigurationFileRelativePath(path, name, type);
|
appendInputDeviceConfigurationFileRelativePath(path, name, type);
|
||||||
#if DEBUG_PROBE
|
#if DEBUG_PROBE
|
||||||
LOGD("Probing for system provided input device configuration file: path='%s'", path.string());
|
ALOGD("Probing for system provided input device configuration file: path='%s'", path.string());
|
||||||
#endif
|
#endif
|
||||||
if (!access(path.string(), R_OK)) {
|
if (!access(path.string(), R_OK)) {
|
||||||
#if DEBUG_PROBE
|
#if DEBUG_PROBE
|
||||||
LOGD("Found");
|
ALOGD("Found");
|
||||||
#endif
|
#endif
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
@ -121,18 +121,18 @@ String8 getInputDeviceConfigurationFilePathByName(
|
|||||||
path.append("/system/devices/");
|
path.append("/system/devices/");
|
||||||
appendInputDeviceConfigurationFileRelativePath(path, name, type);
|
appendInputDeviceConfigurationFileRelativePath(path, name, type);
|
||||||
#if DEBUG_PROBE
|
#if DEBUG_PROBE
|
||||||
LOGD("Probing for system user input device configuration file: path='%s'", path.string());
|
ALOGD("Probing for system user input device configuration file: path='%s'", path.string());
|
||||||
#endif
|
#endif
|
||||||
if (!access(path.string(), R_OK)) {
|
if (!access(path.string(), R_OK)) {
|
||||||
#if DEBUG_PROBE
|
#if DEBUG_PROBE
|
||||||
LOGD("Found");
|
ALOGD("Found");
|
||||||
#endif
|
#endif
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not found.
|
// Not found.
|
||||||
#if DEBUG_PROBE
|
#if DEBUG_PROBE
|
||||||
LOGD("Probe failed to find input device configuration file: name='%s', type=%d",
|
ALOGD("Probe failed to find input device configuration file: name='%s', type=%d",
|
||||||
name.string(), type);
|
name.string(), type);
|
||||||
#endif
|
#endif
|
||||||
return String8();
|
return String8();
|
||||||
@ -782,7 +782,7 @@ void VelocityTracker::addMovement(nsecs_t eventTime, BitSet32 idBits, const Posi
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_VELOCITY
|
#if DEBUG_VELOCITY
|
||||||
LOGD("VelocityTracker: addMovement eventTime=%lld, idBits=0x%08x, activePointerId=%d",
|
ALOGD("VelocityTracker: addMovement eventTime=%lld, idBits=0x%08x, activePointerId=%d",
|
||||||
eventTime, idBits.value, mActivePointerId);
|
eventTime, idBits.value, mActivePointerId);
|
||||||
for (BitSet32 iterBits(idBits); !iterBits.isEmpty(); ) {
|
for (BitSet32 iterBits(idBits); !iterBits.isEmpty(); ) {
|
||||||
uint32_t id = iterBits.firstMarkedBit();
|
uint32_t id = iterBits.firstMarkedBit();
|
||||||
@ -790,7 +790,7 @@ void VelocityTracker::addMovement(nsecs_t eventTime, BitSet32 idBits, const Posi
|
|||||||
iterBits.clearBit(id);
|
iterBits.clearBit(id);
|
||||||
Estimator estimator;
|
Estimator estimator;
|
||||||
getEstimator(id, DEFAULT_DEGREE, DEFAULT_HORIZON, &estimator);
|
getEstimator(id, DEFAULT_DEGREE, DEFAULT_HORIZON, &estimator);
|
||||||
LOGD(" %d: position (%0.3f, %0.3f), "
|
ALOGD(" %d: position (%0.3f, %0.3f), "
|
||||||
"estimator (degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f)",
|
"estimator (degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f)",
|
||||||
id, positions[index].x, positions[index].y,
|
id, positions[index].x, positions[index].y,
|
||||||
int(estimator.degree),
|
int(estimator.degree),
|
||||||
@ -903,7 +903,7 @@ void VelocityTracker::addMovement(const MotionEvent* event) {
|
|||||||
static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32_t n,
|
static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32_t n,
|
||||||
float* outB, float* outDet) {
|
float* outB, float* outDet) {
|
||||||
#if DEBUG_LEAST_SQUARES
|
#if DEBUG_LEAST_SQUARES
|
||||||
LOGD("solveLeastSquares: m=%d, n=%d, x=%s, y=%s", int(m), int(n),
|
ALOGD("solveLeastSquares: m=%d, n=%d, x=%s, y=%s", int(m), int(n),
|
||||||
vectorToString(x, m).string(), vectorToString(y, m).string());
|
vectorToString(x, m).string(), vectorToString(y, m).string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -916,7 +916,7 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if DEBUG_LEAST_SQUARES
|
#if DEBUG_LEAST_SQUARES
|
||||||
LOGD(" - a=%s", matrixToString(&a[0][0], m, n, false /*rowMajor*/).string());
|
ALOGD(" - a=%s", matrixToString(&a[0][0], m, n, false /*rowMajor*/).string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Apply the Gram-Schmidt process to A to obtain its QR decomposition.
|
// Apply the Gram-Schmidt process to A to obtain its QR decomposition.
|
||||||
@ -937,7 +937,7 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
|
|||||||
if (norm < 0.000001f) {
|
if (norm < 0.000001f) {
|
||||||
// vectors are linearly dependent or zero so no solution
|
// vectors are linearly dependent or zero so no solution
|
||||||
#if DEBUG_LEAST_SQUARES
|
#if DEBUG_LEAST_SQUARES
|
||||||
LOGD(" - no solution, norm=%f", norm);
|
ALOGD(" - no solution, norm=%f", norm);
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -951,8 +951,8 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if DEBUG_LEAST_SQUARES
|
#if DEBUG_LEAST_SQUARES
|
||||||
LOGD(" - q=%s", matrixToString(&q[0][0], m, n, false /*rowMajor*/).string());
|
ALOGD(" - q=%s", matrixToString(&q[0][0], m, n, false /*rowMajor*/).string());
|
||||||
LOGD(" - r=%s", matrixToString(&r[0][0], n, n, true /*rowMajor*/).string());
|
ALOGD(" - r=%s", matrixToString(&r[0][0], n, n, true /*rowMajor*/).string());
|
||||||
|
|
||||||
// calculate QR, if we factored A correctly then QR should equal A
|
// calculate QR, if we factored A correctly then QR should equal A
|
||||||
float qr[n][m];
|
float qr[n][m];
|
||||||
@ -964,7 +964,7 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, false /*rowMajor*/).string());
|
ALOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, false /*rowMajor*/).string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Solve R B = Qt Y to find B. This is easy because R is upper triangular.
|
// Solve R B = Qt Y to find B. This is easy because R is upper triangular.
|
||||||
@ -977,7 +977,7 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
|
|||||||
outB[i] /= r[i][i];
|
outB[i] /= r[i][i];
|
||||||
}
|
}
|
||||||
#if DEBUG_LEAST_SQUARES
|
#if DEBUG_LEAST_SQUARES
|
||||||
LOGD(" - b=%s", vectorToString(outB, n).string());
|
ALOGD(" - b=%s", vectorToString(outB, n).string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Calculate the coefficient of determination as 1 - (SSerr / SStot) where
|
// Calculate the coefficient of determination as 1 - (SSerr / SStot) where
|
||||||
@ -1004,9 +1004,9 @@ static bool solveLeastSquares(const float* x, const float* y, uint32_t m, uint32
|
|||||||
}
|
}
|
||||||
*outDet = sstot > 0.000001f ? 1.0f - (sserr / sstot) : 1;
|
*outDet = sstot > 0.000001f ? 1.0f - (sserr / sstot) : 1;
|
||||||
#if DEBUG_LEAST_SQUARES
|
#if DEBUG_LEAST_SQUARES
|
||||||
LOGD(" - sserr=%f", sserr);
|
ALOGD(" - sserr=%f", sserr);
|
||||||
LOGD(" - sstot=%f", sstot);
|
ALOGD(" - sstot=%f", sstot);
|
||||||
LOGD(" - det=%f", *outDet);
|
ALOGD(" - det=%f", *outDet);
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1073,7 +1073,7 @@ bool VelocityTracker::getEstimator(uint32_t id, uint32_t degree, nsecs_t horizon
|
|||||||
outEstimator->degree = degree;
|
outEstimator->degree = degree;
|
||||||
outEstimator->confidence = xdet * ydet;
|
outEstimator->confidence = xdet * ydet;
|
||||||
#if DEBUG_LEAST_SQUARES
|
#if DEBUG_LEAST_SQUARES
|
||||||
LOGD("estimate: degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f",
|
ALOGD("estimate: degree=%d, xCoeff=%s, yCoeff=%s, confidence=%f",
|
||||||
int(outEstimator->degree),
|
int(outEstimator->degree),
|
||||||
vectorToString(outEstimator->xCoeff, n).string(),
|
vectorToString(outEstimator->xCoeff, n).string(),
|
||||||
vectorToString(outEstimator->yCoeff, n).string(),
|
vectorToString(outEstimator->yCoeff, n).string(),
|
||||||
@ -1116,7 +1116,7 @@ void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
|
|||||||
if ((deltaX && *deltaX) || (deltaY && *deltaY)) {
|
if ((deltaX && *deltaX) || (deltaY && *deltaY)) {
|
||||||
if (eventTime >= mLastMovementTime + STOP_TIME) {
|
if (eventTime >= mLastMovementTime + STOP_TIME) {
|
||||||
#if DEBUG_ACCELERATION
|
#if DEBUG_ACCELERATION
|
||||||
LOGD("VelocityControl: stopped, last movement was %0.3fms ago",
|
ALOGD("VelocityControl: stopped, last movement was %0.3fms ago",
|
||||||
(eventTime - mLastMovementTime) * 0.000001f);
|
(eventTime - mLastMovementTime) * 0.000001f);
|
||||||
#endif
|
#endif
|
||||||
reset();
|
reset();
|
||||||
@ -1147,7 +1147,7 @@ void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_ACCELERATION
|
#if DEBUG_ACCELERATION
|
||||||
LOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): "
|
ALOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): "
|
||||||
"vx=%0.3f, vy=%0.3f, speed=%0.3f, accel=%0.3f",
|
"vx=%0.3f, vy=%0.3f, speed=%0.3f, accel=%0.3f",
|
||||||
mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
|
mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
|
||||||
mParameters.acceleration,
|
mParameters.acceleration,
|
||||||
@ -1155,7 +1155,7 @@ void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#if DEBUG_ACCELERATION
|
#if DEBUG_ACCELERATION
|
||||||
LOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): unknown velocity",
|
ALOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): unknown velocity",
|
||||||
mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
|
mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
|
||||||
mParameters.acceleration);
|
mParameters.acceleration);
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,7 +55,7 @@ InputChannel::InputChannel(const String8& name, int32_t ashmemFd, int32_t receiv
|
|||||||
int32_t sendPipeFd) :
|
int32_t sendPipeFd) :
|
||||||
mName(name), mAshmemFd(ashmemFd), mReceivePipeFd(receivePipeFd), mSendPipeFd(sendPipeFd) {
|
mName(name), mAshmemFd(ashmemFd), mReceivePipeFd(receivePipeFd), mSendPipeFd(sendPipeFd) {
|
||||||
#if DEBUG_CHANNEL_LIFECYCLE
|
#if DEBUG_CHANNEL_LIFECYCLE
|
||||||
LOGD("Input channel constructed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
|
ALOGD("Input channel constructed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
|
||||||
mName.string(), ashmemFd, receivePipeFd, sendPipeFd);
|
mName.string(), ashmemFd, receivePipeFd, sendPipeFd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ InputChannel::InputChannel(const String8& name, int32_t ashmemFd, int32_t receiv
|
|||||||
|
|
||||||
InputChannel::~InputChannel() {
|
InputChannel::~InputChannel() {
|
||||||
#if DEBUG_CHANNEL_LIFECYCLE
|
#if DEBUG_CHANNEL_LIFECYCLE
|
||||||
LOGD("Input channel destroyed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
|
ALOGD("Input channel destroyed: name='%s', ashmemFd=%d, receivePipeFd=%d, sendPipeFd=%d",
|
||||||
mName.string(), mAshmemFd, mReceivePipeFd, mSendPipeFd);
|
mName.string(), mAshmemFd, mReceivePipeFd, mSendPipeFd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -150,13 +150,13 @@ status_t InputChannel::sendSignal(char signal) {
|
|||||||
|
|
||||||
if (nWrite == 1) {
|
if (nWrite == 1) {
|
||||||
#if DEBUG_CHANNEL_SIGNALS
|
#if DEBUG_CHANNEL_SIGNALS
|
||||||
LOGD("channel '%s' ~ sent signal '%c'", mName.string(), signal);
|
ALOGD("channel '%s' ~ sent signal '%c'", mName.string(), signal);
|
||||||
#endif
|
#endif
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_CHANNEL_SIGNALS
|
#if DEBUG_CHANNEL_SIGNALS
|
||||||
LOGD("channel '%s' ~ error sending signal '%c', errno=%d", mName.string(), signal, errno);
|
ALOGD("channel '%s' ~ error sending signal '%c', errno=%d", mName.string(), signal, errno);
|
||||||
#endif
|
#endif
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
@ -169,27 +169,27 @@ status_t InputChannel::receiveSignal(char* outSignal) {
|
|||||||
|
|
||||||
if (nRead == 1) {
|
if (nRead == 1) {
|
||||||
#if DEBUG_CHANNEL_SIGNALS
|
#if DEBUG_CHANNEL_SIGNALS
|
||||||
LOGD("channel '%s' ~ received signal '%c'", mName.string(), *outSignal);
|
ALOGD("channel '%s' ~ received signal '%c'", mName.string(), *outSignal);
|
||||||
#endif
|
#endif
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nRead == 0) { // check for EOF
|
if (nRead == 0) { // check for EOF
|
||||||
#if DEBUG_CHANNEL_SIGNALS
|
#if DEBUG_CHANNEL_SIGNALS
|
||||||
LOGD("channel '%s' ~ receive signal failed because peer was closed", mName.string());
|
ALOGD("channel '%s' ~ receive signal failed because peer was closed", mName.string());
|
||||||
#endif
|
#endif
|
||||||
return DEAD_OBJECT;
|
return DEAD_OBJECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errno == EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
#if DEBUG_CHANNEL_SIGNALS
|
#if DEBUG_CHANNEL_SIGNALS
|
||||||
LOGD("channel '%s' ~ receive signal failed because no signal available", mName.string());
|
ALOGD("channel '%s' ~ receive signal failed because no signal available", mName.string());
|
||||||
#endif
|
#endif
|
||||||
return WOULD_BLOCK;
|
return WOULD_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_CHANNEL_SIGNALS
|
#if DEBUG_CHANNEL_SIGNALS
|
||||||
LOGD("channel '%s' ~ receive signal failed, errno=%d", mName.string(), errno);
|
ALOGD("channel '%s' ~ receive signal failed, errno=%d", mName.string(), errno);
|
||||||
#endif
|
#endif
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ InputPublisher::~InputPublisher() {
|
|||||||
|
|
||||||
status_t InputPublisher::initialize() {
|
status_t InputPublisher::initialize() {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' publisher ~ initialize",
|
ALOGD("channel '%s' publisher ~ initialize",
|
||||||
mChannel->getName().string());
|
mChannel->getName().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ status_t InputPublisher::initialize() {
|
|||||||
|
|
||||||
status_t InputPublisher::reset() {
|
status_t InputPublisher::reset() {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' publisher ~ reset",
|
ALOGD("channel '%s' publisher ~ reset",
|
||||||
mChannel->getName().string());
|
mChannel->getName().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -337,7 +337,7 @@ status_t InputPublisher::publishKeyEvent(
|
|||||||
nsecs_t downTime,
|
nsecs_t downTime,
|
||||||
nsecs_t eventTime) {
|
nsecs_t eventTime) {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' publisher ~ publishKeyEvent: deviceId=%d, source=0x%x, "
|
ALOGD("channel '%s' publisher ~ publishKeyEvent: deviceId=%d, source=0x%x, "
|
||||||
"action=0x%x, flags=0x%x, keyCode=%d, scanCode=%d, metaState=0x%x, repeatCount=%d,"
|
"action=0x%x, flags=0x%x, keyCode=%d, scanCode=%d, metaState=0x%x, repeatCount=%d,"
|
||||||
"downTime=%lld, eventTime=%lld",
|
"downTime=%lld, eventTime=%lld",
|
||||||
mChannel->getName().string(),
|
mChannel->getName().string(),
|
||||||
@ -379,7 +379,7 @@ status_t InputPublisher::publishMotionEvent(
|
|||||||
const PointerProperties* pointerProperties,
|
const PointerProperties* pointerProperties,
|
||||||
const PointerCoords* pointerCoords) {
|
const PointerCoords* pointerCoords) {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' publisher ~ publishMotionEvent: deviceId=%d, source=0x%x, "
|
ALOGD("channel '%s' publisher ~ publishMotionEvent: deviceId=%d, source=0x%x, "
|
||||||
"action=0x%x, flags=0x%x, edgeFlags=0x%x, metaState=0x%x, buttonState=0x%x, "
|
"action=0x%x, flags=0x%x, edgeFlags=0x%x, metaState=0x%x, buttonState=0x%x, "
|
||||||
"xOffset=%f, yOffset=%f, "
|
"xOffset=%f, yOffset=%f, "
|
||||||
"xPrecision=%f, yPrecision=%f, downTime=%lld, eventTime=%lld, "
|
"xPrecision=%f, yPrecision=%f, downTime=%lld, eventTime=%lld, "
|
||||||
@ -439,7 +439,7 @@ status_t InputPublisher::appendMotionSample(
|
|||||||
nsecs_t eventTime,
|
nsecs_t eventTime,
|
||||||
const PointerCoords* pointerCoords) {
|
const PointerCoords* pointerCoords) {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' publisher ~ appendMotionSample: eventTime=%lld",
|
ALOGD("channel '%s' publisher ~ appendMotionSample: eventTime=%lld",
|
||||||
mChannel->getName().string(), eventTime);
|
mChannel->getName().string(), eventTime);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -457,7 +457,7 @@ status_t InputPublisher::appendMotionSample(
|
|||||||
|
|
||||||
if (newBytesUsed > mAshmemSize) {
|
if (newBytesUsed > mAshmemSize) {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' publisher ~ Cannot append motion sample because the shared memory "
|
ALOGD("channel '%s' publisher ~ Cannot append motion sample because the shared memory "
|
||||||
"buffer is full. Buffer size: %d bytes, pointers: %d, samples: %d",
|
"buffer is full. Buffer size: %d bytes, pointers: %d, samples: %d",
|
||||||
mChannel->getName().string(),
|
mChannel->getName().string(),
|
||||||
mAshmemSize, mMotionEventPointerCount, mSharedMessage->motion.sampleCount);
|
mAshmemSize, mMotionEventPointerCount, mSharedMessage->motion.sampleCount);
|
||||||
@ -473,7 +473,7 @@ status_t InputPublisher::appendMotionSample(
|
|||||||
// Only possible source of contention is the consumer having consumed (or being in the
|
// Only possible source of contention is the consumer having consumed (or being in the
|
||||||
// process of consuming) the message and left the semaphore count at 0.
|
// process of consuming) the message and left the semaphore count at 0.
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' publisher ~ Cannot append motion sample because the message has "
|
ALOGD("channel '%s' publisher ~ Cannot append motion sample because the message has "
|
||||||
"already been consumed.", mChannel->getName().string());
|
"already been consumed.", mChannel->getName().string());
|
||||||
#endif
|
#endif
|
||||||
return FAILED_TRANSACTION;
|
return FAILED_TRANSACTION;
|
||||||
@ -506,7 +506,7 @@ status_t InputPublisher::appendMotionSample(
|
|||||||
|
|
||||||
status_t InputPublisher::sendDispatchSignal() {
|
status_t InputPublisher::sendDispatchSignal() {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' publisher ~ sendDispatchSignal",
|
ALOGD("channel '%s' publisher ~ sendDispatchSignal",
|
||||||
mChannel->getName().string());
|
mChannel->getName().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ status_t InputPublisher::sendDispatchSignal() {
|
|||||||
|
|
||||||
status_t InputPublisher::receiveFinishedSignal(bool* outHandled) {
|
status_t InputPublisher::receiveFinishedSignal(bool* outHandled) {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' publisher ~ receiveFinishedSignal",
|
ALOGD("channel '%s' publisher ~ receiveFinishedSignal",
|
||||||
mChannel->getName().string());
|
mChannel->getName().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -552,7 +552,7 @@ InputConsumer::~InputConsumer() {
|
|||||||
|
|
||||||
status_t InputConsumer::initialize() {
|
status_t InputConsumer::initialize() {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' consumer ~ initialize",
|
ALOGD("channel '%s' consumer ~ initialize",
|
||||||
mChannel->getName().string());
|
mChannel->getName().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -579,7 +579,7 @@ status_t InputConsumer::initialize() {
|
|||||||
|
|
||||||
status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent** outEvent) {
|
status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent** outEvent) {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' consumer ~ consume",
|
ALOGD("channel '%s' consumer ~ consume",
|
||||||
mChannel->getName().string());
|
mChannel->getName().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -650,7 +650,7 @@ status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent*
|
|||||||
|
|
||||||
status_t InputConsumer::sendFinishedSignal(bool handled) {
|
status_t InputConsumer::sendFinishedSignal(bool handled) {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' consumer ~ sendFinishedSignal: handled=%d",
|
ALOGD("channel '%s' consumer ~ sendFinishedSignal: handled=%d",
|
||||||
mChannel->getName().string(), handled);
|
mChannel->getName().string(), handled);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -661,7 +661,7 @@ status_t InputConsumer::sendFinishedSignal(bool handled) {
|
|||||||
|
|
||||||
status_t InputConsumer::receiveDispatchSignal() {
|
status_t InputConsumer::receiveDispatchSignal() {
|
||||||
#if DEBUG_TRANSPORT_ACTIONS
|
#if DEBUG_TRANSPORT_ACTIONS
|
||||||
LOGD("channel '%s' consumer ~ receiveDispatchSignal",
|
ALOGD("channel '%s' consumer ~ receiveDispatchSignal",
|
||||||
mChannel->getName().string());
|
mChannel->getName().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ status_t KeyCharacterMap::load(const String8& filename, KeyCharacterMap** outMap
|
|||||||
status = parser.parse();
|
status = parser.parse();
|
||||||
#if DEBUG_PARSER_PERFORMANCE
|
#if DEBUG_PARSER_PERFORMANCE
|
||||||
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
|
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
|
||||||
LOGD("Parsed key character map file '%s' %d lines in %0.3fms.",
|
ALOGD("Parsed key character map file '%s' %d lines in %0.3fms.",
|
||||||
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
|
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
|
||||||
elapsedTime / 1000000.0);
|
elapsedTime / 1000000.0);
|
||||||
#endif
|
#endif
|
||||||
@ -135,7 +135,7 @@ char16_t KeyCharacterMap::getDisplayLabel(int32_t keyCode) const {
|
|||||||
result = key->label;
|
result = key->label;
|
||||||
}
|
}
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("getDisplayLabel: keyCode=%d ~ Result %d.", keyCode, result);
|
ALOGD("getDisplayLabel: keyCode=%d ~ Result %d.", keyCode, result);
|
||||||
#endif
|
#endif
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ char16_t KeyCharacterMap::getNumber(int32_t keyCode) const {
|
|||||||
result = key->number;
|
result = key->number;
|
||||||
}
|
}
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("getNumber: keyCode=%d ~ Result %d.", keyCode, result);
|
ALOGD("getNumber: keyCode=%d ~ Result %d.", keyCode, result);
|
||||||
#endif
|
#endif
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ char16_t KeyCharacterMap::getCharacter(int32_t keyCode, int32_t metaState) const
|
|||||||
result = behavior->character;
|
result = behavior->character;
|
||||||
}
|
}
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("getCharacter: keyCode=%d, metaState=0x%08x ~ Result %d.", keyCode, metaState, result);
|
ALOGD("getCharacter: keyCode=%d, metaState=0x%08x ~ Result %d.", keyCode, metaState, result);
|
||||||
#endif
|
#endif
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ bool KeyCharacterMap::getFallbackAction(int32_t keyCode, int32_t metaState,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("getFallbackKeyCode: keyCode=%d, metaState=0x%08x ~ Result %s, "
|
ALOGD("getFallbackKeyCode: keyCode=%d, metaState=0x%08x ~ Result %s, "
|
||||||
"fallback keyCode=%d, fallback metaState=0x%08x.",
|
"fallback keyCode=%d, fallback metaState=0x%08x.",
|
||||||
keyCode, metaState, result ? "true" : "false",
|
keyCode, metaState, result ? "true" : "false",
|
||||||
outFallbackAction->keyCode, outFallbackAction->metaState);
|
outFallbackAction->keyCode, outFallbackAction->metaState);
|
||||||
@ -213,7 +213,7 @@ char16_t KeyCharacterMap::getMatch(int32_t keyCode, const char16_t* chars, size_
|
|||||||
ExactMatch: ;
|
ExactMatch: ;
|
||||||
}
|
}
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("getMatch: keyCode=%d, chars=[%s], metaState=0x%08x ~ Result %d.",
|
ALOGD("getMatch: keyCode=%d, chars=[%s], metaState=0x%08x ~ Result %d.",
|
||||||
keyCode, toString(chars, numChars).string(), metaState, result);
|
keyCode, toString(chars, numChars).string(), metaState, result);
|
||||||
#endif
|
#endif
|
||||||
return result;
|
return result;
|
||||||
@ -228,7 +228,7 @@ bool KeyCharacterMap::getEvents(int32_t deviceId, const char16_t* chars, size_t
|
|||||||
char16_t ch = chars[i];
|
char16_t ch = chars[i];
|
||||||
if (!findKey(ch, &keyCode, &metaState)) {
|
if (!findKey(ch, &keyCode, &metaState)) {
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("getEvents: deviceId=%d, chars=[%s] ~ Failed to find mapping for character %d.",
|
ALOGD("getEvents: deviceId=%d, chars=[%s] ~ Failed to find mapping for character %d.",
|
||||||
deviceId, toString(chars, numChars).string(), ch);
|
deviceId, toString(chars, numChars).string(), ch);
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
@ -241,10 +241,10 @@ bool KeyCharacterMap::getEvents(int32_t deviceId, const char16_t* chars, size_t
|
|||||||
addMetaKeys(outEvents, deviceId, metaState, false, now, ¤tMetaState);
|
addMetaKeys(outEvents, deviceId, metaState, false, now, ¤tMetaState);
|
||||||
}
|
}
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("getEvents: deviceId=%d, chars=[%s] ~ Generated %d events.",
|
ALOGD("getEvents: deviceId=%d, chars=[%s] ~ Generated %d events.",
|
||||||
deviceId, toString(chars, numChars).string(), int32_t(outEvents.size()));
|
deviceId, toString(chars, numChars).string(), int32_t(outEvents.size()));
|
||||||
for (size_t i = 0; i < outEvents.size(); i++) {
|
for (size_t i = 0; i < outEvents.size(); i++) {
|
||||||
LOGD(" Key: keyCode=%d, metaState=0x%08x, %s.",
|
ALOGD(" Key: keyCode=%d, metaState=0x%08x, %s.",
|
||||||
outEvents[i].getKeyCode(), outEvents[i].getMetaState(),
|
outEvents[i].getKeyCode(), outEvents[i].getMetaState(),
|
||||||
outEvents[i].getAction() == AKEY_EVENT_ACTION_DOWN ? "down" : "up");
|
outEvents[i].getAction() == AKEY_EVENT_ACTION_DOWN ? "down" : "up");
|
||||||
}
|
}
|
||||||
@ -455,7 +455,7 @@ KeyCharacterMap::Parser::~Parser() {
|
|||||||
status_t KeyCharacterMap::Parser::parse() {
|
status_t KeyCharacterMap::Parser::parse() {
|
||||||
while (!mTokenizer->isEof()) {
|
while (!mTokenizer->isEof()) {
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
|
ALOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
|
||||||
mTokenizer->peekRemainderOfLine().string());
|
mTokenizer->peekRemainderOfLine().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -541,7 +541,7 @@ status_t KeyCharacterMap::Parser::parseType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsed type: type=%d.", type);
|
ALOGD("Parsed type: type=%d.", type);
|
||||||
#endif
|
#endif
|
||||||
mMap->mType = type;
|
mMap->mType = type;
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
@ -570,7 +570,7 @@ status_t KeyCharacterMap::Parser::parseKey() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsed beginning of key: keyCode=%d.", keyCode);
|
ALOGD("Parsed beginning of key: keyCode=%d.", keyCode);
|
||||||
#endif
|
#endif
|
||||||
mKeyCode = keyCode;
|
mKeyCode = keyCode;
|
||||||
mMap->mKeys.add(keyCode, new Key());
|
mMap->mKeys.add(keyCode, new Key());
|
||||||
@ -694,7 +694,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
|
|||||||
}
|
}
|
||||||
key->label = behavior.character;
|
key->label = behavior.character;
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsed key label: keyCode=%d, label=%d.", mKeyCode, key->label);
|
ALOGD("Parsed key label: keyCode=%d, label=%d.", mKeyCode, key->label);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case PROPERTY_NUMBER:
|
case PROPERTY_NUMBER:
|
||||||
@ -705,7 +705,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
|
|||||||
}
|
}
|
||||||
key->number = behavior.character;
|
key->number = behavior.character;
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsed key number: keyCode=%d, number=%d.", mKeyCode, key->number);
|
ALOGD("Parsed key number: keyCode=%d, number=%d.", mKeyCode, key->number);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case PROPERTY_META: {
|
case PROPERTY_META: {
|
||||||
@ -721,7 +721,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
|
|||||||
newBehavior->next = key->firstBehavior;
|
newBehavior->next = key->firstBehavior;
|
||||||
key->firstBehavior = newBehavior;
|
key->firstBehavior = newBehavior;
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsed key meta: keyCode=%d, meta=0x%x, char=%d, fallback=%d.", mKeyCode,
|
ALOGD("Parsed key meta: keyCode=%d, meta=0x%x, char=%d, fallback=%d.", mKeyCode,
|
||||||
newBehavior->metaState, newBehavior->character, newBehavior->fallbackKeyCode);
|
newBehavior->metaState, newBehavior->character, newBehavior->fallbackKeyCode);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -67,7 +67,7 @@ status_t KeyLayoutMap::load(const String8& filename, KeyLayoutMap** outMap) {
|
|||||||
status = parser.parse();
|
status = parser.parse();
|
||||||
#if DEBUG_PARSER_PERFORMANCE
|
#if DEBUG_PARSER_PERFORMANCE
|
||||||
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
|
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
|
||||||
LOGD("Parsed key layout map file '%s' %d lines in %0.3fms.",
|
ALOGD("Parsed key layout map file '%s' %d lines in %0.3fms.",
|
||||||
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
|
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
|
||||||
elapsedTime / 1000000.0);
|
elapsedTime / 1000000.0);
|
||||||
#endif
|
#endif
|
||||||
@ -86,7 +86,7 @@ status_t KeyLayoutMap::mapKey(int32_t scanCode, int32_t* keyCode, uint32_t* flag
|
|||||||
ssize_t index = mKeys.indexOfKey(scanCode);
|
ssize_t index = mKeys.indexOfKey(scanCode);
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("mapKey: scanCode=%d ~ Failed.", scanCode);
|
ALOGD("mapKey: scanCode=%d ~ Failed.", scanCode);
|
||||||
#endif
|
#endif
|
||||||
*keyCode = AKEYCODE_UNKNOWN;
|
*keyCode = AKEYCODE_UNKNOWN;
|
||||||
*flags = 0;
|
*flags = 0;
|
||||||
@ -98,7 +98,7 @@ status_t KeyLayoutMap::mapKey(int32_t scanCode, int32_t* keyCode, uint32_t* flag
|
|||||||
*flags = k.flags;
|
*flags = k.flags;
|
||||||
|
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("mapKey: scanCode=%d ~ Result keyCode=%d, flags=0x%08x.", scanCode, *keyCode, *flags);
|
ALOGD("mapKey: scanCode=%d ~ Result keyCode=%d, flags=0x%08x.", scanCode, *keyCode, *flags);
|
||||||
#endif
|
#endif
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ status_t KeyLayoutMap::mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const {
|
|||||||
ssize_t index = mAxes.indexOfKey(scanCode);
|
ssize_t index = mAxes.indexOfKey(scanCode);
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("mapAxis: scanCode=%d ~ Failed.", scanCode);
|
ALOGD("mapAxis: scanCode=%d ~ Failed.", scanCode);
|
||||||
#endif
|
#endif
|
||||||
return NAME_NOT_FOUND;
|
return NAME_NOT_FOUND;
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ status_t KeyLayoutMap::mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const {
|
|||||||
*outAxisInfo = mAxes.valueAt(index);
|
*outAxisInfo = mAxes.valueAt(index);
|
||||||
|
|
||||||
#if DEBUG_MAPPING
|
#if DEBUG_MAPPING
|
||||||
LOGD("mapAxis: scanCode=%d ~ Result mode=%d, axis=%d, highAxis=%d, "
|
ALOGD("mapAxis: scanCode=%d ~ Result mode=%d, axis=%d, highAxis=%d, "
|
||||||
"splitValue=%d, flatOverride=%d.",
|
"splitValue=%d, flatOverride=%d.",
|
||||||
scanCode,
|
scanCode,
|
||||||
outAxisInfo->mode, outAxisInfo->axis, outAxisInfo->highAxis,
|
outAxisInfo->mode, outAxisInfo->axis, outAxisInfo->highAxis,
|
||||||
@ -147,7 +147,7 @@ KeyLayoutMap::Parser::~Parser() {
|
|||||||
status_t KeyLayoutMap::Parser::parse() {
|
status_t KeyLayoutMap::Parser::parse() {
|
||||||
while (!mTokenizer->isEof()) {
|
while (!mTokenizer->isEof()) {
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
|
ALOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
|
||||||
mTokenizer->peekRemainderOfLine().string());
|
mTokenizer->peekRemainderOfLine().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ status_t KeyLayoutMap::Parser::parseKey() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsed key: scanCode=%d, keyCode=%d, flags=0x%08x.", scanCode, keyCode, flags);
|
ALOGD("Parsed key: scanCode=%d, keyCode=%d, flags=0x%08x.", scanCode, keyCode, flags);
|
||||||
#endif
|
#endif
|
||||||
Key key;
|
Key key;
|
||||||
key.keyCode = keyCode;
|
key.keyCode = keyCode;
|
||||||
@ -328,7 +328,7 @@ status_t KeyLayoutMap::Parser::parseAxis() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsed axis: scanCode=%d, mode=%d, axis=%d, highAxis=%d, "
|
ALOGD("Parsed axis: scanCode=%d, mode=%d, axis=%d, highAxis=%d, "
|
||||||
"splitValue=%d, flatOverride=%d.",
|
"splitValue=%d, flatOverride=%d.",
|
||||||
scanCode,
|
scanCode,
|
||||||
axisInfo.mode, axisInfo.axis, axisInfo.highAxis,
|
axisInfo.mode, axisInfo.axis, axisInfo.highAxis,
|
||||||
|
@ -272,7 +272,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()(const Rect& rect) {
|
virtual void operator()(const Rect& rect) {
|
||||||
//LOGD(">>> %3d, %3d, %3d, %3d",
|
//ALOGD(">>> %3d, %3d, %3d, %3d",
|
||||||
// rect.left, rect.top, rect.right, rect.bottom);
|
// rect.left, rect.top, rect.right, rect.bottom);
|
||||||
if (span.size()) {
|
if (span.size()) {
|
||||||
if (cur->top != rect.top) {
|
if (cur->top != rect.top) {
|
||||||
@ -457,14 +457,14 @@ void Region::boolean_operation(int op, Region& dst,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!same) {
|
if(!same) {
|
||||||
LOGD("---\nregion boolean %s failed", name);
|
ALOGD("---\nregion boolean %s failed", name);
|
||||||
lhs.dump("lhs");
|
lhs.dump("lhs");
|
||||||
rhs.dump("rhs");
|
rhs.dump("rhs");
|
||||||
dst.dump("dst");
|
dst.dump("dst");
|
||||||
LOGD("should be");
|
ALOGD("should be");
|
||||||
SkRegion::Iterator it(sk_dst);
|
SkRegion::Iterator it(sk_dst);
|
||||||
while (!it.done()) {
|
while (!it.done()) {
|
||||||
LOGD(" [%3d, %3d, %3d, %3d]",
|
ALOGD(" [%3d, %3d, %3d, %3d]",
|
||||||
it.rect().fLeft,
|
it.rect().fLeft,
|
||||||
it.rect().fTop,
|
it.rect().fTop,
|
||||||
it.rect().fRight,
|
it.rect().fRight,
|
||||||
@ -647,9 +647,9 @@ void Region::dump(const char* what, uint32_t flags) const
|
|||||||
(void)flags;
|
(void)flags;
|
||||||
const_iterator head = begin();
|
const_iterator head = begin();
|
||||||
const_iterator const tail = end();
|
const_iterator const tail = end();
|
||||||
LOGD(" Region %s (this=%p, count=%d)\n", what, this, tail-head);
|
ALOGD(" Region %s (this=%p, count=%d)\n", what, this, tail-head);
|
||||||
while (head != tail) {
|
while (head != tail) {
|
||||||
LOGD(" [%3d, %3d, %3d, %3d]\n",
|
ALOGD(" [%3d, %3d, %3d, %3d]\n",
|
||||||
head->left, head->top, head->right, head->bottom);
|
head->left, head->top, head->right, head->bottom);
|
||||||
head++;
|
head++;
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ status_t VirtualKeyMap::load(const String8& filename, VirtualKeyMap** outMap) {
|
|||||||
status = parser.parse();
|
status = parser.parse();
|
||||||
#if DEBUG_PARSER_PERFORMANCE
|
#if DEBUG_PARSER_PERFORMANCE
|
||||||
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
|
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
|
||||||
LOGD("Parsed key character map file '%s' %d lines in %0.3fms.",
|
ALOGD("Parsed key character map file '%s' %d lines in %0.3fms.",
|
||||||
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
|
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
|
||||||
elapsedTime / 1000000.0);
|
elapsedTime / 1000000.0);
|
||||||
#endif
|
#endif
|
||||||
@ -93,7 +93,7 @@ VirtualKeyMap::Parser::~Parser() {
|
|||||||
status_t VirtualKeyMap::Parser::parse() {
|
status_t VirtualKeyMap::Parser::parse() {
|
||||||
while (!mTokenizer->isEof()) {
|
while (!mTokenizer->isEof()) {
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
|
ALOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
|
||||||
mTokenizer->peekRemainderOfLine().string());
|
mTokenizer->peekRemainderOfLine().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ status_t VirtualKeyMap::Parser::parse() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsed virtual key: scanCode=%d, centerX=%d, centerY=%d, "
|
ALOGD("Parsed virtual key: scanCode=%d, centerX=%d, centerY=%d, "
|
||||||
"width=%d, height=%d",
|
"width=%d, height=%d",
|
||||||
defn.scanCode, defn.centerX, defn.centerY, defn.width, defn.height);
|
defn.scanCode, defn.centerX, defn.centerY, defn.width, defn.height);
|
||||||
#endif
|
#endif
|
||||||
|
@ -58,7 +58,7 @@ int main()
|
|||||||
//reg2.dump("reg2");
|
//reg2.dump("reg2");
|
||||||
//reg3.dump("reg3");
|
//reg3.dump("reg3");
|
||||||
|
|
||||||
LOGD("---");
|
ALOGD("---");
|
||||||
reg2 = reg0 | reg0.translate(100, 0);
|
reg2 = reg0 | reg0.translate(100, 0);
|
||||||
reg0.dump("reg0");
|
reg0.dump("reg0");
|
||||||
reg1.dump("reg1");
|
reg1.dump("reg1");
|
||||||
|
@ -210,7 +210,7 @@ Asset::~Asset(void)
|
|||||||
offset = ftell(fp);
|
offset = ftell(fp);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
if (!scanResult) {
|
if (!scanResult) {
|
||||||
LOGD("File '%s' is not in gzip format\n", fileName);
|
ALOGD("File '%s' is not in gzip format\n", fileName);
|
||||||
::close(fd);
|
::close(fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -384,12 +384,12 @@ status_t _FileAsset::openChunk(const char* fileName, int fd, off64_t offset, siz
|
|||||||
fileLength = lseek64(fd, 0, SEEK_END);
|
fileLength = lseek64(fd, 0, SEEK_END);
|
||||||
if (fileLength == (off64_t) -1) {
|
if (fileLength == (off64_t) -1) {
|
||||||
// probably a bad file descriptor
|
// probably a bad file descriptor
|
||||||
LOGD("failed lseek (errno=%d)\n", errno);
|
ALOGD("failed lseek (errno=%d)\n", errno);
|
||||||
return UNKNOWN_ERROR;
|
return UNKNOWN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((off64_t) (offset + length) > fileLength) {
|
if ((off64_t) (offset + length) > fileLength) {
|
||||||
LOGD("start (%ld) + len (%ld) > end (%ld)\n",
|
ALOGD("start (%ld) + len (%ld) > end (%ld)\n",
|
||||||
(long) offset, (long) length, (long) fileLength);
|
(long) offset, (long) length, (long) fileLength);
|
||||||
return BAD_INDEX;
|
return BAD_INDEX;
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ bool AssetManager::getZipEntryCrcLocked(const String8& zipPath, const char* entr
|
|||||||
bool AssetManager::createIdmapFileLocked(const String8& originalPath, const String8& overlayPath,
|
bool AssetManager::createIdmapFileLocked(const String8& originalPath, const String8& overlayPath,
|
||||||
const String8& idmapPath)
|
const String8& idmapPath)
|
||||||
{
|
{
|
||||||
LOGD("%s: originalPath=%s overlayPath=%s idmapPath=%s\n",
|
ALOGD("%s: originalPath=%s overlayPath=%s idmapPath=%s\n",
|
||||||
__FUNCTION__, originalPath.string(), overlayPath.string(), idmapPath.string());
|
__FUNCTION__, originalPath.string(), overlayPath.string(), idmapPath.string());
|
||||||
ResTable tables[2];
|
ResTable tables[2];
|
||||||
const String8* paths[2] = { &originalPath, &overlayPath };
|
const String8* paths[2] = { &originalPath, &overlayPath };
|
||||||
@ -923,7 +923,7 @@ Asset* AssetManager::openInLocaleVendorLocked(const char* fileName, AccessMode m
|
|||||||
*/
|
*/
|
||||||
if (found) {
|
if (found) {
|
||||||
if (pAsset == NULL)
|
if (pAsset == NULL)
|
||||||
LOGD("Expected file not found: '%s'\n", path.string());
|
ALOGD("Expected file not found: '%s'\n", path.string());
|
||||||
return pAsset;
|
return pAsset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1333,7 +1333,7 @@ bool AssetManager::scanAndMergeDirLocked(SortedVector<AssetDir::FileInfo>* pMerg
|
|||||||
//printf("+++ no match on '%s'\n", (const char*) match);
|
//printf("+++ no match on '%s'\n", (const char*) match);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD("HEY: size=%d removing %d\n", (int)pContents->size(), i);
|
ALOGD("HEY: size=%d removing %d\n", (int)pContents->size(), i);
|
||||||
pContents->removeAt(i);
|
pContents->removeAt(i);
|
||||||
i--; // adjust "for" loop
|
i--; // adjust "for" loop
|
||||||
count--; // and loop limit
|
count--; // and loop limit
|
||||||
@ -1652,7 +1652,7 @@ void AssetManager::loadFileNameCacheLocked(void)
|
|||||||
|
|
||||||
#ifdef DO_TIMINGS
|
#ifdef DO_TIMINGS
|
||||||
timer.stop();
|
timer.stop();
|
||||||
LOGD("Cache scan took %.3fms\n",
|
ALOGD("Cache scan took %.3fms\n",
|
||||||
timer.durationUsecs() / 1000.0);
|
timer.durationUsecs() / 1000.0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1784,7 +1784,7 @@ AssetManager::SharedZip::SharedZip(const String8& path, time_t modWhen)
|
|||||||
mZipFile = new ZipFileRO;
|
mZipFile = new ZipFileRO;
|
||||||
ALOGV("+++ opening zip '%s'\n", mPath.string());
|
ALOGV("+++ opening zip '%s'\n", mPath.string());
|
||||||
if (mZipFile->open(mPath.string()) != NO_ERROR) {
|
if (mZipFile->open(mPath.string()) != NO_ERROR) {
|
||||||
LOGD("failed to open Zip archive '%s'\n", mPath.string());
|
ALOGD("failed to open Zip archive '%s'\n", mPath.string());
|
||||||
delete mZipFile;
|
delete mZipFile;
|
||||||
mZipFile = NULL;
|
mZipFile = NULL;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,8 @@ BackupDataWriter::WriteEntityHeader(const String8& key, size_t dataSize)
|
|||||||
k = key;
|
k = key;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
LOGD("Writing header: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(), key.string(),
|
ALOGD("Writing header: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(),
|
||||||
dataSize);
|
key.string(), dataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
entity_header_v1 header;
|
entity_header_v1 header;
|
||||||
@ -151,11 +151,11 @@ BackupDataWriter::WriteEntityHeader(const String8& key, size_t dataSize)
|
|||||||
status_t
|
status_t
|
||||||
BackupDataWriter::WriteEntityData(const void* data, size_t size)
|
BackupDataWriter::WriteEntityData(const void* data, size_t size)
|
||||||
{
|
{
|
||||||
if (DEBUG) LOGD("Writing data: size=%lu", (unsigned long) size);
|
if (DEBUG) ALOGD("Writing data: size=%lu", (unsigned long) size);
|
||||||
|
|
||||||
if (m_status != NO_ERROR) {
|
if (m_status != NO_ERROR) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
LOGD("Not writing data - stream in error state %d (%s)", m_status, strerror(m_status));
|
ALOGD("Not writing data - stream in error state %d (%s)", m_status, strerror(m_status));
|
||||||
}
|
}
|
||||||
return m_status;
|
return m_status;
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ BackupDataWriter::WriteEntityData(const void* data, size_t size)
|
|||||||
ssize_t amt = write(m_fd, data, size);
|
ssize_t amt = write(m_fd, data, size);
|
||||||
if (amt != (ssize_t)size) {
|
if (amt != (ssize_t)size) {
|
||||||
m_status = errno;
|
m_status = errno;
|
||||||
if (DEBUG) LOGD("write returned error %d (%s)", m_status, strerror(m_status));
|
if (DEBUG) ALOGD("write returned error %d (%s)", m_status, strerror(m_status));
|
||||||
return m_status;
|
return m_status;
|
||||||
}
|
}
|
||||||
m_pos += amt;
|
m_pos += amt;
|
||||||
@ -208,7 +208,7 @@ BackupDataReader::Status()
|
|||||||
m_done = true; \
|
m_done = true; \
|
||||||
} else { \
|
} else { \
|
||||||
m_status = errno; \
|
m_status = errno; \
|
||||||
LOGD("CHECK_SIZE(a=%ld e=%ld) failed at line %d m_status='%s'", \
|
ALOGD("CHECK_SIZE(a=%ld e=%ld) failed at line %d m_status='%s'", \
|
||||||
long(actual), long(expected), __LINE__, strerror(m_status)); \
|
long(actual), long(expected), __LINE__, strerror(m_status)); \
|
||||||
} \
|
} \
|
||||||
return m_status; \
|
return m_status; \
|
||||||
@ -218,7 +218,7 @@ BackupDataReader::Status()
|
|||||||
do { \
|
do { \
|
||||||
status_t err = skip_padding(); \
|
status_t err = skip_padding(); \
|
||||||
if (err != NO_ERROR) { \
|
if (err != NO_ERROR) { \
|
||||||
LOGD("SKIP_PADDING FAILED at line %d", __LINE__); \
|
ALOGD("SKIP_PADDING FAILED at line %d", __LINE__); \
|
||||||
m_status = err; \
|
m_status = err; \
|
||||||
return err; \
|
return err; \
|
||||||
} \
|
} \
|
||||||
@ -261,7 +261,7 @@ BackupDataReader::ReadNextHeader(bool* done, int* type)
|
|||||||
{
|
{
|
||||||
m_header.entity.keyLen = fromlel(m_header.entity.keyLen);
|
m_header.entity.keyLen = fromlel(m_header.entity.keyLen);
|
||||||
if (m_header.entity.keyLen <= 0) {
|
if (m_header.entity.keyLen <= 0) {
|
||||||
LOGD("Entity header at %d has keyLen<=0: 0x%08x\n", (int)m_pos,
|
ALOGD("Entity header at %d has keyLen<=0: 0x%08x\n", (int)m_pos,
|
||||||
(int)m_header.entity.keyLen);
|
(int)m_header.entity.keyLen);
|
||||||
m_status = EINVAL;
|
m_status = EINVAL;
|
||||||
}
|
}
|
||||||
@ -285,7 +285,7 @@ BackupDataReader::ReadNextHeader(bool* done, int* type)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
LOGD("Chunk header at %d has invalid type: 0x%08x",
|
ALOGD("Chunk header at %d has invalid type: 0x%08x",
|
||||||
(int)(m_pos - sizeof(m_header)), (int)m_header.type);
|
(int)(m_pos - sizeof(m_header)), (int)m_header.type);
|
||||||
m_status = EINVAL;
|
m_status = EINVAL;
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ BackupDataReader::ReadEntityData(void* data, size_t size)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
int remaining = m_dataEndPos - m_pos;
|
int remaining = m_dataEndPos - m_pos;
|
||||||
//LOGD("ReadEntityData size=%d m_pos=0x%x m_dataEndPos=0x%x remaining=%d\n",
|
//ALOGD("ReadEntityData size=%d m_pos=0x%x m_dataEndPos=0x%x remaining=%d\n",
|
||||||
// size, m_pos, m_dataEndPos, remaining);
|
// size, m_pos, m_dataEndPos, remaining);
|
||||||
if (remaining <= 0) {
|
if (remaining <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
@ -347,7 +347,7 @@ BackupDataReader::ReadEntityData(void* data, size_t size)
|
|||||||
if (((int)size) > remaining) {
|
if (((int)size) > remaining) {
|
||||||
size = remaining;
|
size = remaining;
|
||||||
}
|
}
|
||||||
//LOGD(" reading %d bytes", size);
|
//ALOGD(" reading %d bytes", size);
|
||||||
int amt = read(m_fd, data, size);
|
int amt = read(m_fd, data, size);
|
||||||
if (amt < 0) {
|
if (amt < 0) {
|
||||||
m_status = errno;
|
m_status = errno;
|
||||||
|
@ -74,7 +74,7 @@ const static int CURRENT_METADATA_VERSION = 1;
|
|||||||
#if TEST_BACKUP_HELPERS
|
#if TEST_BACKUP_HELPERS
|
||||||
#define LOGP(f, x...) printf(f "\n", x)
|
#define LOGP(f, x...) printf(f "\n", x)
|
||||||
#else
|
#else
|
||||||
#define LOGP(x...) LOGD(x)
|
#define LOGP(x...) ALOGD(x)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ void CallStack::dump(const char* prefix) const
|
|||||||
* get very deep. So we request function names of each frame individually.
|
* get very deep. So we request function names of each frame individually.
|
||||||
*/
|
*/
|
||||||
for (int i=0; i<int(mCount); i++) {
|
for (int i=0; i<int(mCount); i++) {
|
||||||
LOGD("%s", toStringSingleLevel(prefix, i).string());
|
ALOGD("%s", toStringSingleLevel(prefix, i).string());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,12 +64,12 @@ FileMap::~FileMap(void)
|
|||||||
}
|
}
|
||||||
#ifdef HAVE_POSIX_FILEMAP
|
#ifdef HAVE_POSIX_FILEMAP
|
||||||
if (mBasePtr && munmap(mBasePtr, mBaseLength) != 0) {
|
if (mBasePtr && munmap(mBasePtr, mBaseLength) != 0) {
|
||||||
LOGD("munmap(%p, %d) failed\n", mBasePtr, (int) mBaseLength);
|
ALOGD("munmap(%p, %d) failed\n", mBasePtr, (int) mBaseLength);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WIN32_FILEMAP
|
#ifdef HAVE_WIN32_FILEMAP
|
||||||
if (mBasePtr && UnmapViewOfFile(mBasePtr) == 0) {
|
if (mBasePtr && UnmapViewOfFile(mBasePtr) == 0) {
|
||||||
LOGD("UnmapViewOfFile(%p) failed, error = %ld\n", mBasePtr,
|
ALOGD("UnmapViewOfFile(%p) failed, error = %ld\n", mBasePtr,
|
||||||
GetLastError() );
|
GetLastError() );
|
||||||
}
|
}
|
||||||
if (mFileMapping != INVALID_HANDLE_VALUE) {
|
if (mFileMapping != INVALID_HANDLE_VALUE) {
|
||||||
|
@ -185,7 +185,7 @@ int Looper::pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa
|
|||||||
int events = response.events;
|
int events = response.events;
|
||||||
void* data = response.request.data;
|
void* data = response.request.data;
|
||||||
#if DEBUG_POLL_AND_WAKE
|
#if DEBUG_POLL_AND_WAKE
|
||||||
LOGD("%p ~ pollOnce - returning signalled identifier %d: "
|
ALOGD("%p ~ pollOnce - returning signalled identifier %d: "
|
||||||
"fd=%d, events=0x%x, data=%p",
|
"fd=%d, events=0x%x, data=%p",
|
||||||
this, ident, fd, events, data);
|
this, ident, fd, events, data);
|
||||||
#endif
|
#endif
|
||||||
@ -198,7 +198,7 @@ int Looper::pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa
|
|||||||
|
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
#if DEBUG_POLL_AND_WAKE
|
#if DEBUG_POLL_AND_WAKE
|
||||||
LOGD("%p ~ pollOnce - returning result %d", this, result);
|
ALOGD("%p ~ pollOnce - returning result %d", this, result);
|
||||||
#endif
|
#endif
|
||||||
if (outFd != NULL) *outFd = 0;
|
if (outFd != NULL) *outFd = 0;
|
||||||
if (outEvents != NULL) *outEvents = NULL;
|
if (outEvents != NULL) *outEvents = NULL;
|
||||||
@ -212,7 +212,7 @@ int Looper::pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa
|
|||||||
|
|
||||||
int Looper::pollInner(int timeoutMillis) {
|
int Looper::pollInner(int timeoutMillis) {
|
||||||
#if DEBUG_POLL_AND_WAKE
|
#if DEBUG_POLL_AND_WAKE
|
||||||
LOGD("%p ~ pollOnce - waiting: timeoutMillis=%d", this, timeoutMillis);
|
ALOGD("%p ~ pollOnce - waiting: timeoutMillis=%d", this, timeoutMillis);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Adjust the timeout based on when the next message is due.
|
// Adjust the timeout based on when the next message is due.
|
||||||
@ -224,7 +224,7 @@ int Looper::pollInner(int timeoutMillis) {
|
|||||||
timeoutMillis = messageTimeoutMillis;
|
timeoutMillis = messageTimeoutMillis;
|
||||||
}
|
}
|
||||||
#if DEBUG_POLL_AND_WAKE
|
#if DEBUG_POLL_AND_WAKE
|
||||||
LOGD("%p ~ pollOnce - next message in %lldns, adjusted timeout: timeoutMillis=%d",
|
ALOGD("%p ~ pollOnce - next message in %lldns, adjusted timeout: timeoutMillis=%d",
|
||||||
this, mNextMessageUptime - now, timeoutMillis);
|
this, mNextMessageUptime - now, timeoutMillis);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -270,7 +270,7 @@ int Looper::pollInner(int timeoutMillis) {
|
|||||||
// Check for poll timeout.
|
// Check for poll timeout.
|
||||||
if (eventCount == 0) {
|
if (eventCount == 0) {
|
||||||
#if DEBUG_POLL_AND_WAKE
|
#if DEBUG_POLL_AND_WAKE
|
||||||
LOGD("%p ~ pollOnce - timeout", this);
|
ALOGD("%p ~ pollOnce - timeout", this);
|
||||||
#endif
|
#endif
|
||||||
result = ALOOPER_POLL_TIMEOUT;
|
result = ALOOPER_POLL_TIMEOUT;
|
||||||
goto Done;
|
goto Done;
|
||||||
@ -278,7 +278,7 @@ int Looper::pollInner(int timeoutMillis) {
|
|||||||
|
|
||||||
// Handle all events.
|
// Handle all events.
|
||||||
#if DEBUG_POLL_AND_WAKE
|
#if DEBUG_POLL_AND_WAKE
|
||||||
LOGD("%p ~ pollOnce - handling events from %d fds", this, eventCount);
|
ALOGD("%p ~ pollOnce - handling events from %d fds", this, eventCount);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOOPER_USES_EPOLL
|
#ifdef LOOPER_USES_EPOLL
|
||||||
@ -353,7 +353,7 @@ Done:
|
|||||||
- milliseconds_to_nanoseconds(timeoutMillis);
|
- milliseconds_to_nanoseconds(timeoutMillis);
|
||||||
}
|
}
|
||||||
if (mSampledPolls == SAMPLED_POLLS_TO_AGGREGATE) {
|
if (mSampledPolls == SAMPLED_POLLS_TO_AGGREGATE) {
|
||||||
LOGD("%p ~ poll latency statistics: %0.3fms zero timeout, %0.3fms non-zero timeout", this,
|
ALOGD("%p ~ poll latency statistics: %0.3fms zero timeout, %0.3fms non-zero timeout", this,
|
||||||
0.000001f * float(mSampledZeroPollLatencySum) / mSampledZeroPollCount,
|
0.000001f * float(mSampledZeroPollLatencySum) / mSampledZeroPollCount,
|
||||||
0.000001f * float(mSampledTimeoutPollLatencySum) / mSampledTimeoutPollCount);
|
0.000001f * float(mSampledTimeoutPollLatencySum) / mSampledTimeoutPollCount);
|
||||||
mSampledPolls = 0;
|
mSampledPolls = 0;
|
||||||
@ -382,7 +382,7 @@ Done:
|
|||||||
mLock.unlock();
|
mLock.unlock();
|
||||||
|
|
||||||
#if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS
|
#if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS
|
||||||
LOGD("%p ~ pollOnce - sending message: handler=%p, what=%d",
|
ALOGD("%p ~ pollOnce - sending message: handler=%p, what=%d",
|
||||||
this, handler.get(), message.what);
|
this, handler.get(), message.what);
|
||||||
#endif
|
#endif
|
||||||
handler->handleMessage(message);
|
handler->handleMessage(message);
|
||||||
@ -410,7 +410,7 @@ Done:
|
|||||||
int events = response.events;
|
int events = response.events;
|
||||||
void* data = response.request.data;
|
void* data = response.request.data;
|
||||||
#if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS
|
#if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS
|
||||||
LOGD("%p ~ pollOnce - invoking fd event callback %p: fd=%d, events=0x%x, data=%p",
|
ALOGD("%p ~ pollOnce - invoking fd event callback %p: fd=%d, events=0x%x, data=%p",
|
||||||
this, callback, fd, events, data);
|
this, callback, fd, events, data);
|
||||||
#endif
|
#endif
|
||||||
int callbackResult = callback(fd, events, data);
|
int callbackResult = callback(fd, events, data);
|
||||||
@ -451,7 +451,7 @@ int Looper::pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outDat
|
|||||||
|
|
||||||
void Looper::wake() {
|
void Looper::wake() {
|
||||||
#if DEBUG_POLL_AND_WAKE
|
#if DEBUG_POLL_AND_WAKE
|
||||||
LOGD("%p ~ wake", this);
|
ALOGD("%p ~ wake", this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOOPER_STATISTICS
|
#ifdef LOOPER_STATISTICS
|
||||||
@ -475,12 +475,12 @@ void Looper::wake() {
|
|||||||
|
|
||||||
void Looper::awoken() {
|
void Looper::awoken() {
|
||||||
#if DEBUG_POLL_AND_WAKE
|
#if DEBUG_POLL_AND_WAKE
|
||||||
LOGD("%p ~ awoken", this);
|
ALOGD("%p ~ awoken", this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOOPER_STATISTICS
|
#ifdef LOOPER_STATISTICS
|
||||||
if (mPendingWakeCount == 0) {
|
if (mPendingWakeCount == 0) {
|
||||||
LOGD("%p ~ awoken: spurious!", this);
|
ALOGD("%p ~ awoken: spurious!", this);
|
||||||
} else {
|
} else {
|
||||||
mSampledWakeCycles += 1;
|
mSampledWakeCycles += 1;
|
||||||
mSampledWakeCountSum += mPendingWakeCount;
|
mSampledWakeCountSum += mPendingWakeCount;
|
||||||
@ -488,7 +488,7 @@ void Looper::awoken() {
|
|||||||
mPendingWakeCount = 0;
|
mPendingWakeCount = 0;
|
||||||
mPendingWakeTime = -1;
|
mPendingWakeTime = -1;
|
||||||
if (mSampledWakeCycles == SAMPLED_WAKE_CYCLES_TO_AGGREGATE) {
|
if (mSampledWakeCycles == SAMPLED_WAKE_CYCLES_TO_AGGREGATE) {
|
||||||
LOGD("%p ~ wake statistics: %0.3fms wake latency, %0.3f wakes per cycle", this,
|
ALOGD("%p ~ wake statistics: %0.3fms wake latency, %0.3f wakes per cycle", this,
|
||||||
0.000001f * float(mSampledWakeLatencySum) / mSampledWakeCycles,
|
0.000001f * float(mSampledWakeLatencySum) / mSampledWakeCycles,
|
||||||
float(mSampledWakeCountSum) / mSampledWakeCycles);
|
float(mSampledWakeCountSum) / mSampledWakeCycles);
|
||||||
mSampledWakeCycles = 0;
|
mSampledWakeCycles = 0;
|
||||||
@ -514,7 +514,7 @@ void Looper::pushResponse(int events, const Request& request) {
|
|||||||
|
|
||||||
int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data) {
|
int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data) {
|
||||||
#if DEBUG_CALLBACKS
|
#if DEBUG_CALLBACKS
|
||||||
LOGD("%p ~ addFd - fd=%d, ident=%d, events=0x%x, callback=%p, data=%p", this, fd, ident,
|
ALOGD("%p ~ addFd - fd=%d, ident=%d, events=0x%x, callback=%p, data=%p", this, fd, ident,
|
||||||
events, callback, data);
|
events, callback, data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -598,7 +598,7 @@ int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback,
|
|||||||
|
|
||||||
int Looper::removeFd(int fd) {
|
int Looper::removeFd(int fd) {
|
||||||
#if DEBUG_CALLBACKS
|
#if DEBUG_CALLBACKS
|
||||||
LOGD("%p ~ removeFd - fd=%d", this, fd);
|
ALOGD("%p ~ removeFd - fd=%d", this, fd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOOPER_USES_EPOLL
|
#ifdef LOOPER_USES_EPOLL
|
||||||
@ -675,7 +675,7 @@ void Looper::sendMessageDelayed(nsecs_t uptimeDelay, const sp<MessageHandler>& h
|
|||||||
void Looper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler,
|
void Looper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler,
|
||||||
const Message& message) {
|
const Message& message) {
|
||||||
#if DEBUG_CALLBACKS
|
#if DEBUG_CALLBACKS
|
||||||
LOGD("%p ~ sendMessageAtTime - uptime=%lld, handler=%p, what=%d",
|
ALOGD("%p ~ sendMessageAtTime - uptime=%lld, handler=%p, what=%d",
|
||||||
this, uptime, handler.get(), message.what);
|
this, uptime, handler.get(), message.what);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -708,7 +708,7 @@ void Looper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler
|
|||||||
|
|
||||||
void Looper::removeMessages(const sp<MessageHandler>& handler) {
|
void Looper::removeMessages(const sp<MessageHandler>& handler) {
|
||||||
#if DEBUG_CALLBACKS
|
#if DEBUG_CALLBACKS
|
||||||
LOGD("%p ~ removeMessages - handler=%p", this, handler.get());
|
ALOGD("%p ~ removeMessages - handler=%p", this, handler.get());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{ // acquire lock
|
{ // acquire lock
|
||||||
@ -725,7 +725,7 @@ void Looper::removeMessages(const sp<MessageHandler>& handler) {
|
|||||||
|
|
||||||
void Looper::removeMessages(const sp<MessageHandler>& handler, int what) {
|
void Looper::removeMessages(const sp<MessageHandler>& handler, int what) {
|
||||||
#if DEBUG_CALLBACKS
|
#if DEBUG_CALLBACKS
|
||||||
LOGD("%p ~ removeMessages - handler=%p, what=%d", this, handler.get(), what);
|
ALOGD("%p ~ removeMessages - handler=%p, what=%d", this, handler.get(), what);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{ // acquire lock
|
{ // acquire lock
|
||||||
|
@ -135,7 +135,7 @@ status_t PropertyMap::load(const String8& filename, PropertyMap** outMap) {
|
|||||||
status = parser.parse();
|
status = parser.parse();
|
||||||
#if DEBUG_PARSER_PERFORMANCE
|
#if DEBUG_PARSER_PERFORMANCE
|
||||||
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
|
nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
|
||||||
LOGD("Parsed property file '%s' %d lines in %0.3fms.",
|
ALOGD("Parsed property file '%s' %d lines in %0.3fms.",
|
||||||
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
|
tokenizer->getFilename().string(), tokenizer->getLineNumber(),
|
||||||
elapsedTime / 1000000.0);
|
elapsedTime / 1000000.0);
|
||||||
#endif
|
#endif
|
||||||
@ -163,7 +163,7 @@ PropertyMap::Parser::~Parser() {
|
|||||||
status_t PropertyMap::Parser::parse() {
|
status_t PropertyMap::Parser::parse() {
|
||||||
while (!mTokenizer->isEof()) {
|
while (!mTokenizer->isEof()) {
|
||||||
#if DEBUG_PARSER
|
#if DEBUG_PARSER
|
||||||
LOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
|
ALOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
|
||||||
mTokenizer->peekRemainderOfLine().string());
|
mTokenizer->peekRemainderOfLine().string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public:
|
|||||||
ref_entry* refs = mStrongRefs;
|
ref_entry* refs = mStrongRefs;
|
||||||
while (refs) {
|
while (refs) {
|
||||||
char inc = refs->ref >= 0 ? '+' : '-';
|
char inc = refs->ref >= 0 ? '+' : '-';
|
||||||
LOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
|
ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
|
||||||
#if DEBUG_REFS_CALLSTACK_ENABLED
|
#if DEBUG_REFS_CALLSTACK_ENABLED
|
||||||
refs->stack.dump();
|
refs->stack.dump();
|
||||||
#endif
|
#endif
|
||||||
@ -121,7 +121,7 @@ public:
|
|||||||
ref_entry* refs = mWeakRefs;
|
ref_entry* refs = mWeakRefs;
|
||||||
while (refs) {
|
while (refs) {
|
||||||
char inc = refs->ref >= 0 ? '+' : '-';
|
char inc = refs->ref >= 0 ? '+' : '-';
|
||||||
LOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
|
ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
|
||||||
#if DEBUG_REFS_CALLSTACK_ENABLED
|
#if DEBUG_REFS_CALLSTACK_ENABLED
|
||||||
refs->stack.dump();
|
refs->stack.dump();
|
||||||
#endif
|
#endif
|
||||||
@ -137,13 +137,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void addStrongRef(const void* id) {
|
void addStrongRef(const void* id) {
|
||||||
//LOGD_IF(mTrackEnabled,
|
//ALOGD_IF(mTrackEnabled,
|
||||||
// "addStrongRef: RefBase=%p, id=%p", mBase, id);
|
// "addStrongRef: RefBase=%p, id=%p", mBase, id);
|
||||||
addRef(&mStrongRefs, id, mStrong);
|
addRef(&mStrongRefs, id, mStrong);
|
||||||
}
|
}
|
||||||
|
|
||||||
void removeStrongRef(const void* id) {
|
void removeStrongRef(const void* id) {
|
||||||
//LOGD_IF(mTrackEnabled,
|
//ALOGD_IF(mTrackEnabled,
|
||||||
// "removeStrongRef: RefBase=%p, id=%p", mBase, id);
|
// "removeStrongRef: RefBase=%p, id=%p", mBase, id);
|
||||||
if (!mRetain) {
|
if (!mRetain) {
|
||||||
removeRef(&mStrongRefs, id);
|
removeRef(&mStrongRefs, id);
|
||||||
@ -153,7 +153,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void renameStrongRefId(const void* old_id, const void* new_id) {
|
void renameStrongRefId(const void* old_id, const void* new_id) {
|
||||||
//LOGD_IF(mTrackEnabled,
|
//ALOGD_IF(mTrackEnabled,
|
||||||
// "renameStrongRefId: RefBase=%p, oid=%p, nid=%p",
|
// "renameStrongRefId: RefBase=%p, oid=%p, nid=%p",
|
||||||
// mBase, old_id, new_id);
|
// mBase, old_id, new_id);
|
||||||
renameRefsId(mStrongRefs, old_id, new_id);
|
renameRefsId(mStrongRefs, old_id, new_id);
|
||||||
@ -203,7 +203,7 @@ public:
|
|||||||
if (rc >= 0) {
|
if (rc >= 0) {
|
||||||
write(rc, text.string(), text.length());
|
write(rc, text.string(), text.length());
|
||||||
close(rc);
|
close(rc);
|
||||||
LOGD("STACK TRACE for %p saved in %s", this, name);
|
ALOGD("STACK TRACE for %p saved in %s", this, name);
|
||||||
}
|
}
|
||||||
else LOGE("FAILED TO PRINT STACK TRACE for %p in %s: %s", this,
|
else LOGE("FAILED TO PRINT STACK TRACE for %p in %s: %s", this,
|
||||||
name, strerror(errno));
|
name, strerror(errno));
|
||||||
@ -270,7 +270,7 @@ private:
|
|||||||
ref = head;
|
ref = head;
|
||||||
while (ref) {
|
while (ref) {
|
||||||
char inc = ref->ref >= 0 ? '+' : '-';
|
char inc = ref->ref >= 0 ? '+' : '-';
|
||||||
LOGD("\t%c ID %p (ref %d):", inc, ref->id, ref->ref);
|
ALOGD("\t%c ID %p (ref %d):", inc, ref->id, ref->ref);
|
||||||
ref = ref->next;
|
ref = ref->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ void RefBase::incStrong(const void* id) const
|
|||||||
const int32_t c = android_atomic_inc(&refs->mStrong);
|
const int32_t c = android_atomic_inc(&refs->mStrong);
|
||||||
LOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs);
|
LOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs);
|
||||||
#if PRINT_REFS
|
#if PRINT_REFS
|
||||||
LOGD("incStrong of %p from %p: cnt=%d\n", this, id, c);
|
ALOGD("incStrong of %p from %p: cnt=%d\n", this, id, c);
|
||||||
#endif
|
#endif
|
||||||
if (c != INITIAL_STRONG_VALUE) {
|
if (c != INITIAL_STRONG_VALUE) {
|
||||||
return;
|
return;
|
||||||
@ -350,7 +350,7 @@ void RefBase::decStrong(const void* id) const
|
|||||||
refs->removeStrongRef(id);
|
refs->removeStrongRef(id);
|
||||||
const int32_t c = android_atomic_dec(&refs->mStrong);
|
const int32_t c = android_atomic_dec(&refs->mStrong);
|
||||||
#if PRINT_REFS
|
#if PRINT_REFS
|
||||||
LOGD("decStrong of %p from %p: cnt=%d\n", this, id, c);
|
ALOGD("decStrong of %p from %p: cnt=%d\n", this, id, c);
|
||||||
#endif
|
#endif
|
||||||
LOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs);
|
LOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs);
|
||||||
if (c == 1) {
|
if (c == 1) {
|
||||||
@ -372,7 +372,7 @@ void RefBase::forceIncStrong(const void* id) const
|
|||||||
LOG_ASSERT(c >= 0, "forceIncStrong called on %p after ref count underflow",
|
LOG_ASSERT(c >= 0, "forceIncStrong called on %p after ref count underflow",
|
||||||
refs);
|
refs);
|
||||||
#if PRINT_REFS
|
#if PRINT_REFS
|
||||||
LOGD("forceIncStrong of %p from %p: cnt=%d\n", this, id, c);
|
ALOGD("forceIncStrong of %p from %p: cnt=%d\n", this, id, c);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
@ -487,7 +487,7 @@ bool RefBase::weakref_type::attemptIncStrong(const void* id)
|
|||||||
impl->addStrongRef(id);
|
impl->addStrongRef(id);
|
||||||
|
|
||||||
#if PRINT_REFS
|
#if PRINT_REFS
|
||||||
LOGD("attemptIncStrong of %p from %p: cnt=%d\n", this, id, curCount);
|
ALOGD("attemptIncStrong of %p from %p: cnt=%d\n", this, id, curCount);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (curCount == INITIAL_STRONG_VALUE) {
|
if (curCount == INITIAL_STRONG_VALUE) {
|
||||||
|
@ -4368,7 +4368,7 @@ status_t ResTable::createIdmap(const ResTable& overlay, uint32_t originalCrc, ui
|
|||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
if (overlayResID != 0) {
|
if (overlayResID != 0) {
|
||||||
LOGD("%s/%s 0x%08x -> 0x%08x\n",
|
ALOGD("%s/%s 0x%08x -> 0x%08x\n",
|
||||||
String8(String16(resName.type)).string(),
|
String8(String16(resName.type)).string(),
|
||||||
String8(String16(resName.name)).string(),
|
String8(String16(resName.name)).string(),
|
||||||
resID, overlayResID);
|
resID, overlayResID);
|
||||||
|
@ -39,11 +39,11 @@ StopWatch::~StopWatch()
|
|||||||
{
|
{
|
||||||
nsecs_t elapsed = elapsedTime();
|
nsecs_t elapsed = elapsedTime();
|
||||||
const int n = mNumLaps;
|
const int n = mNumLaps;
|
||||||
LOGD("StopWatch %s (us): %lld ", mName, ns2us(elapsed));
|
ALOGD("StopWatch %s (us): %lld ", mName, ns2us(elapsed));
|
||||||
for (int i=0 ; i<n ; i++) {
|
for (int i=0 ; i<n ; i++) {
|
||||||
const nsecs_t soFar = mLaps[i].soFar;
|
const nsecs_t soFar = mLaps[i].soFar;
|
||||||
const nsecs_t thisLap = mLaps[i].thisLap;
|
const nsecs_t thisLap = mLaps[i].thisLap;
|
||||||
LOGD(" [%d: %lld, %lld]", i, ns2us(soFar), ns2us(thisLap));
|
ALOGD(" [%d: %lld, %lld]", i, ns2us(soFar), ns2us(thisLap));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ int setCurrentTimeMillis(int64_t millis)
|
|||||||
tv.tv_sec = (time_t) (millis / 1000LL);
|
tv.tv_sec = (time_t) (millis / 1000LL);
|
||||||
tv.tv_usec = (suseconds_t) ((millis % 1000LL) * 1000LL);
|
tv.tv_usec = (suseconds_t) ((millis % 1000LL) * 1000LL);
|
||||||
|
|
||||||
LOGD("Setting time of day to sec=%d\n", (int) tv.tv_sec);
|
ALOGD("Setting time of day to sec=%d\n", (int) tv.tv_sec);
|
||||||
|
|
||||||
#ifdef HAVE_ANDROID_OS
|
#ifdef HAVE_ANDROID_OS
|
||||||
fd = open("/dev/alarm", O_RDWR);
|
fd = open("/dev/alarm", O_RDWR);
|
||||||
|
@ -118,7 +118,7 @@ String8 Tokenizer::peekRemainderOfLine() const {
|
|||||||
|
|
||||||
String8 Tokenizer::nextToken(const char* delimiters) {
|
String8 Tokenizer::nextToken(const char* delimiters) {
|
||||||
#if DEBUG_TOKENIZER
|
#if DEBUG_TOKENIZER
|
||||||
LOGD("nextToken");
|
ALOGD("nextToken");
|
||||||
#endif
|
#endif
|
||||||
const char* end = getEnd();
|
const char* end = getEnd();
|
||||||
const char* tokenStart = mCurrent;
|
const char* tokenStart = mCurrent;
|
||||||
@ -134,7 +134,7 @@ String8 Tokenizer::nextToken(const char* delimiters) {
|
|||||||
|
|
||||||
void Tokenizer::nextLine() {
|
void Tokenizer::nextLine() {
|
||||||
#if DEBUG_TOKENIZER
|
#if DEBUG_TOKENIZER
|
||||||
LOGD("nextLine");
|
ALOGD("nextLine");
|
||||||
#endif
|
#endif
|
||||||
const char* end = getEnd();
|
const char* end = getEnd();
|
||||||
while (mCurrent != end) {
|
while (mCurrent != end) {
|
||||||
@ -148,7 +148,7 @@ void Tokenizer::nextLine() {
|
|||||||
|
|
||||||
void Tokenizer::skipDelimiters(const char* delimiters) {
|
void Tokenizer::skipDelimiters(const char* delimiters) {
|
||||||
#if DEBUG_TOKENIZER
|
#if DEBUG_TOKENIZER
|
||||||
LOGD("skipDelimiters");
|
ALOGD("skipDelimiters");
|
||||||
#endif
|
#endif
|
||||||
const char* end = getEnd();
|
const char* end = getEnd();
|
||||||
while (mCurrent != end) {
|
while (mCurrent != end) {
|
||||||
|
@ -269,7 +269,7 @@ bool ZipFileRO::mapCentralDirectory(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
LOGD("Zip: EOCD not found, %s is not zip\n", mFileName);
|
ALOGD("Zip: EOCD not found, %s is not zip\n", mFileName);
|
||||||
free(scanBuf);
|
free(scanBuf);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ using namespace android;
|
|||||||
|
|
||||||
int cc = read(fd, readBuf, getSize);
|
int cc = read(fd, readBuf, getSize);
|
||||||
if (cc != (int) getSize) {
|
if (cc != (int) getSize) {
|
||||||
LOGD("inflate read failed (%d vs %ld)\n",
|
ALOGD("inflate read failed (%d vs %ld)\n",
|
||||||
cc, getSize);
|
cc, getSize);
|
||||||
goto z_bail;
|
goto z_bail;
|
||||||
}
|
}
|
||||||
@ -114,7 +114,7 @@ using namespace android;
|
|||||||
/* uncompress the data */
|
/* uncompress the data */
|
||||||
zerr = inflate(&zstream, Z_NO_FLUSH);
|
zerr = inflate(&zstream, Z_NO_FLUSH);
|
||||||
if (zerr != Z_OK && zerr != Z_STREAM_END) {
|
if (zerr != Z_OK && zerr != Z_STREAM_END) {
|
||||||
LOGD("zlib inflate call failed (zerr=%d)\n", zerr);
|
ALOGD("zlib inflate call failed (zerr=%d)\n", zerr);
|
||||||
goto z_bail;
|
goto z_bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ bail:
|
|||||||
|
|
||||||
int cc = fread(readBuf, 1, getSize, fp);
|
int cc = fread(readBuf, 1, getSize, fp);
|
||||||
if (cc != (int) getSize) {
|
if (cc != (int) getSize) {
|
||||||
LOGD("inflate read failed (%d vs %ld)\n",
|
ALOGD("inflate read failed (%d vs %ld)\n",
|
||||||
cc, getSize);
|
cc, getSize);
|
||||||
goto z_bail;
|
goto z_bail;
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ bail:
|
|||||||
/* uncompress the data */
|
/* uncompress the data */
|
||||||
zerr = inflate(&zstream, Z_NO_FLUSH);
|
zerr = inflate(&zstream, Z_NO_FLUSH);
|
||||||
if (zerr != Z_OK && zerr != Z_STREAM_END) {
|
if (zerr != Z_OK && zerr != Z_STREAM_END) {
|
||||||
LOGD("zlib inflate call failed (zerr=%d)\n", zerr);
|
ALOGD("zlib inflate call failed (zerr=%d)\n", zerr);
|
||||||
goto z_bail;
|
goto z_bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,9 +163,9 @@ void Tokenizer::dump() const
|
|||||||
{
|
{
|
||||||
const run_t* ranges = mRanges.array();
|
const run_t* ranges = mRanges.array();
|
||||||
const size_t c = mRanges.size();
|
const size_t c = mRanges.size();
|
||||||
LOGD("Tokenizer (%p, size = %u)\n", this, c);
|
ALOGD("Tokenizer (%p, size = %u)\n", this, c);
|
||||||
for (size_t i=0 ; i<c ; i++) {
|
for (size_t i=0 ; i<c ; i++) {
|
||||||
LOGD("%u: (%u, %u)\n", i, ranges[i].first, ranges[i].length);
|
ALOGD("%u: (%u, %u)\n", i, ranges[i].first, ranges[i].length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ private:
|
|||||||
return (left>=right || top>=bottom);
|
return (left>=right || top>=bottom);
|
||||||
}
|
}
|
||||||
void dump(char const* what) {
|
void dump(char const* what) {
|
||||||
LOGD("%s { %5d, %5d, w=%5d, h=%5d }",
|
ALOGD("%s { %5d, %5d, w=%5d, h=%5d }",
|
||||||
what, left, top, right-left, bottom-top);
|
what, left, top, right-left, bottom-top);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,9 +217,9 @@ void mvui_transform_t::picker()
|
|||||||
void transform_t::dump(const char* what)
|
void transform_t::dump(const char* what)
|
||||||
{
|
{
|
||||||
GLfixed const * const m = matrix.m;
|
GLfixed const * const m = matrix.m;
|
||||||
LOGD("%s:", what);
|
ALOGD("%s:", what);
|
||||||
for (int i=0 ; i<4 ; i++)
|
for (int i=0 ; i<4 ; i++)
|
||||||
LOGD("[%08x %08x %08x %08x] [%f %f %f %f]\n",
|
ALOGD("[%08x %08x %08x %08x] [%f %f %f %f]\n",
|
||||||
m[I(0,i)], m[I(1,i)], m[I(2,i)], m[I(3,i)],
|
m[I(0,i)], m[I(1,i)], m[I(2,i)], m[I(3,i)],
|
||||||
fixedToFloat(m[I(0,i)]),
|
fixedToFloat(m[I(0,i)]),
|
||||||
fixedToFloat(m[I(1,i)]),
|
fixedToFloat(m[I(1,i)]),
|
||||||
@ -273,11 +273,11 @@ void matrixf_t::multiply(matrixf_t& r, const matrixf_t& lhs, const matrixf_t& rh
|
|||||||
}
|
}
|
||||||
|
|
||||||
void matrixf_t::dump(const char* what) {
|
void matrixf_t::dump(const char* what) {
|
||||||
LOGD("%s", what);
|
ALOGD("%s", what);
|
||||||
LOGD("[ %9f %9f %9f %9f ]", m[I(0,0)], m[I(1,0)], m[I(2,0)], m[I(3,0)]);
|
ALOGD("[ %9f %9f %9f %9f ]", m[I(0,0)], m[I(1,0)], m[I(2,0)], m[I(3,0)]);
|
||||||
LOGD("[ %9f %9f %9f %9f ]", m[I(0,1)], m[I(1,1)], m[I(2,1)], m[I(3,1)]);
|
ALOGD("[ %9f %9f %9f %9f ]", m[I(0,1)], m[I(1,1)], m[I(2,1)], m[I(3,1)]);
|
||||||
LOGD("[ %9f %9f %9f %9f ]", m[I(0,2)], m[I(1,2)], m[I(2,2)], m[I(3,2)]);
|
ALOGD("[ %9f %9f %9f %9f ]", m[I(0,2)], m[I(1,2)], m[I(2,2)], m[I(3,2)]);
|
||||||
LOGD("[ %9f %9f %9f %9f ]", m[I(0,3)], m[I(1,3)], m[I(2,3)], m[I(3,3)]);
|
ALOGD("[ %9f %9f %9f %9f ]", m[I(0,3)], m[I(1,3)], m[I(2,3)], m[I(3,3)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrixf_t::loadIdentity() {
|
void matrixf_t::loadIdentity() {
|
||||||
|
@ -131,7 +131,7 @@ Loader::Loader()
|
|||||||
|
|
||||||
/* Special case for GLES emulation */
|
/* Special case for GLES emulation */
|
||||||
if (checkGlesEmulationStatus() == 0) {
|
if (checkGlesEmulationStatus() == 0) {
|
||||||
LOGD("Emulator without GPU support detected. Fallback to software renderer.");
|
ALOGD("Emulator without GPU support detected. Fallback to software renderer.");
|
||||||
gConfig.add( entry_t(0, 0, "android") );
|
gConfig.add( entry_t(0, 0, "android") );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -140,14 +140,14 @@ Loader::Loader()
|
|||||||
FILE* cfg = fopen("/system/lib/egl/egl.cfg", "r");
|
FILE* cfg = fopen("/system/lib/egl/egl.cfg", "r");
|
||||||
if (cfg == NULL) {
|
if (cfg == NULL) {
|
||||||
// default config
|
// default config
|
||||||
LOGD("egl.cfg not found, using default config");
|
ALOGD("egl.cfg not found, using default config");
|
||||||
gConfig.add( entry_t(0, 0, "android") );
|
gConfig.add( entry_t(0, 0, "android") );
|
||||||
} else {
|
} else {
|
||||||
while (fgets(line, 256, cfg)) {
|
while (fgets(line, 256, cfg)) {
|
||||||
int dpy;
|
int dpy;
|
||||||
int impl;
|
int impl;
|
||||||
if (sscanf(line, "%u %u %s", &dpy, &impl, tag) == 3) {
|
if (sscanf(line, "%u %u %s", &dpy, &impl, tag) == 3) {
|
||||||
//LOGD(">>> %u %u %s", dpy, impl, tag);
|
//ALOGD(">>> %u %u %s", dpy, impl, tag);
|
||||||
gConfig.add( entry_t(dpy, impl, tag) );
|
gConfig.add( entry_t(dpy, impl, tag) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,7 +238,7 @@ void Loader::init_api(void* dso,
|
|||||||
strncpy(scrap, name, index);
|
strncpy(scrap, name, index);
|
||||||
scrap[index] = 0;
|
scrap[index] = 0;
|
||||||
f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
|
f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
|
||||||
//LOGD_IF(f, "found <%s> instead", scrap);
|
//ALOGD_IF(f, "found <%s> instead", scrap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
@ -247,11 +247,11 @@ void Loader::init_api(void* dso,
|
|||||||
if (index>0 && strcmp(name+index, "OES")) {
|
if (index>0 && strcmp(name+index, "OES")) {
|
||||||
snprintf(scrap, SIZE, "%sOES", name);
|
snprintf(scrap, SIZE, "%sOES", name);
|
||||||
f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
|
f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
|
||||||
//LOGD_IF(f, "found <%s> instead", scrap);
|
//ALOGD_IF(f, "found <%s> instead", scrap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
//LOGD("%s", name);
|
//ALOGD("%s", name);
|
||||||
f = (__eglMustCastToProperFunctionPointerType)gl_unimplemented;
|
f = (__eglMustCastToProperFunctionPointerType)gl_unimplemented;
|
||||||
}
|
}
|
||||||
*curr++ = f;
|
*curr++ = f;
|
||||||
@ -282,7 +282,7 @@ void *Loader::load_driver(const char* kind, const char *tag,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD("loaded %s", driver_absolute_path);
|
ALOGD("loaded %s", driver_absolute_path);
|
||||||
|
|
||||||
if (mask & EGL) {
|
if (mask & EGL) {
|
||||||
getProcAddress = (getProcAddressType)dlsym(dso, "eglGetProcAddress");
|
getProcAddress = (getProcAddressType)dlsym(dso, "eglGetProcAddress");
|
||||||
|
@ -270,7 +270,7 @@ static EGLBoolean egl_init_drivers_locked() {
|
|||||||
cnx->hooks[GLESv2_INDEX] = &gHooks[GLESv2_INDEX][IMPL_HARDWARE];
|
cnx->hooks[GLESv2_INDEX] = &gHooks[GLESv2_INDEX][IMPL_HARDWARE];
|
||||||
cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 1, cnx);
|
cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 1, cnx);
|
||||||
} else {
|
} else {
|
||||||
LOGD("3D hardware acceleration is disabled");
|
ALOGD("3D hardware acceleration is disabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {
|
|||||||
|
|
||||||
EGLDisplay idpy = disp[i].dpy;
|
EGLDisplay idpy = disp[i].dpy;
|
||||||
if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) {
|
if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) {
|
||||||
//LOGD("initialized %d dpy=%p, ver=%d.%d, cnx=%p",
|
//ALOGD("initialized %d dpy=%p, ver=%d.%d, cnx=%p",
|
||||||
// i, idpy, cnx->major, cnx->minor, cnx);
|
// i, idpy, cnx->major, cnx->minor, cnx);
|
||||||
|
|
||||||
// display is now initialized
|
// display is now initialized
|
||||||
|
@ -97,30 +97,30 @@ public:
|
|||||||
|
|
||||||
static void TraceGLShaderSource(GLuint shader, GLsizei count,
|
static void TraceGLShaderSource(GLuint shader, GLsizei count,
|
||||||
const GLchar** string, const GLint* length) {
|
const GLchar** string, const GLint* length) {
|
||||||
LOGD("const char* shaderSrc[] = {");
|
ALOGD("const char* shaderSrc[] = {");
|
||||||
for (GLsizei i = 0; i < count; i++) {
|
for (GLsizei i = 0; i < count; i++) {
|
||||||
const char* comma = i < count-1 ? "," : "";
|
const char* comma = i < count-1 ? "," : "";
|
||||||
const GLchar* s = string[i];
|
const GLchar* s = string[i];
|
||||||
if (length) {
|
if (length) {
|
||||||
GLint len = length[i];
|
GLint len = length[i];
|
||||||
LOGD(" \"%*s\"%s", len, s, comma);
|
ALOGD(" \"%*s\"%s", len, s, comma);
|
||||||
} else {
|
} else {
|
||||||
LOGD(" \"%s\"%s", s, comma);
|
ALOGD(" \"%s\"%s", s, comma);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGD("};");
|
ALOGD("};");
|
||||||
if (length) {
|
if (length) {
|
||||||
LOGD("const GLint* shaderLength[] = {");
|
ALOGD("const GLint* shaderLength[] = {");
|
||||||
for (GLsizei i = 0; i < count; i++) {
|
for (GLsizei i = 0; i < count; i++) {
|
||||||
const char* comma = i < count-1 ? "," : "";
|
const char* comma = i < count-1 ? "," : "";
|
||||||
GLint len = length[i];
|
GLint len = length[i];
|
||||||
LOGD(" \"%d\"%s", len, comma);
|
ALOGD(" \"%d\"%s", len, comma);
|
||||||
}
|
}
|
||||||
LOGD("};");
|
ALOGD("};");
|
||||||
LOGD("glShaderSource(%u, %u, shaderSrc, shaderLength);",
|
ALOGD("glShaderSource(%u, %u, shaderSrc, shaderLength);",
|
||||||
shader, count);
|
shader, count);
|
||||||
} else {
|
} else {
|
||||||
LOGD("glShaderSource(%u, %u, shaderSrc, (const GLint*) 0);",
|
ALOGD("glShaderSource(%u, %u, shaderSrc, (const GLint*) 0);",
|
||||||
shader, count);
|
shader, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -131,7 +131,7 @@ static void TraceValue(int elementCount, char type,
|
|||||||
GLsizei count = chunkCount * chunkSize;
|
GLsizei count = chunkCount * chunkSize;
|
||||||
bool isFloat = type == 'f';
|
bool isFloat = type == 'f';
|
||||||
const char* typeString = isFloat ? "GLfloat" : "GLint";
|
const char* typeString = isFloat ? "GLfloat" : "GLint";
|
||||||
LOGD("const %s value[] = {", typeString);
|
ALOGD("const %s value[] = {", typeString);
|
||||||
for (GLsizei i = 0; i < count; i++) {
|
for (GLsizei i = 0; i < count; i++) {
|
||||||
StringBuilder builder;
|
StringBuilder builder;
|
||||||
builder.append(" ");
|
builder.append(" ");
|
||||||
@ -152,25 +152,25 @@ static void TraceValue(int elementCount, char type,
|
|||||||
value = (void*) (((GLint*) value) + 1);
|
value = (void*) (((GLint*) value) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGD("%s", builder.getString());
|
ALOGD("%s", builder.getString());
|
||||||
if (chunkSize > 1 && i < count-1
|
if (chunkSize > 1 && i < count-1
|
||||||
&& (i % chunkSize) == (chunkSize-1)) {
|
&& (i % chunkSize) == (chunkSize-1)) {
|
||||||
LOGD("%s", ""); // Print a blank line.
|
ALOGD("%s", ""); // Print a blank line.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGD("};");
|
ALOGD("};");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TraceUniformv(int elementCount, char type,
|
static void TraceUniformv(int elementCount, char type,
|
||||||
GLuint location, GLsizei count, const void* value) {
|
GLuint location, GLsizei count, const void* value) {
|
||||||
TraceValue(elementCount, type, count, 1, value);
|
TraceValue(elementCount, type, count, 1, value);
|
||||||
LOGD("glUniform%d%c(%u, %u, value);", elementCount, type, location, count);
|
ALOGD("glUniform%d%c(%u, %u, value);", elementCount, type, location, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TraceUniformMatrix(int matrixSideLength,
|
static void TraceUniformMatrix(int matrixSideLength,
|
||||||
GLuint location, GLsizei count, GLboolean transpose, const void* value) {
|
GLuint location, GLsizei count, GLboolean transpose, const void* value) {
|
||||||
TraceValue(matrixSideLength, 'f', count, matrixSideLength, value);
|
TraceValue(matrixSideLength, 'f', count, matrixSideLength, value);
|
||||||
LOGD("glUniformMatrix%dfv(%u, %u, %s, value);", matrixSideLength, location, count,
|
ALOGD("glUniformMatrix%dfv(%u, %u, %s, value);", matrixSideLength, location, count,
|
||||||
GLbooleanToString(transpose));
|
GLbooleanToString(transpose));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,7 +310,7 @@ static void TraceGL(const char* name, int numArgs, ...) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
builder.append(");");
|
builder.append(");");
|
||||||
LOGD("%s", builder.getString());
|
ALOGD("%s", builder.getString());
|
||||||
va_end(argp);
|
va_end(argp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ using namespace android;
|
|||||||
_c->_api(__VA_ARGS__); \
|
_c->_api(__VA_ARGS__); \
|
||||||
GLenum status = GL_NO_ERROR; \
|
GLenum status = GL_NO_ERROR; \
|
||||||
while ((status = glGetError()) != GL_NO_ERROR) { \
|
while ((status = glGetError()) != GL_NO_ERROR) { \
|
||||||
LOGD("[" #_api "] 0x%x", status); \
|
ALOGD("[" #_api "] 0x%x", status); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -103,7 +103,7 @@ static const int * GenerateCall_glVertexAttribPointer(DbgContext * const dbg,
|
|||||||
const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd,
|
const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd,
|
||||||
glesv2debugger::Message & msg, const int * const prevRet)
|
glesv2debugger::Message & msg, const int * const prevRet)
|
||||||
{
|
{
|
||||||
LOGD("GenerateCall function=%u", cmd.function());
|
ALOGD("GenerateCall function=%u", cmd.function());
|
||||||
const int * ret = prevRet; // only some functions have return value
|
const int * ret = prevRet; // only some functions have return value
|
||||||
nsecs_t c0 = systemTime(timeMode);
|
nsecs_t c0 = systemTime(timeMode);
|
||||||
switch (cmd.function()) { case glesv2debugger::Message_Function_glActiveTexture:
|
switch (cmd.function()) { case glesv2debugger::Message_Function_glActiveTexture:
|
||||||
|
@ -242,7 +242,7 @@ unsigned int DbgContext::GetBufferSize()
|
|||||||
void DbgContext::glUseProgram(GLuint program)
|
void DbgContext::glUseProgram(GLuint program)
|
||||||
{
|
{
|
||||||
while (GLenum error = hooks->gl.glGetError())
|
while (GLenum error = hooks->gl.glGetError())
|
||||||
LOGD("DbgContext::glUseProgram(%u): before glGetError() = 0x%.4X",
|
ALOGD("DbgContext::glUseProgram(%u): before glGetError() = 0x%.4X",
|
||||||
program, error);
|
program, error);
|
||||||
this->program = program;
|
this->program = program;
|
||||||
maxAttrib = 0;
|
maxAttrib = 0;
|
||||||
@ -286,7 +286,7 @@ void DbgContext::glUseProgram(GLuint program)
|
|||||||
}
|
}
|
||||||
delete name;
|
delete name;
|
||||||
while (GLenum error = hooks->gl.glGetError())
|
while (GLenum error = hooks->gl.glGetError())
|
||||||
LOGD("DbgContext::glUseProgram(%u): after glGetError() = 0x%.4X",
|
ALOGD("DbgContext::glUseProgram(%u): after glGetError() = 0x%.4X",
|
||||||
program, error);
|
program, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ using namespace com::android;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef assert
|
#undef assert
|
||||||
#define assert(expr) if (!(expr)) { LOGD("\n*\n*\n* assert: %s at %s \n*\n*", #expr, __location__); int * x = 0; *x = 5; }
|
#define assert(expr) if (!(expr)) { ALOGD("\n*\n*\n* assert: %s at %s \n*\n*", #expr, __location__); int * x = 0; *x = 5; }
|
||||||
//#undef LOGD
|
//#undef ALOGD
|
||||||
//#define LOGD(...)
|
//#define ALOGD(...)
|
||||||
|
|
||||||
namespace android
|
namespace android
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ int timeMode = SYSTEM_TIME_THREAD;
|
|||||||
|
|
||||||
static void Die(const char * msg)
|
static void Die(const char * msg)
|
||||||
{
|
{
|
||||||
LOGD("\n*\n*\n* GLESv2_dbg: Die: %s \n*\n*", msg);
|
ALOGD("\n*\n*\n* GLESv2_dbg: Die: %s \n*\n*", msg);
|
||||||
StopDebugServer();
|
StopDebugServer();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -44,11 +44,11 @@ void StartDebugServer(const unsigned short port, const bool forceUseFile,
|
|||||||
{
|
{
|
||||||
MAX_FILE_SIZE = maxFileSize;
|
MAX_FILE_SIZE = maxFileSize;
|
||||||
|
|
||||||
LOGD("GLESv2_dbg: StartDebugServer");
|
ALOGD("GLESv2_dbg: StartDebugServer");
|
||||||
if (serverSock >= 0 || file)
|
if (serverSock >= 0 || file)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LOGD("GLESv2_dbg: StartDebugServer create socket");
|
ALOGD("GLESv2_dbg: StartDebugServer create socket");
|
||||||
struct sockaddr_in server = {}, client = {};
|
struct sockaddr_in server = {}, client = {};
|
||||||
|
|
||||||
/* Create the TCP socket */
|
/* Create the TCP socket */
|
||||||
@ -75,7 +75,7 @@ void StartDebugServer(const unsigned short port, const bool forceUseFile,
|
|||||||
Die("Failed to listen on server socket");
|
Die("Failed to listen on server socket");
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD("server started on %d \n", server.sin_port);
|
ALOGD("server started on %d \n", server.sin_port);
|
||||||
|
|
||||||
|
|
||||||
/* Wait for client connection */
|
/* Wait for client connection */
|
||||||
@ -85,13 +85,13 @@ void StartDebugServer(const unsigned short port, const bool forceUseFile,
|
|||||||
Die("Failed to accept client connection");
|
Die("Failed to accept client connection");
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD("Client connected: %s\n", inet_ntoa(client.sin_addr));
|
ALOGD("Client connected: %s\n", inet_ntoa(client.sin_addr));
|
||||||
// fcntl(clientSock, F_SETFL, O_NONBLOCK);
|
// fcntl(clientSock, F_SETFL, O_NONBLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StopDebugServer()
|
void StopDebugServer()
|
||||||
{
|
{
|
||||||
LOGD("GLESv2_dbg: StopDebugServer");
|
ALOGD("GLESv2_dbg: StopDebugServer");
|
||||||
if (clientSock > 0) {
|
if (clientSock > 0) {
|
||||||
close(clientSock);
|
close(clientSock);
|
||||||
clientSock = -1;
|
clientSock = -1;
|
||||||
@ -115,7 +115,7 @@ void Receive(glesv2debugger::Message & cmd)
|
|||||||
if (received < 0)
|
if (received < 0)
|
||||||
Die("Failed to receive response length");
|
Die("Failed to receive response length");
|
||||||
else if (4 != received) {
|
else if (4 != received) {
|
||||||
LOGD("received %dB: %.8X", received, len);
|
ALOGD("received %dB: %.8X", received, len);
|
||||||
Die("Received length mismatch, expected 4");
|
Die("Received length mismatch, expected 4");
|
||||||
}
|
}
|
||||||
static void * buffer = NULL;
|
static void * buffer = NULL;
|
||||||
@ -150,7 +150,7 @@ bool TryReceive(glesv2debugger::Message & cmd)
|
|||||||
|
|
||||||
bool received = false;
|
bool received = false;
|
||||||
if (FD_ISSET(clientSock, &readSet)) {
|
if (FD_ISSET(clientSock, &readSet)) {
|
||||||
LOGD("TryReceive: avaiable for read");
|
ALOGD("TryReceive: avaiable for read");
|
||||||
Receive(cmd);
|
Receive(cmd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -190,14 +190,14 @@ float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd)
|
|||||||
int sent = -1;
|
int sent = -1;
|
||||||
sent = send(clientSock, &len, sizeof(len), 0);
|
sent = send(clientSock, &len, sizeof(len), 0);
|
||||||
if (sent != sizeof(len)) {
|
if (sent != sizeof(len)) {
|
||||||
LOGD("actual sent=%d expected=%d clientSock=%d", sent, sizeof(len), clientSock);
|
ALOGD("actual sent=%d expected=%d clientSock=%d", sent, sizeof(len), clientSock);
|
||||||
Die("Failed to send message length");
|
Die("Failed to send message length");
|
||||||
}
|
}
|
||||||
nsecs_t c0 = systemTime(timeMode);
|
nsecs_t c0 = systemTime(timeMode);
|
||||||
sent = send(clientSock, str.data(), str.length(), 0);
|
sent = send(clientSock, str.data(), str.length(), 0);
|
||||||
float t = (float)ns2ms(systemTime(timeMode) - c0);
|
float t = (float)ns2ms(systemTime(timeMode) - c0);
|
||||||
if (sent != str.length()) {
|
if (sent != str.length()) {
|
||||||
LOGD("actual sent=%d expected=%d clientSock=%d", sent, str.length(), clientSock);
|
ALOGD("actual sent=%d expected=%d clientSock=%d", sent, str.length(), clientSock);
|
||||||
Die("Failed to send message");
|
Die("Failed to send message");
|
||||||
}
|
}
|
||||||
// TODO: factor Receive & TryReceive out and into MessageLoop, or add control argument.
|
// TODO: factor Receive & TryReceive out and into MessageLoop, or add control argument.
|
||||||
@ -210,9 +210,9 @@ float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd)
|
|||||||
if (!msg.expect_response()) {
|
if (!msg.expect_response()) {
|
||||||
if (TryReceive(cmd)) {
|
if (TryReceive(cmd)) {
|
||||||
if (glesv2debugger::Message_Function_SETPROP == cmd.function())
|
if (glesv2debugger::Message_Function_SETPROP == cmd.function())
|
||||||
LOGD("Send: TryReceived SETPROP");
|
ALOGD("Send: TryReceived SETPROP");
|
||||||
else
|
else
|
||||||
LOGD("Send: TryReceived %u", cmd.function());
|
ALOGD("Send: TryReceived %u", cmd.function());
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
Receive(cmd);
|
Receive(cmd);
|
||||||
@ -223,19 +223,19 @@ void SetProp(DbgContext * const dbg, const glesv2debugger::Message & cmd)
|
|||||||
{
|
{
|
||||||
switch (cmd.prop()) {
|
switch (cmd.prop()) {
|
||||||
case glesv2debugger::Message_Prop_CaptureDraw:
|
case glesv2debugger::Message_Prop_CaptureDraw:
|
||||||
LOGD("SetProp Message_Prop_CaptureDraw %d", cmd.arg0());
|
ALOGD("SetProp Message_Prop_CaptureDraw %d", cmd.arg0());
|
||||||
dbg->captureDraw = cmd.arg0();
|
dbg->captureDraw = cmd.arg0();
|
||||||
break;
|
break;
|
||||||
case glesv2debugger::Message_Prop_TimeMode:
|
case glesv2debugger::Message_Prop_TimeMode:
|
||||||
LOGD("SetProp Message_Prop_TimeMode %d", cmd.arg0());
|
ALOGD("SetProp Message_Prop_TimeMode %d", cmd.arg0());
|
||||||
timeMode = cmd.arg0();
|
timeMode = cmd.arg0();
|
||||||
break;
|
break;
|
||||||
case glesv2debugger::Message_Prop_ExpectResponse:
|
case glesv2debugger::Message_Prop_ExpectResponse:
|
||||||
LOGD("SetProp Message_Prop_ExpectResponse %d=%d", cmd.arg0(), cmd.arg1());
|
ALOGD("SetProp Message_Prop_ExpectResponse %d=%d", cmd.arg0(), cmd.arg1());
|
||||||
dbg->expectResponse.Bit((glesv2debugger::Message_Function)cmd.arg0(), cmd.arg1());
|
dbg->expectResponse.Bit((glesv2debugger::Message_Function)cmd.arg0(), cmd.arg1());
|
||||||
break;
|
break;
|
||||||
case glesv2debugger::Message_Prop_CaptureSwap:
|
case glesv2debugger::Message_Prop_CaptureSwap:
|
||||||
LOGD("SetProp CaptureSwap %d", cmd.arg0());
|
ALOGD("SetProp CaptureSwap %d", cmd.arg0());
|
||||||
dbg->captureSwap = cmd.arg0();
|
dbg->captureSwap = cmd.arg0();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -269,7 +269,7 @@ int * MessageLoop(FunctionCall & functionCall, glesv2debugger::Message & msg,
|
|||||||
case glesv2debugger::Message_Function_CONTINUE:
|
case glesv2debugger::Message_Function_CONTINUE:
|
||||||
ret = functionCall(&dbg->hooks->gl, msg);
|
ret = functionCall(&dbg->hooks->gl, msg);
|
||||||
while (GLenum error = dbg->hooks->gl.glGetError())
|
while (GLenum error = dbg->hooks->gl.glGetError())
|
||||||
LOGD("Function=%u glGetError() = 0x%.4X", function, error);
|
ALOGD("Function=%u glGetError() = 0x%.4X", function, error);
|
||||||
if (!msg.has_time()) // some has output data copy, so time inside call
|
if (!msg.has_time()) // some has output data copy, so time inside call
|
||||||
msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
|
msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
|
||||||
msg.set_context_id(reinterpret_cast<int>(dbg));
|
msg.set_context_id(reinterpret_cast<int>(dbg));
|
||||||
|
@ -72,7 +72,7 @@ void Debug_glDrawArrays(GLenum mode, GLint first, GLsizei count)
|
|||||||
if (dbg->captureDraw > 0) {
|
if (dbg->captureDraw > 0) {
|
||||||
dbg->captureDraw--;
|
dbg->captureDraw--;
|
||||||
dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
|
dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
|
||||||
// LOGD("glDrawArrays CAPTURE: x=%d y=%d width=%d height=%d format=0x%.4X type=0x%.4X",
|
// ALOGD("glDrawArrays CAPTURE: x=%d y=%d width=%d height=%d format=0x%.4X type=0x%.4X",
|
||||||
// viewport[0], viewport[1], viewport[2], viewport[3], readFormat, readType);
|
// viewport[0], viewport[1], viewport[2], viewport[3], readFormat, readType);
|
||||||
pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] *
|
pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] *
|
||||||
dbg->readBytesPerPixel);
|
dbg->readBytesPerPixel);
|
||||||
|
@ -79,7 +79,7 @@ bool DisplayHardwareBase::DisplayEventThread::threadLoop()
|
|||||||
LOGW_IF(err<0, "ANDROID_WAIT_FOR_FB_SLEEP failed (%s)", strerror(errno));
|
LOGW_IF(err<0, "ANDROID_WAIT_FOR_FB_SLEEP failed (%s)", strerror(errno));
|
||||||
if (err >= 0) {
|
if (err >= 0) {
|
||||||
sp<SurfaceFlinger> flinger = mFlinger.promote();
|
sp<SurfaceFlinger> flinger = mFlinger.promote();
|
||||||
LOGD("About to give-up screen, flinger = %p", flinger.get());
|
ALOGD("About to give-up screen, flinger = %p", flinger.get());
|
||||||
if (flinger != 0) {
|
if (flinger != 0) {
|
||||||
mBarrier.close();
|
mBarrier.close();
|
||||||
flinger->screenReleased(0);
|
flinger->screenReleased(0);
|
||||||
@ -94,7 +94,7 @@ bool DisplayHardwareBase::DisplayEventThread::threadLoop()
|
|||||||
LOGW_IF(err<0, "ANDROID_WAIT_FOR_FB_WAKE failed (%s)", strerror(errno));
|
LOGW_IF(err<0, "ANDROID_WAIT_FOR_FB_WAKE failed (%s)", strerror(errno));
|
||||||
if (err >= 0) {
|
if (err >= 0) {
|
||||||
sp<SurfaceFlinger> flinger = mFlinger.promote();
|
sp<SurfaceFlinger> flinger = mFlinger.promote();
|
||||||
LOGD("Screen about to return, flinger = %p", flinger.get());
|
ALOGD("Screen about to return, flinger = %p", flinger.get());
|
||||||
if (flinger != 0)
|
if (flinger != 0)
|
||||||
flinger->screenAcquired(0);
|
flinger->screenAcquired(0);
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ uint32_t Layer::doTransaction(uint32_t flags)
|
|||||||
|
|
||||||
if (sizeChanged) {
|
if (sizeChanged) {
|
||||||
// the size changed, we need to ask our client to request a new buffer
|
// the size changed, we need to ask our client to request a new buffer
|
||||||
LOGD_IF(DEBUG_RESIZE,
|
ALOGD_IF(DEBUG_RESIZE,
|
||||||
"doTransaction: "
|
"doTransaction: "
|
||||||
"resize (layer=%p), requested (%dx%d), drawing (%d,%d), "
|
"resize (layer=%p), requested (%dx%d), drawing (%d,%d), "
|
||||||
"scalingMode=%d",
|
"scalingMode=%d",
|
||||||
@ -485,7 +485,7 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
|
|||||||
recomputeVisibleRegions = true;
|
recomputeVisibleRegions = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD_IF(DEBUG_RESIZE,
|
ALOGD_IF(DEBUG_RESIZE,
|
||||||
"lockPageFlip : "
|
"lockPageFlip : "
|
||||||
" (layer=%p), buffer (%ux%u, tr=%02x), "
|
" (layer=%p), buffer (%ux%u, tr=%02x), "
|
||||||
"requested (%dx%d)",
|
"requested (%dx%d)",
|
||||||
|
@ -111,7 +111,7 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nextEventTime >= 0) {
|
if (nextEventTime >= 0) {
|
||||||
//LOGD("nextEventTime = %lld ms", nextEventTime);
|
//ALOGD("nextEventTime = %lld ms", nextEventTime);
|
||||||
if (nextEventTime > 0) {
|
if (nextEventTime > 0) {
|
||||||
// we're about to wait, flush the binder command buffer
|
// we're about to wait, flush the binder command buffer
|
||||||
IPCThreadState::self()->flushCommands();
|
IPCThreadState::self()->flushCommands();
|
||||||
@ -121,7 +121,7 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//LOGD("going to wait");
|
//ALOGD("going to wait");
|
||||||
// we're about to wait, flush the binder command buffer
|
// we're about to wait, flush the binder command buffer
|
||||||
IPCThreadState::self()->flushCommands();
|
IPCThreadState::self()->flushCommands();
|
||||||
mCondition.wait(mLock);
|
mCondition.wait(mLock);
|
||||||
@ -165,7 +165,7 @@ status_t MessageQueue::queueMessage(
|
|||||||
message->when = systemTime() + relTime;
|
message->when = systemTime() + relTime;
|
||||||
mMessages.insert(message);
|
mMessages.insert(message);
|
||||||
|
|
||||||
//LOGD("MessageQueue::queueMessage time = %lld ms", message->when);
|
//ALOGD("MessageQueue::queueMessage time = %lld ms", message->when);
|
||||||
//dumpLocked(message);
|
//dumpLocked(message);
|
||||||
|
|
||||||
mCondition.signal();
|
mCondition.signal();
|
||||||
@ -185,7 +185,7 @@ void MessageQueue::dumpLocked(const sp<MessageBase>& message)
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
while (cur != end) {
|
while (cur != end) {
|
||||||
const char tick = (*cur == message) ? '>' : ' ';
|
const char tick = (*cur == message) ? '>' : ' ';
|
||||||
LOGD("%c %d: msg{.what=%08x, when=%lld}",
|
ALOGD("%c %d: msg{.what=%08x, when=%lld}",
|
||||||
tick, c, (*cur)->what, (*cur)->when);
|
tick, c, (*cur)->what, (*cur)->when);
|
||||||
++cur;
|
++cur;
|
||||||
c++;
|
c++;
|
||||||
|
@ -1286,7 +1286,7 @@ sp<ISurface> SurfaceFlinger::createSurface(
|
|||||||
return surfaceHandle;
|
return surfaceHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
//LOGD("createSurface for pid %d (%d x %d)", pid, w, h);
|
//ALOGD("createSurface for pid %d (%d x %d)", pid, w, h);
|
||||||
sp<Layer> normalLayer;
|
sp<Layer> normalLayer;
|
||||||
switch (flags & eFXSurfaceMask) {
|
switch (flags & eFXSurfaceMask) {
|
||||||
case eFXSurfaceNormal:
|
case eFXSurfaceNormal:
|
||||||
@ -2268,7 +2268,7 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy,
|
|||||||
sh = (!sh) ? hw_h : sh;
|
sh = (!sh) ? hw_h : sh;
|
||||||
const size_t size = sw * sh * 4;
|
const size_t size = sw * sh * 4;
|
||||||
|
|
||||||
//LOGD("screenshot: sw=%d, sh=%d, minZ=%d, maxZ=%d",
|
//ALOGD("screenshot: sw=%d, sh=%d, minZ=%d, maxZ=%d",
|
||||||
// sw, sh, minLayerZ, maxLayerZ);
|
// sw, sh, minLayerZ, maxLayerZ);
|
||||||
|
|
||||||
// make sure to clear all GL error flags
|
// make sure to clear all GL error flags
|
||||||
@ -2359,7 +2359,7 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy,
|
|||||||
|
|
||||||
hw.compositionComplete();
|
hw.compositionComplete();
|
||||||
|
|
||||||
// LOGD("screenshot: result = %s", result<0 ? strerror(result) : "OK");
|
// ALOGD("screenshot: result = %s", result<0 ? strerror(result) : "OK");
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ SurfaceTextureLayer::~SurfaceTextureLayer() {
|
|||||||
|
|
||||||
status_t SurfaceTextureLayer::setDefaultBufferSize(uint32_t w, uint32_t h)
|
status_t SurfaceTextureLayer::setDefaultBufferSize(uint32_t w, uint32_t h)
|
||||||
{
|
{
|
||||||
//LOGD("%s, w=%u, h=%u", __PRETTY_FUNCTION__, w, h);
|
//ALOGD("%s, w=%u, h=%u", __PRETTY_FUNCTION__, w, h);
|
||||||
return SurfaceTexture::setDefaultBufferSize(w, h);
|
return SurfaceTexture::setDefaultBufferSize(w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ status_t SurfaceTextureLayer::dequeueBuffer(int *buf,
|
|||||||
if (format == 0)
|
if (format == 0)
|
||||||
format = mDefaultFormat;
|
format = mDefaultFormat;
|
||||||
uint32_t effectiveUsage = layer->getEffectiveUsage(usage);
|
uint32_t effectiveUsage = layer->getEffectiveUsage(usage);
|
||||||
//LOGD("%s, w=%u, h=%u, format=%u, usage=%08x, effectiveUsage=%08x",
|
//ALOGD("%s, w=%u, h=%u, format=%u, usage=%08x, effectiveUsage=%08x",
|
||||||
// __PRETTY_FUNCTION__, w, h, format, usage, effectiveUsage);
|
// __PRETTY_FUNCTION__, w, h, format, usage, effectiveUsage);
|
||||||
res = SurfaceTexture::dequeueBuffer(buf, w, h, format, effectiveUsage);
|
res = SurfaceTexture::dequeueBuffer(buf, w, h, format, effectiveUsage);
|
||||||
}
|
}
|
||||||
|
@ -344,10 +344,10 @@ void Transform::dump(const char* name) const
|
|||||||
if (mType&TRANSLATE)
|
if (mType&TRANSLATE)
|
||||||
type.append("TRANSLATE ");
|
type.append("TRANSLATE ");
|
||||||
|
|
||||||
LOGD("%s 0x%08x (%s, %s)", name, mType, flags.string(), type.string());
|
ALOGD("%s 0x%08x (%s, %s)", name, mType, flags.string(), type.string());
|
||||||
LOGD("%.4f %.4f %.4f", m[0][0], m[1][0], m[2][0]);
|
ALOGD("%.4f %.4f %.4f", m[0][0], m[1][0], m[2][0]);
|
||||||
LOGD("%.4f %.4f %.4f", m[0][1], m[1][1], m[2][1]);
|
ALOGD("%.4f %.4f %.4f", m[0][1], m[1][1], m[2][1]);
|
||||||
LOGD("%.4f %.4f %.4f", m[0][2], m[1][2], m[2][2]);
|
ALOGD("%.4f %.4f %.4f", m[0][2], m[1][2], m[2][2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@ -204,11 +204,11 @@ TEST_F(LayerUpdateTest, LayerResizeWorks) {
|
|||||||
sc->checkPixel(145, 145, 63, 63, 195);
|
sc->checkPixel(145, 145, 63, 63, 195);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD("resizing");
|
ALOGD("resizing");
|
||||||
SurfaceComposerClient::openGlobalTransaction();
|
SurfaceComposerClient::openGlobalTransaction();
|
||||||
ASSERT_EQ(NO_ERROR, mFGSurfaceControl->setSize(128, 128));
|
ASSERT_EQ(NO_ERROR, mFGSurfaceControl->setSize(128, 128));
|
||||||
SurfaceComposerClient::closeGlobalTransaction(true);
|
SurfaceComposerClient::closeGlobalTransaction(true);
|
||||||
LOGD("resized");
|
ALOGD("resized");
|
||||||
{
|
{
|
||||||
// This should not reflect the new size or color because SurfaceFlinger
|
// This should not reflect the new size or color because SurfaceFlinger
|
||||||
// has not yet received a buffer of the correct size.
|
// has not yet received a buffer of the correct size.
|
||||||
@ -219,10 +219,10 @@ TEST_F(LayerUpdateTest, LayerResizeWorks) {
|
|||||||
sc->checkPixel(145, 145, 63, 63, 195);
|
sc->checkPixel(145, 145, 63, 63, 195);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGD("drawing");
|
ALOGD("drawing");
|
||||||
fillSurfaceRGBA8(mFGSurfaceControl, 63, 195, 63);
|
fillSurfaceRGBA8(mFGSurfaceControl, 63, 195, 63);
|
||||||
waitForPostedBuffers();
|
waitForPostedBuffers();
|
||||||
LOGD("drawn");
|
ALOGD("drawn");
|
||||||
{
|
{
|
||||||
// This should reflect the new size and the new color.
|
// This should reflect the new size and the new color.
|
||||||
SCOPED_TRACE("after redraw");
|
SCOPED_TRACE("after redraw");
|
||||||
|
Loading…
Reference in New Issue
Block a user