diff options
Diffstat (limited to 'gralloc/gr_allocator.cpp')
-rw-r--r-- | gralloc/gr_allocator.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gralloc/gr_allocator.cpp b/gralloc/gr_allocator.cpp index 64211572..a8073195 100644 --- a/gralloc/gr_allocator.cpp +++ b/gralloc/gr_allocator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2020, The Linux Foundation. All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -92,11 +92,6 @@ Allocator::Allocator() : ion_allocator_(nullptr) {} bool Allocator::Init() { ion_allocator_ = new IonAlloc(); - char property[PROPERTY_VALUE_MAX]; - property_get(USE_SYSTEM_HEAP_FOR_SENSORS, property, "1"); - if (!(strncmp(property, "0", PROPERTY_VALUE_MAX))) { - use_system_heap_for_sensors_ = false; - } if (!ion_allocator_->Init()) { return false; @@ -111,6 +106,10 @@ Allocator::~Allocator() { } } +void Allocator::SetProperties(gralloc::GrallocProperties props) { + use_system_heap_for_sensors_ = props.use_system_heap_for_sensors; +} + int Allocator::AllocateMem(AllocData *alloc_data, uint64_t usage, int format) { int ret; alloc_data->uncached = UseUncached(format, usage); |