@@ -358,6 +358,31 @@ int APerformanceHint_notifyWorkloadReset(
358358 APerformanceHintSession* _Nonnull session,
359359 bool cpu, bool gpu, const char * _Nonnull debugName) __INTRODUCED_IN(36 );
360360
361+ /* *
362+ * Informs the framework of an upcoming one-off expensive frame for a graphics pipeline
363+ * bound to this session. This frame will be treated as not representative of the workload as a
364+ * whole, and it will be discarded the purposes of load tracking. The user can specify
365+ * whether the workload spike is expected to be on the CPU, GPU, or both.
366+ *
367+ * Sending hints for both CPU and GPU counts as two separate hints for the purposes of the
368+ * rate limiter.
369+ *
370+ * @param cpu Indicates if the workload spike is expected to affect the CPU.
371+ * @param gpu Indicates if the workload spike is expected to affect the GPU.
372+ * @param debugName A required string used to identify this specific hint during
373+ * tracing. This debug string will only be held for the duration of the
374+ * method, and can be safely discarded after.
375+ *
376+ * @return 0 on success.
377+ * EINVAL if no hints were requested.
378+ * EBUSY if the hint was rate limited.
379+ * EPIPE if communication with the system service has failed.
380+ * ENOTSUP if the hint is not supported.
381+ */
382+ int APerformanceHint_notifyWorkloadSpike (
383+ APerformanceHintSession* _Nonnull session,
384+ bool cpu, bool gpu, const char * _Nonnull debugName) __INTRODUCED_IN(36 );
385+
361386/* *
362387 * Associates a session with any {@link ASurfaceControl} or {@link ANativeWindow}
363388 * instances managed by this session.
0 commit comments