diff options
author | Mathias Agopian <mathias@google.com> | 2010-01-25 19:00:00 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-01-29 14:51:06 -0800 |
commit | 6faf7893b6307a3295993380d61af49f2cda965c (patch) | |
tree | 0b96c41270e160fbafb2956f8a91ec3ef1772b67 /media/libstagefright | |
parent | bf124e7e41f7850ac1b7be808221a462db6f3447 (diff) | |
download | frameworks_base-6faf7893b6307a3295993380d61af49f2cda965c.zip frameworks_base-6faf7893b6307a3295993380d61af49f2cda965c.tar.gz frameworks_base-6faf7893b6307a3295993380d61af49f2cda965c.tar.bz2 |
Simplify the MemoryDealer implementation
At some point the implementation became complicated because of
SurfaceFlinger's special needs, since we are now relying on gralloc
we can go back to much simpler MemoryDealer.
Removed HeapInterface and AllocatorInterface, since those don't need
to be paramterized anymore. Merged SimpleMemory and Allocation.
Made SimplisticAllocator non virtual.
Removed MemoryDealer flags (READ_ONLY, PAGE_ALIGNED)
Removed a lot of unneeded code.
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 2 | ||||
-rw-r--r-- | media/libstagefright/omx/tests/OMXHarness.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 986dcb2..e17fbb8 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -1183,7 +1183,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { } size_t totalSize = def.nBufferCountActual * def.nBufferSize; - mDealer[portIndex] = new MemoryDealer(totalSize); + mDealer[portIndex] = new MemoryDealer(totalSize, "OMXCodec"); for (OMX_U32 i = 0; i < def.nBufferCountActual; ++i) { sp<IMemory> mem = mDealer[portIndex]->allocate(def.nBufferSize); diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp index 6c36163..51fcaf5 100644 --- a/media/libstagefright/omx/tests/OMXHarness.cpp +++ b/media/libstagefright/omx/tests/OMXHarness.cpp @@ -286,7 +286,7 @@ status_t Harness::testStateTransitions( return OK; } - sp<MemoryDealer> dealer = new MemoryDealer(8 * 1024 * 1024); + sp<MemoryDealer> dealer = new MemoryDealer(8 * 1024 * 1024, "OMXHarness"); IOMX::node_id node; status_t err = |