Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a2ecb42 authored by Marissa Wall's avatar Marissa Wall
Browse files

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
parent 2a34cdb7
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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.
     *
+0 −7
Original line number Diff line number Diff line
@@ -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);
+0 −2
Original line number Diff line number Diff line
@@ -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.
    //
+0 −7
Original line number Diff line number Diff line
@@ -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.
 */