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

Commit 0e040944 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12565212 from a3cd79a0 to 25Q1-release

Change-Id: I62145e39ec8a3c76725e5ab680bd008e28c9a2a4
parents b9a6b687 a3cd79a0
Loading
Loading
Loading
Loading
+12 −6
Original line number Original line Diff line number Diff line
@@ -203,8 +203,8 @@ impl HardwareBuffer {
        Self(buffer_ptr)
        Self(buffer_ptr)
    }
    }


    /// Creates a new Rust HardwareBuffer to wrap the given AHardwareBuffer without taking ownership
    /// Creates a new Rust HardwareBuffer to wrap the given `AHardwareBuffer` without taking
    /// of it.
    /// ownership of it.
    ///
    ///
    /// Unlike [`from_raw`](Self::from_raw) this method will increment the refcount on the buffer.
    /// Unlike [`from_raw`](Self::from_raw) this method will increment the refcount on the buffer.
    /// This means that the caller can continue to use the raw buffer it passed in, and must call
    /// This means that the caller can continue to use the raw buffer it passed in, and must call
@@ -220,14 +220,20 @@ impl HardwareBuffer {
        Self(buffer)
        Self(buffer)
    }
    }


    /// Get the internal `AHardwareBuffer` pointer that is only valid when this `HardwareBuffer`
    /// Returns the internal `AHardwareBuffer` pointer.
    /// exists. This can be used to provide a pointer to the AHB for a C/C++ API over the FFI.
    ///
    /// This is only valid as long as this `HardwareBuffer` exists, so shouldn't be stored. It can
    /// be used to provide a pointer for a C/C++ API over FFI.
    pub fn as_raw(&self) -> NonNull<AHardwareBuffer> {
    pub fn as_raw(&self) -> NonNull<AHardwareBuffer> {
        self.0
        self.0
    }
    }


    /// Get the internal `AHardwareBuffer` pointer without decrementing the refcount. This can
    /// Gets the internal `AHardwareBuffer` pointer without decrementing the refcount. This can
    /// be used to provide a pointer to the AHB for a C/C++ API over the FFI.
    /// be used for a C/C++ API which takes ownership of the pointer.
    ///
    /// The caller is responsible for releasing the `AHardwareBuffer` pointer by calling
    /// `AHardwareBuffer_release` when it is finished with it, or may convert it back to a Rust
    /// `HardwareBuffer` by calling [`HardwareBuffer::from_raw`].
    pub fn into_raw(self) -> NonNull<AHardwareBuffer> {
    pub fn into_raw(self) -> NonNull<AHardwareBuffer> {
        let buffer = ManuallyDrop::new(self);
        let buffer = ManuallyDrop::new(self);
        buffer.0
        buffer.0
+0 −1
Original line number Original line Diff line number Diff line
@@ -284,7 +284,6 @@ cc_defaults {
    ],
    ],
    static_libs: [
    static_libs: [
        "android.frameworks.displayservice@1.0",
        "android.frameworks.displayservice@1.0",
        "libc++fs",
        "libdisplayservicehidl",
        "libdisplayservicehidl",
        "libserviceutils",
        "libserviceutils",
    ],
    ],
+0 −1
Original line number Original line Diff line number Diff line
@@ -28,7 +28,6 @@ package {
cc_defaults {
cc_defaults {
    name: "surfaceflinger_fuzz_defaults",
    name: "surfaceflinger_fuzz_defaults",
    static_libs: [
    static_libs: [
        "libc++fs",
        "libsurfaceflinger_common",
        "libsurfaceflinger_common",
    ],
    ],
    srcs: [
    srcs: [
+0 −3
Original line number Original line Diff line number Diff line
@@ -35,9 +35,6 @@ cc_test {
        ":libsurfaceflinger_mock_sources",
        ":libsurfaceflinger_mock_sources",
        "TransactionTraceTestSuite.cpp",
        "TransactionTraceTestSuite.cpp",
    ],
    ],
    static_libs: [
        "libc++fs",
    ],
    header_libs: [
    header_libs: [
        "libsurfaceflinger_mocks_headers",
        "libsurfaceflinger_mocks_headers",
    ],
    ],
+0 −1
Original line number Original line Diff line number Diff line
@@ -81,7 +81,6 @@ cc_test {
        "surfaceflinger_defaults",
        "surfaceflinger_defaults",
    ],
    ],
    test_suites: ["device-tests"],
    test_suites: ["device-tests"],
    static_libs: ["libc++fs"],
    header_libs: ["surfaceflinger_tests_common_headers"],
    header_libs: ["surfaceflinger_tests_common_headers"],
    srcs: [
    srcs: [
        ":libsurfaceflinger_backend_mock_sources",
        ":libsurfaceflinger_backend_mock_sources",