mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
gralloc4: remove dumpDebugInfo
dumpDebugInfo could be called by anyone. A safer approach is for processes to dump their own buffers via IMapper's dumpBuffers. Bug: 137966819 Test: Compiles Change-Id: I4c8c7a6415babfb93034ee8674ba0f40cd8c1bb8
This commit is contained in:
@@ -19,14 +19,6 @@ package android.hardware.graphics.allocator@4.0;
|
||||
import android.hardware.graphics.mapper@4.0;
|
||||
|
||||
interface IAllocator {
|
||||
/**
|
||||
* Retrieves implementation-defined debug information, which will be
|
||||
* displayed during, for example, `dumpsys SurfaceFlinger`.
|
||||
*
|
||||
* @return debugInfo is a string of debug information.
|
||||
*/
|
||||
dumpDebugInfo() generates (string debugInfo);
|
||||
|
||||
/**
|
||||
* Allocates buffers with the properties specified by the descriptor.
|
||||
*
|
||||
|
||||
@@ -71,13 +71,6 @@ sp<IAllocator> Gralloc::getAllocator() const {
|
||||
return mAllocator;
|
||||
}
|
||||
|
||||
std::string Gralloc::dumpDebugInfo() {
|
||||
std::string debugInfo;
|
||||
mAllocator->dumpDebugInfo([&](const auto& tmpDebugInfo) { debugInfo = tmpDebugInfo.c_str(); });
|
||||
|
||||
return debugInfo;
|
||||
}
|
||||
|
||||
const native_handle_t* Gralloc::cloneBuffer(const hidl_handle& rawHandle) {
|
||||
const native_handle_t* bufferHandle = native_handle_clone(rawHandle.getNativeHandle());
|
||||
EXPECT_NE(nullptr, bufferHandle);
|
||||
|
||||
@@ -45,8 +45,6 @@ class Gralloc {
|
||||
|
||||
sp<IAllocator> getAllocator() const;
|
||||
|
||||
std::string dumpDebugInfo();
|
||||
|
||||
// When import is false, this simply calls IAllocator::allocate. When import
|
||||
// is true, the returned buffers are also imported into the mapper.
|
||||
//
|
||||
|
||||
@@ -305,13 +305,6 @@ const std::set<StandardMetadataType> GraphicsMapperHidlTest::sRequiredMetadataTy
|
||||
StandardMetadataType::BLEND_MODE,
|
||||
};
|
||||
|
||||
/**
|
||||
* Test IAllocator::dumpDebugInfo by calling it.
|
||||
*/
|
||||
TEST_P(GraphicsMapperHidlTest, AllocatorDumpDebugInfo) {
|
||||
mGralloc->dumpDebugInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test IAllocator::allocate with valid buffer descriptors.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user