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

Commit 6a3c05bc authored by Mathias Agopian's avatar Mathias Agopian
Browse files

fix circular dependency libnativewindow <-> libui

Bug: 37647680
Bug: 37648355
Test: compile, manual
Change-Id: I9631beea52e23ebb519411f943c6f5062aedd2e5
parent 37c27efd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
#include <utils/Mutex.h>
#include <utils/RefBase.h>

struct ANativeWindow_Buffer;
#include <system/window.h>

namespace android {

+1 −2
Original line number Diff line number Diff line
@@ -15,11 +15,10 @@
 */

#ifndef HDCP_API_H_

#define HDCP_API_H_

#include <utils/Errors.h>
#include <system/window.h>
#include <cutils/native_handle.h>

namespace android {

+3 −1
Original line number Diff line number Diff line
@@ -20,13 +20,15 @@

#include <media/hardware/OMXPluginBase.h>
#include <media/hardware/MetadataBufferType.h>
#include <system/window.h>
#include <cutils/native_handle.h>
#include <utils/RefBase.h>

#include "VideoAPI.h"

#include <OMX_Component.h>

struct ANativeWindowBuffer;

namespace android {

// This structure is used to enable Android native buffer use for either
+8 −25
Original line number Diff line number Diff line
@@ -19,26 +19,8 @@

#include <sys/types.h>

#include <system/window.h>
#include <nativebase/nativebase.h>

// ---------------------------------------------------------------------------

/* FIXME: this is legacy for pixmaps */
typedef struct egl_native_pixmap_t
{
    int32_t     version;    /* must be 32 */
    int32_t     width;
    int32_t     height;
    int32_t     stride;
    uint8_t*    data;
    uint8_t     format;
    uint8_t     rfu[3];
    union {
        uint32_t    compressedFormat;
        int32_t     vstride;
    };
    int32_t     reserved;
} egl_native_pixmap_t;

/*****************************************************************************/

@@ -52,7 +34,8 @@ namespace android {
 * This helper class turns a ANativeXXX object type into a C++
 * reference-counted object; with proper type conversions.
 */
template <typename NATIVE_TYPE, typename TYPE, typename REF>
template <typename NATIVE_TYPE, typename TYPE, typename REF,
        typename NATIVE_BASE = android_native_base_t>
class ANativeObjectBase : public NATIVE_TYPE, public REF
{
public:
@@ -65,7 +48,7 @@ public:
    }

protected:
    typedef ANativeObjectBase<NATIVE_TYPE, TYPE, REF> BASE;
    typedef ANativeObjectBase<NATIVE_TYPE, TYPE, REF, NATIVE_BASE> BASE;
    ANativeObjectBase() : NATIVE_TYPE(), REF() {
        NATIVE_TYPE::common.incRef = incRef;
        NATIVE_TYPE::common.decRef = decRef;
@@ -76,17 +59,17 @@ protected:
    static inline TYPE const* getSelf(NATIVE_TYPE const* self) {
        return static_cast<TYPE const *>(self);
    }
    static inline TYPE* getSelf(android_native_base_t* base) {
    static inline TYPE* getSelf(NATIVE_BASE* base) {
        return getSelf(reinterpret_cast<NATIVE_TYPE*>(base));
    }
    static inline TYPE const * getSelf(android_native_base_t const* base) {
    static inline TYPE const * getSelf(NATIVE_BASE const* base) {
        return getSelf(reinterpret_cast<NATIVE_TYPE const*>(base));
    }
    static void incRef(android_native_base_t* base) {
    static void incRef(NATIVE_BASE* base) {
        ANativeObjectBase* self = getSelf(base);
        self->incStrong(self);
    }
    static void decRef(android_native_base_t* base) {
    static void decRef(NATIVE_BASE* base) {
        ANativeObjectBase* self = getSelf(base);
        self->decStrong(self);
    }
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@

#include <android/hardware/graphics/allocator/2.0/IAllocator.h>
#include <android/hardware/graphics/mapper/2.0/IMapper.h>
#include <system/window.h>
#include <utils/StrongPointer.h>

namespace android {
Loading