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

Commit 08a27389 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "cleanup libui’s includes"

parents a61f4ff8 fe2f54fc
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -18,9 +18,7 @@
#define ANDROID_ANDROID_NATIVES_H

#include <sys/types.h>
#include <string.h>

#include <hardware/gralloc.h>
#include <system/window.h>

// ---------------------------------------------------------------------------
+1 −2
Original line number Diff line number Diff line
@@ -19,9 +19,8 @@

#include <stdint.h>
#include <sys/types.h>
#include <utils/Timers.h>

#include <ui/PixelFormat.h>
#include <utils/Timers.h>

namespace android {

+42 −3
Original line number Diff line number Diff line
@@ -19,10 +19,17 @@

#define GRALLOC1_LOG_TAG "Gralloc1"

#include <ui/Gralloc1On0Adapter.h>

#include <functional>
#include <memory>
#include <unordered_set>

#include <log/log.h>

#include <ui/Fence.h>

#include <hardware/gralloc1.h>


namespace std {
    template <>
    struct hash<gralloc1_capability_t> {
@@ -33,10 +40,42 @@ namespace std {
}

namespace android {

class GraphicBuffer;
class Fence;
class GraphicBuffer;
class Gralloc1On0Adapter;
} // namespace android


// This is not an "official" capability (i.e., it is not found in gralloc1.h),
// but we will use it to detect that we are running through the adapter, which
// is capable of collaborating with GraphicBuffer such that queries on a
// buffer_handle_t succeed
static const auto GRALLOC1_CAPABILITY_ON_ADAPTER =
        static_cast<gralloc1_capability_t>(GRALLOC1_LAST_CAPABILITY + 1);

static const auto GRALLOC1_FUNCTION_RETAIN_GRAPHIC_BUFFER =
        static_cast<gralloc1_function_descriptor_t>(GRALLOC1_LAST_FUNCTION + 1);
static const auto GRALLOC1_FUNCTION_ALLOCATE_WITH_ID =
        static_cast<gralloc1_function_descriptor_t>(GRALLOC1_LAST_FUNCTION + 2);
static const auto GRALLOC1_FUNCTION_LOCK_YCBCR =
        static_cast<gralloc1_function_descriptor_t>(GRALLOC1_LAST_FUNCTION + 3);
static const auto GRALLOC1_LAST_ADAPTER_FUNCTION = GRALLOC1_FUNCTION_LOCK_YCBCR;

typedef gralloc1_error_t (*GRALLOC1_PFN_RETAIN_GRAPHIC_BUFFER)(
        gralloc1_device_t* device, const android::GraphicBuffer* buffer);
typedef gralloc1_error_t (*GRALLOC1_PFN_ALLOCATE_WITH_ID)(
        gralloc1_device_t* device, gralloc1_buffer_descriptor_t descriptor,
        gralloc1_backing_store_t id, buffer_handle_t* outBuffer);
typedef int32_t /*gralloc1_error_t*/ (*GRALLOC1_PFN_LOCK_YCBCR)(
        gralloc1_device_t* device, buffer_handle_t buffer,
        uint64_t /*gralloc1_producer_usage_t*/ producerUsage,
        uint64_t /*gralloc1_consumer_usage_t*/ consumerUsage,
        const gralloc1_rect_t* accessRegion, struct android_ycbcr* outYCbCr,
        int32_t acquireFence);


namespace android {
namespace Gralloc1 {

class Device;
+0 −27
Original line number Diff line number Diff line
@@ -35,33 +35,6 @@ class GraphicBuffer;

struct gralloc_module_t;

// This is not an "official" capability (i.e., it is not found in gralloc1.h),
// but we will use it to detect that we are running through the adapter, which
// is capable of collaborating with GraphicBuffer such that queries on a
// buffer_handle_t succeed
static const auto GRALLOC1_CAPABILITY_ON_ADAPTER =
        static_cast<gralloc1_capability_t>(GRALLOC1_LAST_CAPABILITY + 1);

static const auto GRALLOC1_FUNCTION_RETAIN_GRAPHIC_BUFFER =
        static_cast<gralloc1_function_descriptor_t>(GRALLOC1_LAST_FUNCTION + 1);
static const auto GRALLOC1_FUNCTION_ALLOCATE_WITH_ID =
        static_cast<gralloc1_function_descriptor_t>(GRALLOC1_LAST_FUNCTION + 2);
static const auto GRALLOC1_FUNCTION_LOCK_YCBCR =
        static_cast<gralloc1_function_descriptor_t>(GRALLOC1_LAST_FUNCTION + 3);
static const auto GRALLOC1_LAST_ADAPTER_FUNCTION = GRALLOC1_FUNCTION_LOCK_YCBCR;

typedef gralloc1_error_t (*GRALLOC1_PFN_RETAIN_GRAPHIC_BUFFER)(
        gralloc1_device_t* device, const android::GraphicBuffer* buffer);
typedef gralloc1_error_t (*GRALLOC1_PFN_ALLOCATE_WITH_ID)(
        gralloc1_device_t* device, gralloc1_buffer_descriptor_t descriptor,
        gralloc1_backing_store_t id, buffer_handle_t* outBuffer);
typedef int32_t /*gralloc1_error_t*/ (*GRALLOC1_PFN_LOCK_YCBCR)(
        gralloc1_device_t* device, buffer_handle_t buffer,
        uint64_t /*gralloc1_producer_usage_t*/ producerUsage,
        uint64_t /*gralloc1_consumer_usage_t*/ consumerUsage,
        const gralloc1_rect_t* accessRegion, struct android_ycbcr* outYCbCr,
        int32_t acquireFence);

namespace android {

class Gralloc1On0Adapter : public gralloc1_device_t
+0 −2
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@
#ifndef ANDROID_UI_GRALLOC_MAPPER_H
#define ANDROID_UI_GRALLOC_MAPPER_H

#include <memory>

#include <android/hardware/graphics/mapper/2.0/IMapper.h>
#include <system/window.h>

Loading