From 1d76781b7aa19611c4045fdf6b848af6c6094e0b Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 29 Jul 2013 21:24:40 -0700 Subject: Make Flattenable not virtual (libutils) Making an object Flattenable doesn't force it to become virtual anymore. For instance, Fence and GraphicBuffer are now non-virtual classes. Also change Flatennable protocol a bit so that it updates its parameters (pointers, sizes) to make it easier to implement a flattenable in terms of other flattenables. Change-Id: Ie81dc7637180b3c2cfcbaf644f8987ca804eb891 --- libs/utils/BlobCache.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'libs/utils/BlobCache.cpp') diff --git a/libs/utils/BlobCache.cpp b/libs/utils/BlobCache.cpp index be398ee4eb..0fb1d8e993 100644 --- a/libs/utils/BlobCache.cpp +++ b/libs/utils/BlobCache.cpp @@ -176,17 +176,7 @@ size_t BlobCache::getFlattenedSize() const { return size; } -size_t BlobCache::getFdCount() const { - return 0; -} - -status_t BlobCache::flatten(void* buffer, size_t size, int fds[], size_t count) - const { - if (count != 0) { - ALOGE("flatten: nonzero fd count: %zu", count); - return BAD_VALUE; - } - +status_t BlobCache::flatten(void* buffer, size_t size) const { // Write the cache header if (size < sizeof(Header)) { ALOGE("flatten: not enough room for cache header"); @@ -228,16 +218,10 @@ status_t BlobCache::flatten(void* buffer, size_t size, int fds[], size_t count) return OK; } -status_t BlobCache::unflatten(void const* buffer, size_t size, int fds[], - size_t count) { +status_t BlobCache::unflatten(void const* buffer, size_t size) { // All errors should result in the BlobCache being in an empty state. mCacheEntries.clear(); - if (count != 0) { - ALOGE("unflatten: nonzero fd count: %zu", count); - return BAD_VALUE; - } - // Read the cache header if (size < sizeof(Header)) { ALOGE("unflatten: not enough room for cache header"); -- cgit v1.2.3-59-g8ed1b