Home | History | Annotate | Download | only in dvr
      1 #ifndef ANDROID_DVR_DISPLAY_TYPES_H_
      2 #define ANDROID_DVR_DISPLAY_TYPES_H_
      3 
      4 #include <sys/cdefs.h>
      5 
      6 __BEGIN_DECLS
      7 
      8 // Define types used in pose buffer fields. These types have atomicity
      9 // guarantees that are useful in lock-free shared memory ring buffers.
     10 #ifdef __ARM_NEON
     11 #include <arm_neon.h>
     12 #else
     13 #ifndef __FLOAT32X4T_86
     14 #define __FLOAT32X4T_86
     15 typedef float float32x4_t __attribute__((__vector_size__(16)));
     16 typedef struct float32x4x4_t { float32x4_t val[4]; };
     17 #endif
     18 #endif
     19 
     20 // VrFlinger display manager surface state snapshots per surface flags
     21 // indicating what changed since the last snapshot.
     22 enum {
     23   // No changes.
     24   DVR_SURFACE_UPDATE_FLAGS_NONE = 0,
     25   // This surface is new.
     26   DVR_SURFACE_UPDATE_FLAGS_NEW_SURFACE = (1 << 0),
     27   // Buffer queues added/removed.
     28   DVR_SURFACE_UPDATE_FLAGS_BUFFERS_CHANGED = (1 << 1),
     29   // Visibility/z-order changed.
     30   DVR_SURFACE_UPDATE_FLAGS_VISIBILITY_CHANGED = (1 << 2),
     31   // Generic attributes changed.
     32   DVR_SURFACE_UPDATE_FLAGS_ATTRIBUTES_CHANGED = (1 << 3),
     33 };
     34 
     35 // Surface attribute keys. VrFlinger defines keys in the negative integer space.
     36 // The compositor is free to use keys in the positive integer space for
     37 // implementation-defined purposes.
     38 enum {
     39   // DIRECT: bool
     40   // Determines whether a direct surface is created (compositor output) or an
     41   // application surface. Defaults to false (application surface). May only be
     42   // set to true by a process with either UID=root or UID validated with
     43   // IsTrustedUid() (VrCore).
     44   DVR_SURFACE_ATTRIBUTE_DIRECT = -3,
     45   // Z_ORDER: int32_t
     46   // Interpreted by VrFlinger only on direct surfaces to order the corresponding
     47   // hardware layers. More positive values render on top of more negative
     48   // values.
     49   DVR_SURFACE_ATTRIBUTE_Z_ORDER = -2,
     50   // VISIBLE: bool
     51   // Interpreted by VrFlinger only on direct surfaces to determine whether a
     52   // surface is assigned to a hardware layer or ignored.
     53   DVR_SURFACE_ATTRIBUTE_VISIBLE = -1,
     54   // INVALID
     55   // Invalid key. No attributes should have this key.
     56   DVR_SURFACE_ATTRIBUTE_INVALID = 0,
     57   // FIRST_USER_KEY
     58   // VrFlinger ingores any keys with this value or greater, passing them to the
     59   // compositor through surface state query results.
     60   DVR_SURFACE_ATTRIBUTE_FIRST_USER_KEY = 1,
     61 };
     62 
     63 __END_DECLS
     64 
     65 #endif  // ANDROID_DVR_DISPLAY_TYPES_H_
     66