Loading include/ui/GraphicBuffer.h +4 −1 Original line number Diff line number Diff line Loading @@ -94,6 +94,9 @@ public: void setIndex(int index); int getIndex() const; // for debugging static void dumpAllocationsToSystemLog(); private: virtual ~GraphicBuffer(); Loading include/ui/GraphicBufferAllocator.h +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ public: status_t free(buffer_handle_t handle); void dump(String8& res) const; static void dumpToSystemLog(); private: struct alloc_rec_t { Loading libs/ui/GraphicBuffer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,11 @@ status_t GraphicBuffer::initCheck() const { return mInitCheck; } void GraphicBuffer::dumpAllocationsToSystemLog() { GraphicBufferAllocator::dumpToSystemLog(); } android_native_buffer_t* GraphicBuffer::getNativeBuffer() const { return static_cast<android_native_buffer_t*>( Loading libs/ui/GraphicBufferAllocator.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -73,6 +73,13 @@ void GraphicBufferAllocator::dump(String8& result) const result.append(buffer); } void GraphicBufferAllocator::dumpToSystemLog() { String8 s; GraphicBufferAllocator::getInstance().dump(s); LOGD("%s", s.string()); } status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat format, int usage, buffer_handle_t* handle, int32_t* stride) { Loading Loading @@ -104,10 +111,6 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat forma rec.usage = usage; rec.size = h * stride[0] * bytesPerPixel(format); list.add(*handle, rec); } else { String8 s; dump(s); LOGD("%s", s.string()); } return err; Loading services/surfaceflinger/Layer.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -347,6 +347,7 @@ sp<GraphicBuffer> Layer::requestBuffer(int index, err = buffer->initCheck(); if (err || buffer->handle == 0) { GraphicBuffer::dumpAllocationsToSystemLog(); LOGE_IF(err || buffer->handle == 0, "Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d failed (%s)", this, index, w, h, strerror(-err)); Loading Loading
include/ui/GraphicBuffer.h +4 −1 Original line number Diff line number Diff line Loading @@ -94,6 +94,9 @@ public: void setIndex(int index); int getIndex() const; // for debugging static void dumpAllocationsToSystemLog(); private: virtual ~GraphicBuffer(); Loading
include/ui/GraphicBufferAllocator.h +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ public: status_t free(buffer_handle_t handle); void dump(String8& res) const; static void dumpToSystemLog(); private: struct alloc_rec_t { Loading
libs/ui/GraphicBuffer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,11 @@ status_t GraphicBuffer::initCheck() const { return mInitCheck; } void GraphicBuffer::dumpAllocationsToSystemLog() { GraphicBufferAllocator::dumpToSystemLog(); } android_native_buffer_t* GraphicBuffer::getNativeBuffer() const { return static_cast<android_native_buffer_t*>( Loading
libs/ui/GraphicBufferAllocator.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -73,6 +73,13 @@ void GraphicBufferAllocator::dump(String8& result) const result.append(buffer); } void GraphicBufferAllocator::dumpToSystemLog() { String8 s; GraphicBufferAllocator::getInstance().dump(s); LOGD("%s", s.string()); } status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat format, int usage, buffer_handle_t* handle, int32_t* stride) { Loading Loading @@ -104,10 +111,6 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat forma rec.usage = usage; rec.size = h * stride[0] * bytesPerPixel(format); list.add(*handle, rec); } else { String8 s; dump(s); LOGD("%s", s.string()); } return err; Loading
services/surfaceflinger/Layer.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -347,6 +347,7 @@ sp<GraphicBuffer> Layer::requestBuffer(int index, err = buffer->initCheck(); if (err || buffer->handle == 0) { GraphicBuffer::dumpAllocationsToSystemLog(); LOGE_IF(err || buffer->handle == 0, "Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d failed (%s)", this, index, w, h, strerror(-err)); Loading