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

Commit ae880e49 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh Committed by Android (Google) Code Review
Browse files

Merge "Revert "camera: Map between legacy gralloc0 usage, and HIDL gralloc1 usages"" into oc-dev

parents 90b4baef c25c54f4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.hardware.camera.device@1.0;

import android.hardware.camera.common@1.0::types;
import android.hardware.graphics.allocator@2.0::types;
import android.hardware.graphics.common@1.0::types;

/**
@@ -88,7 +89,7 @@ interface ICameraDevicePreviewCallback {
     *
     * @return Status The status code for this operation.
     */
    setUsage(ProducerUsageFlags usage) generates (Status status);
    setUsage(ProducerUsage usage) generates (Status status);

    /**
     * Set the expected buffering mode for the preview output.
+2 −2
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ cc_library_shared {
        "libcamera_metadata",
    ],
    static_libs: [
        "android.hardware.camera.common@1.0-helper",
        "libgrallocusage"
        "android.hardware.camera.common@1.0-helper"
    ],
    export_include_dirs: ["."]
}
+2 −6
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@
#include <hidlmemory/mapping.h>
#include <utils/Trace.h>

#include <grallocusage/GrallocUsageConversion.h>

#include "CameraDevice_1_0.h"

namespace android {
@@ -32,6 +30,7 @@ namespace device {
namespace V1_0 {
namespace implementation {

using ::android::hardware::graphics::allocator::V2_0::ProducerUsage;
using ::android::hardware::graphics::common::V1_0::PixelFormat;

HandleImporter& CameraDevice::sHandleImporter = HandleImporter::getInstance();
@@ -260,10 +259,7 @@ int CameraDevice::sSetUsage(struct preview_stream_ops* w, int usage) {
    }

    object->cleanUpCirculatingBuffers();
    ProducerUsageFlags producerUsage;
    uint64_t consumerUsage;
    ::android_convertGralloc0To1Usage(usage, &producerUsage, &consumerUsage);
    return getStatusT(object->mPreviewCallback->setUsage(producerUsage));
    return getStatusT(object->mPreviewCallback->setUsage((ProducerUsage) usage));
}

int CameraDevice::sSetSwapInterval(struct preview_stream_ops *w, int interval) {
+0 −4
Original line number Diff line number Diff line
@@ -16,10 +16,6 @@

package android.hardware.camera.device@1.0;

import android.hardware.graphics.allocator@2.0::types;

typedef bitfield<ProducerUsage> ProducerUsageFlags;

enum CameraFacing : uint32_t {
    /** The facing of the camera is opposite to that of the screen. */
    BACK = 0,
+1 −2
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@ cc_library_shared {
        "libcamera_metadata"
    ],
    static_libs: [
        "android.hardware.camera.common@1.0-helper",
        "libgrallocusage"
        "android.hardware.camera.common@1.0-helper"
    ],
    export_include_dirs: ["."]
}
Loading