summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorNaomi Luis <nluis@codeaurora.org>2011-08-31 17:07:35 -0700
committerArne Coucheron <arco68@gmail.com>2011-09-22 08:48:28 +0200
commit5eb9e6f1a2c0385664c3346e9fea4e0ef719bd08 (patch)
treefab5f44cc0a033b1568aad4512434c37bb1c2724 /libs
parentb7ee59166301c0b366974766d7842c14a0b8f16a (diff)
downloadframeworks_base-5eb9e6f1a2c0385664c3346e9fea4e0ef719bd08.zip
frameworks_base-5eb9e6f1a2c0385664c3346e9fea4e0ef719bd08.tar.gz
frameworks_base-5eb9e6f1a2c0385664c3346e9fea4e0ef719bd08.tar.bz2
libui: Always allocate buffers from gralloc
All graphic buffers should be allocated from the gralloc. Gralloc supports allocating buffers even for software-only implementations. Change-Id: Iad4c72f0c0aeabb00a8f53a46dcf72c5436c0935 CRs-fixed: 297748
Diffstat (limited to 'libs')
-rw-r--r--libs/ui/GraphicBufferAllocator.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp
index fa46ab7..cd802d6 100644
--- a/libs/ui/GraphicBufferAllocator.cpp
+++ b/libs/ui/GraphicBufferAllocator.cpp
@@ -91,11 +91,7 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat forma
// we have a h/w allocator and h/w buffer is requested
status_t err;
- if (usage & GRALLOC_USAGE_HW_MASK) {
- err = mAllocDev->alloc(mAllocDev, w, h, format, usage, handle, stride);
- } else {
- err = sw_gralloc_handle_t::alloc(w, h, format, usage, handle, stride);
- }
+ err = mAllocDev->alloc(mAllocDev, w, h, format, usage, handle, stride);
LOGW_IF(err, "alloc(%u, %u, %d, %08x, ...) failed %d (%s)",
w, h, format, usage, err, strerror(-err));