[Bf-blender-cvs] [2bb58991ad6] temp-viewport-compositor-merge: Realtime Compositor: Cleanup comments complete renames

Omar Emara noreply at git.blender.org
Wed Jun 15 11:51:35 CEST 2022


Commit: 2bb58991ad6e2dfa5807a4022c3d136d3d0e6e18
Author: Omar Emara
Date:   Wed Jun 15 08:13:58 2022 +0200
Branches: temp-viewport-compositor-merge
https://developer.blender.org/rB2bb58991ad6e2dfa5807a4022c3d136d3d0e6e18

Realtime Compositor: Cleanup comments complete renames

===================================================================

M	source/blender/compositor/realtime_compositor/COM_compile_state.hh
M	source/blender/compositor/realtime_compositor/COM_context.hh
M	source/blender/compositor/realtime_compositor/COM_domain.hh
M	source/blender/compositor/realtime_compositor/COM_evaluator.hh
M	source/blender/compositor/realtime_compositor/COM_input_descriptor.hh
M	source/blender/compositor/realtime_compositor/COM_input_single_value_operation.hh
M	source/blender/compositor/realtime_compositor/COM_node_operation.hh
M	source/blender/compositor/realtime_compositor/COM_operation.hh
M	source/blender/compositor/realtime_compositor/COM_result.hh
M	source/blender/compositor/realtime_compositor/COM_shader_node.hh
M	source/blender/compositor/realtime_compositor/COM_shader_operation.hh
M	source/blender/compositor/realtime_compositor/COM_shader_pool.hh
M	source/blender/compositor/realtime_compositor/COM_simple_operation.hh
M	source/blender/compositor/realtime_compositor/COM_texture_pool.hh
M	source/blender/compositor/realtime_compositor/COM_utilities.hh
M	source/blender/compositor/realtime_compositor/intern/compile_state.cc
M	source/blender/compositor/realtime_compositor/intern/evaluator.cc
M	source/blender/compositor/realtime_compositor/intern/reduce_to_single_value_operation.cc
M	source/blender/compositor/realtime_compositor/intern/result.cc
M	source/blender/compositor/realtime_compositor/intern/scheduler.cc
M	source/blender/compositor/realtime_compositor/intern/shader_operation.cc
M	source/blender/compositor/realtime_compositor/intern/texture_pool.cc

===================================================================

diff --git a/source/blender/compositor/realtime_compositor/COM_compile_state.hh b/source/blender/compositor/realtime_compositor/COM_compile_state.hh
index ba2dbe9f13e..3e2d27515f8 100644
--- a/source/blender/compositor/realtime_compositor/COM_compile_state.hh
+++ b/source/blender/compositor/realtime_compositor/COM_compile_state.hh
@@ -18,9 +18,9 @@ using namespace nodes::derived_node_tree_types;
 /* ------------------------------------------------------------------------------------------------
  * Compile State
  *
- * This is a utility class used to track the state of compilation when compiling the node tree. In
- * particular, it tracks two important pieces of information, each of which is described in one of
- * the following sections.
+ * The compile state a utility class used to track the state of compilation when compiling the node
+ * tree. In particular, it tracks two important pieces of information, each of which is described
+ * in one of the following sections.
  *
  * First, it stores a mapping between all nodes and the operations they were compiled into. The
  * mapping are stored independently depending on the type of the operation in the node_operations_
@@ -96,7 +96,7 @@ using namespace nodes::derived_node_tree_types;
  * domain is not an identity domain. Identity domains corresponds to single value results, so those
  * are always compatible with any domain. The domain of the compile unit is computed and set in
  * the add_node_to_shader_compile_unit method. When processing a node, the computed domain of node
- * is compared to compile unit domain in the should_compile_shader_compile_unit method, noting
+ * is compared to the compile unit domain in the should_compile_shader_compile_unit method, noting
  * that identity domains are always compatible. Node domains are computed in the
  * compute_shader_node_domain method, which is analogous to Operation::compute_domain for nodes
  * that are not yet compiled. */
@@ -111,10 +111,10 @@ class CompileState {
    * more information. */
   Map<DNode, NodeOperation *> node_operations_;
   Map<DNode, ShaderOperation *> shader_operations_;
-  /* A contiguous subset of the node execution schedule that contains the unit of nodes that will
+  /* A contiguous subset of the node execution schedule that contains the group of nodes that will
    * be compiled together into a Shader Operation. See the discussion in COM_evaluator.hh for
    * more information. */
-  SubSchedule shader_compile_unit_;
+  ShaderCompileUnit shader_compile_unit_;
   /* The domain of the shader compile unit. */
   Domain shader_compile_unit_domain_ = Domain::identity();
 
@@ -142,8 +142,8 @@ class CompileState {
    * the give node. */
   void add_node_to_shader_compile_unit(DNode node);
 
-  /* Get the sub-schedule representing the compile unit.  */
-  SubSchedule &get_shader_compile_unit_sub_schedule();
+  /* Get a reference to the shader compile unit.  */
+  ShaderCompileUnit &get_shader_compile_unit();
 
   /* Clear the compile unit. This should be called once the compile unit is compiled to ready it to
    * track the next potential compile unit. */
diff --git a/source/blender/compositor/realtime_compositor/COM_context.hh b/source/blender/compositor/realtime_compositor/COM_context.hh
index 68220bb50bb..08cb4008c8f 100644
--- a/source/blender/compositor/realtime_compositor/COM_context.hh
+++ b/source/blender/compositor/realtime_compositor/COM_context.hh
@@ -17,11 +17,12 @@ namespace blender::realtime_compositor {
 /* ------------------------------------------------------------------------------------------------
  * Context
  *
- * An abstract class which is used by operations to access data intrinsic to the compositor engine.
- * The compositor engine should implement the class to provide the necessary functionalities for
- * operations. The class also provides a reference to the texture pool which should be implemented
- * by the compositor engine and provided during construction. Finally, the class have an instance
- * of a shader pool for convenient shader acquisition. */
+ * A Context is an abstract class that is implemented by the caller of the evaluator to provide the
+ * necessary data and functionalities for the correct operation of the evaluator. This includes
+ * providing input data like render passes and the active scene, as well as references to the data
+ * where the output of the evaluator will be written. The class also provides a reference to the
+ * texture pool which should be implemented by the caller and provided during construction.
+ * Finally, the class have an instance of a shader pool for convenient shader acquisition. */
 class Context {
  private:
   /* A texture pool that can be used to allocate textures for the compositor efficiently. */
diff --git a/source/blender/compositor/realtime_compositor/COM_domain.hh b/source/blender/compositor/realtime_compositor/COM_domain.hh
index dd763f3ca6e..dd669d5df6e 100644
--- a/source/blender/compositor/realtime_compositor/COM_domain.hh
+++ b/source/blender/compositor/realtime_compositor/COM_domain.hh
@@ -21,8 +21,8 @@ enum class Interpolation : uint8_t {
  * Realization Options
  *
  * The options that describe how an input result prefer to be realized on some other domain. This
- * is used by the Realize On Domain Processor Operation to identify the appropriate method of
- * realization. See the Domain class for more information. */
+ * is used by the Realize On Domain Operation to identify the appropriate method of realization.
+ * See the Domain class for more information. */
 class RealizationOptions {
  public:
   /* The interpolation method that should be used when performing realization. Since realizing a
@@ -43,28 +43,56 @@ class RealizationOptions {
 /* ------------------------------------------------------------------------------------------------
  * Domain
  *
- * A domain is a rectangular area of a certain size in pixels that is transformed by a certain
- * transformation in pixel space relative to some reference space.
+ * The compositor is designed in such a way as to allow compositing in an infinite virtual
+ * compositing space. Consequently, any result of an operation is not only represented by its image
+ * output, but also by its transformation in that virtual space. The transformation of the result
+ * together with the dimension of its image is stored and represented by a Domain. In the figure
+ * below, two results of different domains are illustrated on the virtual compositing space. One of
+ * the results is centered in space with an image dimension of 800px × 600px, and the other result
+ * is scaled down and translated such that it lies in the upper right quadrant of the space with an
+ * image dimension of 800px × 400px. The position of the domain is in pixel space, and the domain
+ * is considered centered if it has an identity transformation. Note that both results have the
+ * same resolution, but occupy different areas of the virtual compositing space.
  *
- * Any result computed by an operation resides in a domain. The size of the domain of the result is
- * the size of its texture. The transformation of the domain of the result is typically an identity
- * transformation, indicating that the result is centered in space. But a transformation operation
- * like the rotate, translate, or transform operations will adjust the transformation to make the
- * result reside somewhere different in space. The domain of a single value result is irrelevant
- * and always set to an identity domain.
+ *                                          y
+ *                                          ^
+ *                           800px x 600px  |
+ *                    .---------------------|---------------------.
+ *                    |                     |    800px x 600px    |
+ *                    |                     |   .-------------.   |
+ *                    |                     |   |             |   |
+ *                    |                     |   '-------------'   |
+ *              ------|---------------------|---------------------|------> x
+ *                    |                     |                     |
+ *                    |                     |                     |
+ *                    |                     |                     |
+ *                    |                     |                     |
+ *                    '---------------------|---------------------'
+ *                                          |
  *
- * An operation operates in a certain domain called the operation domain, it follows that the
- * operation only cares about the inputs whose domain is inside or at least intersects the
- * operation domain. To abstract away the different domains of the inputs, any input that have a
- * different domain than the operation domain is realized on the operation domain through a
- * Realize On Domain Processor Operation, except inputs whose descriptor sets skip_realization or
- * expects_single_value, see InputDescriptor for more information. The realization process simply
- * projects the input domain on the operation domain, copies the area of input that intersects the
- * operation domain, and fill the rest with zeros or repetitions of the input domain; depending on
- * the realization_options, see the RealizationOptions class for more information. This process is
- * illustrated below, assuming no repetition in either directions. It follows that operations
- * should expect all their inputs to have the same domain and consequently size, except for inputs
- * that explicitly skip realization.
+ * By default, results have domains of identity transformations, that is, they are centered in
+ * space, but a transformation operation like the rotate, translate, or transform operations will
+ * adjust the transformation to make the result reside somewhere different in space. The domain of
+ * a single value result is irrelevant and always set to an identity domain.
+ *
+ * An operation is typically only concerned about a subset of the virtual compositing space, this
+ * subset is represented by a domain which is called the Operation Domain. It follows that before
+ * the operation itself is executed

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list