定义在 TransactionCallbackInvoker.h 中。
class CallbackHandle : public RefBase {
public:
CallbackHandle(const sp<IBinder>& transactionListener, const std::vector<CallbackId>& ids,
const sp<IBinder>& sc);
sp<IBinder> listener;
std::vector<CallbackId> callbackIds;
wp<IBinder> surfaceControl;
bool releasePreviousBuffer = false;
sp<Fence> previousReleaseFence;
nsecs_t acquireTime = -1;
nsecs_t latchTime = -1;
uint32_t transformHint = 0;
uint32_t currentMaxAcquiredBufferCount = 0;
std::shared_ptr<FenceTime> gpuCompositionDoneFence{FenceTime::NO_FENCE};
CompositorTiming compositorTiming;
nsecs_t refreshStartTime = 0;
nsecs_t dequeueReadyTime = 0;
uint64_t frameNumber = 0;
ReleaseCallbackId previousReleaseCallbackId = ReleaseCallbackId::INVALID_ID;
};
listener
是 ITransactionCompletedListener。callbackIds
是 CallbackId 向量。surfaceControl
是 layer_state_t 的字段 surface
,即 SurfaceControl 的 mHandle
,在 SurfaceFlinger::setClientStateLocked() 中写入的。