From e6124d98b11b783cd5e742bd6209130b94fe6054 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Mon, 16 Nov 2020 02:52:51 +0000 Subject: Gralloc4: fix a log message typo Test: build Change-Id: I9fb0653f0dff04f27111117d2fb01dffc8473ebe --- libs/ui/Gralloc4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/ui/Gralloc4.cpp') diff --git a/libs/ui/Gralloc4.cpp b/libs/ui/Gralloc4.cpp index f799ce4cb0..636fbde8d7 100644 --- a/libs/ui/Gralloc4.cpp +++ b/libs/ui/Gralloc4.cpp @@ -1052,7 +1052,7 @@ std::string Gralloc4Mapper::dumpBuffers(bool less) const { Gralloc4Allocator::Gralloc4Allocator(const Gralloc4Mapper& mapper) : mMapper(mapper) { mAllocator = IAllocator::getService(); if (mAllocator == nullptr) { - ALOGW("allocator 3.x is not supported"); + ALOGW("allocator 4.x is not supported"); return; } } -- cgit v1.2.3-59-g8ed1b From ba40db5aa7906a22c0c8d74d196be186286c5a60 Mon Sep 17 00:00:00 2001 From: Yichi Chen Date: Fri, 30 Apr 2021 00:18:32 +0800 Subject: libui: Add dataspace info into Gralloc4Mapper::bufferDumpHelper Dataspace info is important to trace color transform artifacts. The patch adds the info to make the tracing easier Bug: 186738374 Test: dumpsys SurfaceFlinger Change-Id: I1371c83ad1f86c8bbdbb5ad0a931dff3b0fc1985 --- libs/ui/Gralloc4.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libs/ui/Gralloc4.cpp') diff --git a/libs/ui/Gralloc4.cpp b/libs/ui/Gralloc4.cpp index 636fbde8d7..9dc9beb8e7 100644 --- a/libs/ui/Gralloc4.cpp +++ b/libs/ui/Gralloc4.cpp @@ -36,6 +36,7 @@ using android::hardware::graphics::common::V1_2::BufferUsage; using android::hardware::graphics::mapper::V4_0::BufferDescriptor; using android::hardware::graphics::mapper::V4_0::Error; using android::hardware::graphics::mapper::V4_0::IMapper; +using AidlDataspace = ::aidl::android::hardware::graphics::common::Dataspace; using BufferDump = android::hardware::graphics::mapper::V4_0::IMapper::BufferDump; using MetadataDump = android::hardware::graphics::mapper::V4_0::IMapper::MetadataDump; using MetadataType = android::hardware::graphics::mapper::V4_0::IMapper::MetadataType; @@ -597,7 +598,7 @@ status_t Gralloc4Mapper::getDataspace(buffer_handle_t bufferHandle, if (!outDataspace) { return BAD_VALUE; } - aidl::android::hardware::graphics::common::Dataspace dataspace; + AidlDataspace dataspace; status_t error = get(bufferHandle, gralloc4::MetadataType_Dataspace, gralloc4::decodeDataspace, &dataspace); if (error) { @@ -841,6 +842,7 @@ status_t Gralloc4Mapper::bufferDumpHelper(const BufferDump& bufferDump, std::ost uint32_t pixelFormatFourCC; uint64_t pixelFormatModifier; uint64_t usage; + AidlDataspace dataspace; uint64_t allocationSize; uint64_t protectedContent; ExtendableType compression; @@ -892,6 +894,11 @@ status_t Gralloc4Mapper::bufferDumpHelper(const BufferDump& bufferDump, std::ost if (error != NO_ERROR) { return error; } + error = metadataDumpHelper(bufferDump, StandardMetadataType::DATASPACE, + gralloc4::decodeDataspace, &dataspace); + if (error != NO_ERROR) { + return error; + } error = metadataDumpHelper(bufferDump, StandardMetadataType::ALLOCATION_SIZE, gralloc4::decodeAllocationSize, &allocationSize); if (error != NO_ERROR) { @@ -932,6 +939,7 @@ status_t Gralloc4Mapper::bufferDumpHelper(const BufferDump& bufferDump, std::ost << "KiB, w/h:" << width << "x" << height << ", usage: 0x" << std::hex << usage << std::dec << ", req fmt:" << static_cast(pixelFormatRequested) << ", fourcc/mod:" << pixelFormatFourCC << "/" << pixelFormatModifier + << ", dataspace: 0x" << std::hex << static_cast(dataspace) << ", compressed: "; if (less) { -- cgit v1.2.3-59-g8ed1b