summaryrefslogtreecommitdiffstats
path: root/libs/ui/GraphicBufferAllocator.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-12-03 17:33:09 -0800
committerMathias Agopian <mathias@google.com>2010-12-03 17:33:09 -0800
commit678bdd6349344df254cc0c3377a40fd99e216635 (patch)
treeda494113fcdc38fab4a45903b125207def169d43 /libs/ui/GraphicBufferAllocator.cpp
parent33f4f329678e7511f274548c8d2e46a6e473d2ec (diff)
downloadframeworks_native-678bdd6349344df254cc0c3377a40fd99e216635.zip
frameworks_native-678bdd6349344df254cc0c3377a40fd99e216635.tar.gz
frameworks_native-678bdd6349344df254cc0c3377a40fd99e216635.tar.bz2
[3171580] don't automatically log GraphicBuffer allocation failures
some of these failures are not fatal and even expected in some cases so they should not emit a dump in the log in those cases. Change-Id: Idcfa252e3bfa9d74e27fe4ad8f8623aa01aa9c5e
Diffstat (limited to 'libs/ui/GraphicBufferAllocator.cpp')
-rw-r--r--libs/ui/GraphicBufferAllocator.cpp11
1 files changed, 7 insertions, 4 deletions
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;