@@ -340,10 +340,23 @@ class render_pass_t
340340 ~render_pass_t ();
341341
342342 /* *
343- * Run a new render pass from start to finish.
344- * This includes generate instructions for the render pass and executing them.
343+ * Create, run and submit a render pass in one go.
345344 *
346- * The render pass goes as described below:
345+ * Equivalent to:
346+ *
347+ * ```
348+ * render_pass_t pass{params};
349+ * pass.run_partial();
350+ * pass.submit();
351+ * ```
352+ *
353+ * @return The full damage which was rendered on the render target, as described in @run_partial().
354+ */
355+ static wf::region_t run (const wf::render_pass_params_t & params);
356+
357+ /* *
358+ * Execute the main part of a render pass.
359+ * This involves the following steps:
347360 *
348361 * 1. Optionally, emit render-pass-begin.
349362 * 2. Render instructions are generated from the given instances. During this phase, the instances may
@@ -352,18 +365,13 @@ class render_pass_t
352365 * 4. Optionally, clear visible background areas with @background_color.
353366 * 5. Render instructions are executed back-to-front, i.e starting with the last instruction in the list.
354367 * 6. Optionally, emit render-pass-end.
355- * 7. The wlroots render pass is submitted.
356368 *
357- * By specifying @flags, steps 1, 4, and 6 can be enabled and disabled.
369+ * By specifying @render_pass_params_t::flags, steps 1, 4, and 6 can be enabled and disabled.
370+ * After @run_partial() returns, additional render operations may be added to the pass, and finally
371+ * the pass needs to be submitted with @submit() to ensure that all operations are executed.
358372 *
359373 * @return The full damage which was rendered on the render target. It may be more (or
360- * less) than @params.damage because plugins are allowed to modify the
361- * damage in render-pass-begin.
362- */
363- static wf::region_t run (const wf::render_pass_params_t & params);
364-
365- /* *
366- * Same as @run, but does not submit the wlroots render pass (i.e step 7 is omitted).
374+ * less) than @params.damage because plugins are allowed to modify the damage in render-pass-begin.
367375 */
368376 wf::region_t run_partial ();
369377
0 commit comments