Files
test/source/blender/render/RE_compositor.hh
Omar Emara e53ac805af Compositor: Avoid redundant output computations
This patch allows the compositor context to specify exactly which
outputs it needs, selecting from: Composite, Viewer, File Output, and
Previews. Previously, the compositor fully executed if any of those were
needed, without granular control on which outputs are needed exactly.

For the viewport compositor engine, it requests Composite and Viewer,
with no Previews or File Outputs.

For the render pipeline, it requests Composite and File Output, with
node Viewer or Previews.

For the interactive compositor, it requests Viewer if the backdrop is
visible or an image editor with the viewer image is visible, it requests
Compositor if an image editor with the render result is visible, it
requests Previews if a node editor has previews overlay enabled. File
outputs are never requested.

Pull Request: https://projects.blender.org/blender/blender/pulls/133960
2025-02-04 08:34:48 +01:00

43 lines
1.3 KiB
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include <cstdint>
namespace blender::compositor {
class RenderContext;
class Profiler;
enum class OutputTypes : uint8_t;
} // namespace blender::compositor
struct bNodeTree;
struct Render;
struct RenderData;
struct Scene;
/* ------------------------------------------------------------------------------------------------
* Render Compositor
*
* Implementation of the compositor for final rendering, as opposed to the viewport compositor
* that is part of the draw manager. The input and output of this is pre-existing RenderResult
* buffers in scenes, that are uploaded to and read back from the GPU. */
namespace blender::render {
class Compositor;
}
/* Execute compositor. */
void RE_compositor_execute(Render &render,
const Scene &scene,
const RenderData &render_data,
const bNodeTree &node_tree,
const char *view_name,
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler,
blender::compositor::OutputTypes needed_outputs);
/* Free compositor caches. */
void RE_compositor_free(Render &render);