19#if !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
20static SkSpinlock gProcessorSpinlock;
22class MemoryPoolAccessor {
26#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
27 MemoryPoolAccessor() {}
28 ~MemoryPoolAccessor() {}
30 MemoryPoolAccessor() { gProcessorSpinlock.acquire(); }
31 ~MemoryPoolAccessor() { gProcessorSpinlock.release(); }
43void* GrProcessor::operator
new(
size_t size) {
return MemoryPoolAccessor().pool()->allocate(size); }
45void* GrProcessor::operator
new(
size_t object_size,
size_t footer_size) {
46 return MemoryPoolAccessor().pool()->allocate(object_size + footer_size);
49void GrProcessor::operator
delete(
void*
target) {
50 return MemoryPoolAccessor().pool()->release(
target);
static SkDiscardableMemoryPool * gPool
static std::unique_ptr< GrMemoryPool > Make(size_t preallocSize, size_t minAllocSize)