diff options
-rw-r--r-- | libs/surfaceflinger/LayerBlur.cpp | 1 | ||||
-rw-r--r-- | libs/surfaceflinger/LayerBuffer.cpp | 7 | ||||
-rw-r--r-- | libs/utils/ResourceTypes.cpp | 20 | ||||
-rw-r--r-- | opengl/libagl/array.cpp | 36 |
4 files changed, 44 insertions, 20 deletions
diff --git a/libs/surfaceflinger/LayerBlur.cpp b/libs/surfaceflinger/LayerBlur.cpp index 5d4a38b..5fd7904 100644 --- a/libs/surfaceflinger/LayerBlur.cpp +++ b/libs/surfaceflinger/LayerBlur.cpp @@ -169,7 +169,6 @@ void LayerBlur::onDraw(const Region& clip) const // This reads the frame-buffer, so a h/w GL would have to // finish() its rendering first. we don't want to do that // too often. Read data is 4-bytes aligned. - glFinish(); glReadPixels(X, Y, w, h, mReadFormat, mReadType, pixels); // blur that texture. diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp index 28d7c48..88ef7e4 100644 --- a/libs/surfaceflinger/LayerBuffer.cpp +++ b/libs/surfaceflinger/LayerBuffer.cpp @@ -118,7 +118,12 @@ uint32_t LayerBuffer::doTransaction(uint32_t flags) sp<Source> source(getSource()); if (source != 0) source->onTransaction(flags); - return LayerBase::doTransaction(flags); + uint32_t res = LayerBase::doTransaction(flags); + // we always want filtering for these surfaces + if (!(mFlags & DisplayHardware::SLOW_CONFIG)) { + mUseLinearFiltering = true; + } + return res; } void LayerBuffer::unlockPageFlip(const Transform& planeTransform, diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp index 872b2bc..450af8d 100644 --- a/libs/utils/ResourceTypes.cpp +++ b/libs/utils/ResourceTypes.cpp @@ -42,6 +42,7 @@ #define TABLE_GETENTRY(x) //x #define TABLE_SUPER_NOISY(x) //x #define LOAD_TABLE_NOISY(x) //x +#define TABLE_THEME(x) //x namespace android { @@ -1447,18 +1448,23 @@ ssize_t ResTable::Theme::getAttribute(uint32_t resID, Res_value* outValue, const uint32_t t = Res_GETTYPE(resID); const uint32_t e = Res_GETENTRY(resID); - TABLE_NOISY(LOGV("Looking up attr 0x%08x in theme %p", resID, this)); + TABLE_THEME(LOGI("Looking up attr 0x%08x in theme %p", resID, this)); if (p >= 0) { const package_info* const pi = mPackages[p]; + TABLE_THEME(LOGI("Found package: %p", pi)); if (pi != NULL) { + TABLE_THEME(LOGI("Desired type index is %ld in avail %d", t, pi->numTypes)); if (t < pi->numTypes) { const type_info& ti = pi->types[t]; + TABLE_THEME(LOGI("Desired entry index is %ld in avail %d", e, ti.numEntries)); if (e < ti.numEntries) { const theme_entry& te = ti.entries[e]; - if (outTypeSpecFlags != NULL) { - *outTypeSpecFlags |= te.typeSpecFlags; - } + if (outTypeSpecFlags != NULL) { + *outTypeSpecFlags |= te.typeSpecFlags; + } + TABLE_THEME(LOGI("Theme value: type=0x%x, data=0x%08x", + te.value.dataType, te.value.data)); const uint8_t type = te.value.dataType; if (type == Res_value::TYPE_ATTRIBUTE) { if (cnt > 0) { @@ -1492,6 +1498,8 @@ ssize_t ResTable::Theme::resolveAttributeReference(Res_value* inOutValue, if (inOutValue->dataType == Res_value::TYPE_ATTRIBUTE) { uint32_t newTypeSpecFlags; blockIndex = getAttribute(inOutValue->data, inOutValue, &newTypeSpecFlags); + TABLE_THEME(LOGI("Resolving attr reference: blockIndex=%d, type=0x%x, data=%p\n", + (int)blockIndex, (int)inOutValue->dataType, (void*)inOutValue->data)); if (inoutTypeSpecFlags != NULL) *inoutTypeSpecFlags |= newTypeSpecFlags; //printf("Retrieved attribute new type=0x%x\n", inOutValue->dataType); if (blockIndex < 0) { @@ -1911,8 +1919,8 @@ ssize_t ResTable::resolveReference(Res_value* value, ssize_t blockIndex, uint32_t newFlags = 0; const ssize_t newIndex = getResource(value->data, value, true, &newFlags, outConfig); - //LOGI("Resolving reference d=%p: newIndex=%d, t=0x%02x, d=%p\n", - // (void*)lastRef, (int)newIndex, (int)value->dataType, (void*)value->data); + TABLE_THEME(LOGI("Resolving reference %p: newIndex=%d, type=0x%x, data=%p\n", + (void*)lastRef, (int)newIndex, (int)value->dataType, (void*)value->data)); //printf("Getting reference 0x%08x: newIndex=%d\n", value->data, newIndex); if (inoutTypeSpecFlags != NULL) *inoutTypeSpecFlags |= newFlags; if (newIndex < 0) { diff --git a/opengl/libagl/array.cpp b/opengl/libagl/array.cpp index 4878722..71825c5 100644 --- a/opengl/libagl/array.cpp +++ b/opengl/libagl/array.cpp @@ -1548,24 +1548,36 @@ void glDeleteBuffers(GLsizei n, const GLuint* buffers) GLuint name = buffers[i]; if (name) { // unbind bound deleted buffers... - if (c->arrays.element_array_buffer->name == name) { - c->arrays.element_array_buffer = 0; + if (c->arrays.element_array_buffer) { + if (c->arrays.element_array_buffer->name == name) { + c->arrays.element_array_buffer = 0; + } } - if (c->arrays.array_buffer->name == name) { - c->arrays.array_buffer = 0; + if (c->arrays.array_buffer) { + if (c->arrays.array_buffer->name == name) { + c->arrays.array_buffer = 0; + } } - if (c->arrays.vertex.bo->name == name) { - c->arrays.vertex.bo = 0; + if (c->arrays.vertex.bo) { + if (c->arrays.vertex.bo->name == name) { + c->arrays.vertex.bo = 0; + } } - if (c->arrays.normal.bo->name == name) { - c->arrays.normal.bo = 0; + if (c->arrays.normal.bo) { + if (c->arrays.normal.bo->name == name) { + c->arrays.normal.bo = 0; + } } - if (c->arrays.color.bo->name == name) { - c->arrays.color.bo = 0; + if (c->arrays.color.bo) { + if (c->arrays.color.bo->name == name) { + c->arrays.color.bo = 0; + } } for (int t=0 ; t<GGL_TEXTURE_UNIT_COUNT ; t++) { - if (c->arrays.texture[t].bo->name == name) { - c->arrays.texture[t].bo = 0; + if (c->arrays.texture[t].bo) { + if (c->arrays.texture[t].bo->name == name) { + c->arrays.texture[t].bo = 0; + } } } } |