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

Commit ce569c4c authored by Pablo Gamito's avatar Pablo Gamito Committed by Android (Google) Code Review
Browse files

Merge changes from topics "consistent-frame-number-type",...

Merge changes from topics "consistent-frame-number-type", "metrics-callback-surface-id", "remove-asc-from-fmcallback"

* changes:
  Get rid of unused ASurfaceControl in frame metrics callback
  Update ANativeWindow_getNextFrameId docs to specify API contract
  Make frame number type consistent
  Update type of surface stats listener function to include id used to identify the surface
parents 68d9a049 ac8e5612
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@ typedef struct ASurfaceControlStats ASurfaceControlStats;
/**
 * Callback to be notified when surface stats for a specific surface control are available.
 */
typedef void (*ASurfaceControl_SurfaceStatsListener)(void* context,
        ASurfaceControl* control, ASurfaceControlStats* stats);
typedef void (*ASurfaceControl_SurfaceStatsListener)(void* context, int32_t id,
        ASurfaceControlStats* stats);

/**
 * Registers a callback to be invoked when surface stats from a specific surface are available.
@@ -42,7 +42,7 @@ typedef void (*ASurfaceControl_SurfaceStatsListener)(void* context,
 *
 * \param func The callback to be invoked when surface stats are available.
 */
void ASurfaceControl_registerSurfaceStatsListener(ASurfaceControl* control, void* context,
void ASurfaceControl_registerSurfaceStatsListener(ASurfaceControl* control, int32_t id, void* context,
        ASurfaceControl_SurfaceStatsListener func);

/**
+6 −3
Original line number Diff line number Diff line
@@ -1089,10 +1089,13 @@ static inline int ANativeWindow_getLastQueuedBuffer2(ANativeWindow* window,
/**
 * Retrieves an identifier for the next frame to be queued by this window.
 *
 * \return the next frame id.
 * Frame ids start at 1 and are incremented on each new frame until the underlying surface changes,
 * in which case the frame id is reset to 1.
 *
 * \return the next frame id (0 being uninitialized).
 */
static inline int64_t ANativeWindow_getNextFrameId(ANativeWindow* window) {
    int64_t value;
static inline uint64_t ANativeWindow_getNextFrameId(ANativeWindow* window) {
    uint64_t value;
    window->perform(window, NATIVE_WINDOW_GET_NEXT_FRAME_ID, &value);
    return value;
}