msm8996: Disable gralloc dump

am: f9b32af057

Change-Id: I9d2a44262e0d569ff24f6c99a517c5f24d91c827
This commit is contained in:
Naseer Ahmed 2017-08-30 02:58:32 +00:00 committed by android-build-merger
commit dab8039b21
1 changed files with 3 additions and 15 deletions

View File

@ -174,25 +174,13 @@ gralloc1_function_pointer_t GrallocImpl::GetFunction(gralloc1_device_t *device,
}
gralloc1_error_t GrallocImpl::Dump(gralloc1_device_t *device, uint32_t *out_size,
char *out_buffer) {
char *out_buffer __unused) {
if (!device) {
ALOGE("Gralloc Error : device=%p", (void *)device);
return GRALLOC1_ERROR_BAD_DESCRIPTOR;
}
const size_t max_dump_size = 8192;
if (out_buffer == nullptr) {
*out_size = max_dump_size;
} else {
std::ostringstream os;
os << "-------------------------------" << std::endl;
os << "QTI gralloc dump:" << std::endl;
os << "-------------------------------" << std::endl;
GrallocImpl const *dev = GRALLOC_IMPL(device);
dev->buf_mgr_->Dump(&os);
os << "-------------------------------" << std::endl;
auto copied = os.str().copy(out_buffer, std::min(os.str().size(), max_dump_size), 0);
*out_size = UINT(copied);
}
// nothing to dump
*out_size = 0;
return GRALLOC1_ERROR_NONE;
}