diff options
author | Mathias Agopian <mathias@google.com> | 2010-12-07 14:17:47 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-07 14:17:47 -0800 |
commit | 4153bf3a259624a2f2dc497b77b225a1fb517abc (patch) | |
tree | 1d5825784e0097f81c3994619e2570be79b5c912 /libs | |
parent | 0f74afbbf4bd0fe35889e26fc46f94c4ca6382d8 (diff) | |
parent | e869aee382cfe01d42dffba4912458a16bb791fb (diff) | |
download | frameworks_base-4153bf3a259624a2f2dc497b77b225a1fb517abc.zip frameworks_base-4153bf3a259624a2f2dc497b77b225a1fb517abc.tar.gz frameworks_base-4153bf3a259624a2f2dc497b77b225a1fb517abc.tar.bz2 |
Merge "[3171580] don't automatically log GraphicBuffer allocation failures" into gingerbread
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ui/GraphicBuffer.cpp | 5 | ||||
-rw-r--r-- | libs/ui/GraphicBufferAllocator.cpp | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp index 519c277..828a988 100644 --- a/libs/ui/GraphicBuffer.cpp +++ b/libs/ui/GraphicBuffer.cpp @@ -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*>( diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp index d51664d..fa46ab7 100644 --- a/libs/ui/GraphicBufferAllocator.cpp +++ b/libs/ui/GraphicBufferAllocator.cpp @@ -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) { @@ -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; |