Merge "graphics: remove duplicated types"
This commit is contained in:
commit
0b855f81c8
9 changed files with 16 additions and 204 deletions
|
@ -43,11 +43,13 @@ cc_library_shared {
|
|||
"libhwbinder",
|
||||
"libutils",
|
||||
"libcutils",
|
||||
"android.hardware.graphics.common@1.0",
|
||||
],
|
||||
export_shared_lib_headers: [
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"libhwbinder",
|
||||
"libutils",
|
||||
"android.hardware.graphics.common@1.0",
|
||||
],
|
||||
}
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
# This file is autogenerated by hidl-gen. Do not edit manually.
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
################################################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := android.hardware.graphics.allocator@2.0-java-constants
|
||||
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
|
||||
|
||||
intermediates := $(local-generated-sources-dir)
|
||||
|
||||
HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/graphics/allocator/2.0/Constants.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/IAllocator.hal
|
||||
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava-constants -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.graphics.allocator@2.0
|
||||
|
||||
$(GEN):
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
# Avoid dependency cycle of framework.jar -> this-library -> framework.jar
|
||||
LOCAL_NO_STANDARD_LIBRARIES := true
|
||||
LOCAL_JAVA_LIBRARIES := core-oj
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
|
||||
|
||||
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
package android.hardware.graphics.allocator@2.0;
|
||||
|
||||
import android.hardware.graphics.common@1.0::PixelFormat;
|
||||
|
||||
interface IAllocator {
|
||||
enum Capability : int32_t {
|
||||
/* reserved */
|
||||
|
|
|
@ -136,36 +136,5 @@ enum ConsumerUsage : uint64_t {
|
|||
/* bits 48-63 are reserved for vendor extensions */
|
||||
};
|
||||
|
||||
/*
|
||||
* Copied from android_pixel_format_t.
|
||||
*
|
||||
* TODO(olv) copy comments as well and have android_pixel_format_t generated
|
||||
*/
|
||||
@export(name="android_pixel_format", value_prefix="HAL_PIXEL_FORMAT_")
|
||||
enum PixelFormat : int32_t {
|
||||
RGBA_8888 = 1,
|
||||
RGBX_8888 = 2,
|
||||
RGB_888 = 3,
|
||||
RGB_565 = 4,
|
||||
BGRA_8888 = 5,
|
||||
YV12 = 0x32315659,
|
||||
Y8 = 0x20203859,
|
||||
Y16 = 0x20363159,
|
||||
RAW16 = 0x20,
|
||||
RAW10 = 0x25,
|
||||
RAW12 = 0x26,
|
||||
RAW_OPAQUE = 0x24,
|
||||
BLOB = 0x21,
|
||||
IMPLEMENTATION_DEFINED = 0x22,
|
||||
YCbCr_420_888 = 0x23,
|
||||
YCbCr_422_888 = 0x27,
|
||||
YCbCr_444_888 = 0x28,
|
||||
FLEX_RGB_888 = 0x29,
|
||||
FLEX_RGBA_8888 = 0x2A,
|
||||
YCbCr_422_SP = 0x10,
|
||||
YCrCb_420_SP = 0x11,
|
||||
YCbCr_422_I = 0x14,
|
||||
};
|
||||
|
||||
typedef uint64_t BufferDescriptor;
|
||||
typedef uint64_t Buffer;
|
||||
|
|
|
@ -51,13 +51,13 @@ cc_library_shared {
|
|||
"libhwbinder",
|
||||
"libutils",
|
||||
"libcutils",
|
||||
"android.hardware.graphics.allocator@2.0",
|
||||
"android.hardware.graphics.common@1.0",
|
||||
],
|
||||
export_shared_lib_headers: [
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"libhwbinder",
|
||||
"libutils",
|
||||
"android.hardware.graphics.allocator@2.0",
|
||||
"android.hardware.graphics.common@1.0",
|
||||
],
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package android.hardware.graphics.composer@2.1;
|
||||
|
||||
import android.hardware.graphics.allocator@2.0::PixelFormat;
|
||||
import android.hardware.graphics.common@1.0;
|
||||
import IComposerCallback;
|
||||
|
||||
interface IComposer {
|
||||
|
@ -845,7 +845,7 @@ interface IComposer {
|
|||
*/
|
||||
|
||||
/*
|
||||
* Asynchonously sets the position of a cursor layer.
|
||||
* Asynchronously sets the position of a cursor layer.
|
||||
*
|
||||
* Prior to validateDisplay, a layer may be marked as Composition::CURSOR.
|
||||
* If validation succeeds (i.e., the device does not request a composition
|
||||
|
|
|
@ -37,7 +37,12 @@ namespace composer {
|
|||
namespace V2_1 {
|
||||
namespace implementation {
|
||||
|
||||
using android::hardware::graphics::allocator::V2_0::PixelFormat;
|
||||
using android::hardware::graphics::common::V1_0::PixelFormat;
|
||||
using android::hardware::graphics::common::V1_0::Transform;
|
||||
using android::hardware::graphics::common::V1_0::Dataspace;
|
||||
using android::hardware::graphics::common::V1_0::ColorMode;
|
||||
using android::hardware::graphics::common::V1_0::ColorTransform;
|
||||
using android::hardware::graphics::common::V1_0::Hdr;
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -32,132 +32,3 @@ enum Error : int32_t {
|
|||
typedef uint32_t Config;
|
||||
typedef uint64_t Display;
|
||||
typedef uint64_t Layer;
|
||||
|
||||
/*
|
||||
* Copied from android_transform_t
|
||||
*
|
||||
* TODO(olv) copy comments over and generate android_transform_t
|
||||
*/
|
||||
enum Transform : int32_t {
|
||||
FLIP_H = 0x1,
|
||||
FLIP_V = 0x2,
|
||||
ROT_90 = 0x4,
|
||||
ROT_180 = 0x3,
|
||||
ROT_270 = 0x7,
|
||||
RESERVED = 0x8,
|
||||
};
|
||||
|
||||
/*
|
||||
* Copied from android_color_mode_t
|
||||
*
|
||||
* TODO(olv) copy comments over and generate android_color_mode_t
|
||||
*/
|
||||
enum ColorMode : int32_t {
|
||||
NATIVE = 0,
|
||||
STANDARD_BT601_625 = 1,
|
||||
STANDARD_BT601_625_UNADJUSTED = 2,
|
||||
STANDARD_BT601_525 = 3,
|
||||
STANDARD_BT601_525_UNADJUSTED = 4,
|
||||
STANDARD_BT709 = 5,
|
||||
DCI_P3 = 6,
|
||||
SRGB = 7,
|
||||
ADOBE_RGB = 8,
|
||||
};
|
||||
|
||||
/*
|
||||
* Copied from android_color_transform_t
|
||||
*
|
||||
* TODO(olv) copy comments over and generate android_color_transform_t
|
||||
*/
|
||||
enum ColorTransform : int32_t {
|
||||
IDENTITY = 0,
|
||||
ARBITRARY_MATRIX = 1,
|
||||
VALUE_INVERSE = 2,
|
||||
GRAYSCALE = 3,
|
||||
CORRECT_PROTANOPIA = 4,
|
||||
CORRECT_DEUTERANOPIA = 5,
|
||||
CORRECT_TRITANOPIA = 6
|
||||
};
|
||||
|
||||
/*
|
||||
* Copied from android_dataspace_t
|
||||
*
|
||||
* TODO(olv) copy comments over and generate android_dataspace_t
|
||||
*/
|
||||
enum Dataspace : int32_t {
|
||||
UNKNOWN = 0x0,
|
||||
ARBITRARY = 0x1,
|
||||
|
||||
STANDARD_SHIFT = 16,
|
||||
STANDARD_MASK = 63 << STANDARD_SHIFT,
|
||||
STANDARD_UNSPECIFIED = 0 << STANDARD_SHIFT,
|
||||
STANDARD_BT709 = 1 << STANDARD_SHIFT,
|
||||
STANDARD_BT601_625 = 2 << STANDARD_SHIFT,
|
||||
STANDARD_BT601_625_UNADJUSTED = 3 << STANDARD_SHIFT,
|
||||
STANDARD_BT601_525 = 4 << STANDARD_SHIFT,
|
||||
STANDARD_BT601_525_UNADJUSTED = 5 << STANDARD_SHIFT,
|
||||
STANDARD_BT2020 = 6 << STANDARD_SHIFT,
|
||||
STANDARD_BT2020_CONSTANT_LUMINANCE = 7 << STANDARD_SHIFT,
|
||||
STANDARD_BT470M = 8 << STANDARD_SHIFT,
|
||||
STANDARD_FILM = 9 << STANDARD_SHIFT,
|
||||
|
||||
TRANSFER_SHIFT = 22,
|
||||
TRANSFER_MASK = 31 << TRANSFER_SHIFT,
|
||||
TRANSFER_UNSPECIFIED = 0 << TRANSFER_SHIFT,
|
||||
TRANSFER_LINEAR = 1 << TRANSFER_SHIFT,
|
||||
TRANSFER_SRGB = 2 << TRANSFER_SHIFT,
|
||||
TRANSFER_SMPTE_170M = 3 << TRANSFER_SHIFT,
|
||||
TRANSFER_GAMMA2_2 = 4 << TRANSFER_SHIFT,
|
||||
TRANSFER_GAMMA2_8 = 5 << TRANSFER_SHIFT,
|
||||
TRANSFER_ST2084 = 6 << TRANSFER_SHIFT,
|
||||
TRANSFER_HLG = 7 << TRANSFER_SHIFT,
|
||||
|
||||
RANGE_SHIFT = 27,
|
||||
RANGE_MASK = 7 << RANGE_SHIFT,
|
||||
RANGE_UNSPECIFIED = 0 << RANGE_SHIFT,
|
||||
RANGE_FULL = 1 << RANGE_SHIFT,
|
||||
RANGE_LIMITED = 2 << RANGE_SHIFT,
|
||||
|
||||
SRGB_LINEAR = 0x200,
|
||||
V0_SRGB_LINEAR = STANDARD_BT709 |
|
||||
TRANSFER_LINEAR |
|
||||
RANGE_FULL,
|
||||
|
||||
SRGB = 0x201,
|
||||
V0_SRGB = STANDARD_BT709 |
|
||||
TRANSFER_SRGB |
|
||||
RANGE_FULL,
|
||||
|
||||
JFIF = 0x101,
|
||||
V0_JFIF = STANDARD_BT601_625 |
|
||||
TRANSFER_SMPTE_170M |
|
||||
RANGE_FULL,
|
||||
|
||||
BT601_625 = 0x102,
|
||||
V0_BT601_625 = STANDARD_BT601_625 |
|
||||
TRANSFER_SMPTE_170M |
|
||||
RANGE_LIMITED,
|
||||
|
||||
BT601_525 = 0x103,
|
||||
V0_BT601_525 = STANDARD_BT601_525 |
|
||||
TRANSFER_SMPTE_170M |
|
||||
RANGE_LIMITED,
|
||||
|
||||
BT709 = 0x104,
|
||||
V0_BT709 = STANDARD_BT709 |
|
||||
TRANSFER_SMPTE_170M |
|
||||
RANGE_LIMITED,
|
||||
|
||||
DEPTH = 0x1000,
|
||||
};
|
||||
|
||||
/*
|
||||
* Copied from android_hdr_t
|
||||
*
|
||||
* TODO(olv) copy comments over and generate android_hdr_t
|
||||
*/
|
||||
enum Hdr : int32_t {
|
||||
DOLBY_VISION = 1,
|
||||
HDR10 = 2,
|
||||
HLG = 3,
|
||||
};
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <type_traits>
|
||||
|
||||
#include <android/hardware/graphics/allocator/2.0/types.h>
|
||||
#include <android/hardware/graphics/common/1.0/types.h>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
|
@ -28,9 +29,9 @@ namespace mapper {
|
|||
namespace V2_0 {
|
||||
|
||||
using android::hardware::graphics::allocator::V2_0::Error;
|
||||
using android::hardware::graphics::allocator::V2_0::PixelFormat;
|
||||
using android::hardware::graphics::allocator::V2_0::ProducerUsage;
|
||||
using android::hardware::graphics::allocator::V2_0::ConsumerUsage;
|
||||
using android::hardware::graphics::common::V1_0::PixelFormat;
|
||||
|
||||
/*
|
||||
* Structures for describing flexible YUVA/RGBA formats for consumption by
|
||||
|
|
Loading…
Reference in a new issue