fix [1980202] Surfaceflinger crash with transparent rollo on firestone
we now automatically size the pmem region isntead of using hardcoded values
diff --git a/modules/gralloc/allocator.h b/modules/gralloc/allocator.h
index dfb06f6..6823982 100644
--- a/modules/gralloc/allocator.h
+++ b/modules/gralloc/allocator.h
@@ -95,12 +95,15 @@
{
public:
- SimpleBestFitAllocator(size_t size);
- virtual ~SimpleBestFitAllocator();
+ SimpleBestFitAllocator();
+ SimpleBestFitAllocator(size_t size);
+ ~SimpleBestFitAllocator();
- virtual size_t allocate(size_t size, uint32_t flags = 0);
- virtual ssize_t deallocate(size_t offset);
- virtual size_t size() const;
+ ssize_t setSize(size_t size);
+
+ ssize_t allocate(size_t size, uint32_t flags = 0);
+ ssize_t deallocate(size_t offset);
+ size_t size() const;
private:
struct chunk_t {
@@ -123,5 +126,4 @@
size_t mHeapSize;
};
-
#endif /* GRALLOC_ALLOCATOR_H_ */