add more tracing for buffer allocation
Change-Id: I8408850d0625985992ef2e2cd0c9f300b1fca293
This commit is contained in:
parent
8c50c87015
commit
cf56319d4d
@ -16,11 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_TAG "GraphicBufferAllocator"
|
#define LOG_TAG "GraphicBufferAllocator"
|
||||||
|
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
|
||||||
|
|
||||||
#include <cutils/log.h>
|
#include <cutils/log.h>
|
||||||
|
|
||||||
#include <utils/Singleton.h>
|
#include <utils/Singleton.h>
|
||||||
#include <utils/String8.h>
|
#include <utils/String8.h>
|
||||||
|
#include <utils/Trace.h>
|
||||||
|
|
||||||
#include <ui/GraphicBufferAllocator.h>
|
#include <ui/GraphicBufferAllocator.h>
|
||||||
|
|
||||||
@ -91,6 +93,7 @@ void GraphicBufferAllocator::dumpToSystemLog()
|
|||||||
status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat format,
|
status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat format,
|
||||||
int usage, buffer_handle_t* handle, int32_t* stride)
|
int usage, buffer_handle_t* handle, int32_t* stride)
|
||||||
{
|
{
|
||||||
|
ATRACE_CALL();
|
||||||
// make sure to not allocate a N x 0 or 0 x N buffer, since this is
|
// make sure to not allocate a N x 0 or 0 x N buffer, since this is
|
||||||
// allowed from an API stand-point allocate a 1x1 buffer instead.
|
// allowed from an API stand-point allocate a 1x1 buffer instead.
|
||||||
if (!w || !h)
|
if (!w || !h)
|
||||||
@ -128,6 +131,7 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat forma
|
|||||||
|
|
||||||
status_t GraphicBufferAllocator::free(buffer_handle_t handle)
|
status_t GraphicBufferAllocator::free(buffer_handle_t handle)
|
||||||
{
|
{
|
||||||
|
ATRACE_CALL();
|
||||||
status_t err;
|
status_t err;
|
||||||
|
|
||||||
err = mAllocDev->free(mAllocDev, handle);
|
err = mAllocDev->free(mAllocDev, handle);
|
||||||
|
@ -15,12 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_TAG "GraphicBufferMapper"
|
#define LOG_TAG "GraphicBufferMapper"
|
||||||
|
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <utils/Errors.h>
|
#include <utils/Errors.h>
|
||||||
#include <utils/Log.h>
|
#include <utils/Log.h>
|
||||||
|
#include <utils/Trace.h>
|
||||||
|
|
||||||
#include <ui/GraphicBufferMapper.h>
|
#include <ui/GraphicBufferMapper.h>
|
||||||
#include <ui/Rect.h>
|
#include <ui/Rect.h>
|
||||||
@ -46,6 +48,7 @@ GraphicBufferMapper::GraphicBufferMapper()
|
|||||||
|
|
||||||
status_t GraphicBufferMapper::registerBuffer(buffer_handle_t handle)
|
status_t GraphicBufferMapper::registerBuffer(buffer_handle_t handle)
|
||||||
{
|
{
|
||||||
|
ATRACE_CALL();
|
||||||
status_t err;
|
status_t err;
|
||||||
|
|
||||||
err = mAllocMod->registerBuffer(mAllocMod, handle);
|
err = mAllocMod->registerBuffer(mAllocMod, handle);
|
||||||
@ -57,6 +60,7 @@ status_t GraphicBufferMapper::registerBuffer(buffer_handle_t handle)
|
|||||||
|
|
||||||
status_t GraphicBufferMapper::unregisterBuffer(buffer_handle_t handle)
|
status_t GraphicBufferMapper::unregisterBuffer(buffer_handle_t handle)
|
||||||
{
|
{
|
||||||
|
ATRACE_CALL();
|
||||||
status_t err;
|
status_t err;
|
||||||
|
|
||||||
err = mAllocMod->unregisterBuffer(mAllocMod, handle);
|
err = mAllocMod->unregisterBuffer(mAllocMod, handle);
|
||||||
@ -69,6 +73,7 @@ status_t GraphicBufferMapper::unregisterBuffer(buffer_handle_t handle)
|
|||||||
status_t GraphicBufferMapper::lock(buffer_handle_t handle,
|
status_t GraphicBufferMapper::lock(buffer_handle_t handle,
|
||||||
int usage, const Rect& bounds, void** vaddr)
|
int usage, const Rect& bounds, void** vaddr)
|
||||||
{
|
{
|
||||||
|
ATRACE_CALL();
|
||||||
status_t err;
|
status_t err;
|
||||||
|
|
||||||
err = mAllocMod->lock(mAllocMod, handle, usage,
|
err = mAllocMod->lock(mAllocMod, handle, usage,
|
||||||
@ -81,6 +86,7 @@ status_t GraphicBufferMapper::lock(buffer_handle_t handle,
|
|||||||
|
|
||||||
status_t GraphicBufferMapper::unlock(buffer_handle_t handle)
|
status_t GraphicBufferMapper::unlock(buffer_handle_t handle)
|
||||||
{
|
{
|
||||||
|
ATRACE_CALL();
|
||||||
status_t err;
|
status_t err;
|
||||||
|
|
||||||
err = mAllocMod->unlock(mAllocMod, handle);
|
err = mAllocMod->unlock(mAllocMod, handle);
|
||||||
|
Loading…
Reference in New Issue
Block a user