From e142428a9c8b9d2380032cd4d7b55ee440fe8770 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 29 Jul 2013 21:24:40 -0700 Subject: Make Flattenable not virtual Fallout from the Flattenable change, update all its uses. Additionnaly, fix/tighten size checks when (un)flatten()ing things. Removed the assumption by some flattenables (e.g.: Fence) that the size passed to them would be exact (it can and will be larger in some cases) The code in Parcel is a bit complicated so that we don't have to expose the full implementation (and also to keep the code smallish). Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde --- opengl/libs/EGL/egl_cache.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'opengl') diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp index 1607267..b0798a1 100644 --- a/opengl/libs/EGL/egl_cache.cpp +++ b/opengl/libs/EGL/egl_cache.cpp @@ -253,8 +253,7 @@ void egl_cache_t::saveBlobCacheLocked() { return; } - status_t err = mBlobCache->flatten(buf + headerSize, cacheSize, NULL, - 0); + status_t err = mBlobCache->flatten(buf + headerSize, cacheSize); if (err != OK) { ALOGE("error writing cache contents: %s (%d)", strerror(-err), -err); @@ -335,8 +334,7 @@ void egl_cache_t::loadBlobCacheLocked() { return; } - status_t err = mBlobCache->unflatten(buf + headerSize, cacheSize, NULL, - 0); + status_t err = mBlobCache->unflatten(buf + headerSize, cacheSize); if (err != OK) { ALOGE("error reading cache contents: %s (%d)", strerror(-err), -err); -- cgit v1.1