Refactor ImBuf buffer access #107609

Merged
Sergey Sharybin merged 8 commits from Sergey/blender:imbuf_buffer_data_refactor into main 2023-05-18 10:19:10 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit b7a57cd599 - Show all commits

View File

@ -4457,7 +4457,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **r_loc
IMB_assign_float_z_buffer(ibuf, rectz, IB_DO_NOT_TAKE_OWNERSHIP);
/* TODO(sergey): Make this faster by either simply referencing the stamp
* or by changing both ImBug and RenderResult to use same data type to
* or by changing both ImBuf and RenderResult to use same data type to
* store metadata. */
if (ibuf->metadata != nullptr) {
IMB_metadata_free(ibuf->metadata);

View File

@ -160,7 +160,7 @@ typedef enum eImBufFlags {
/* Specialization of an ownership whenever a bare pointer is provided to the ImBuf buffers
* assignment API. */
typedef enum ImBufOwnership {
Review

Naming might be confusing as the enum name can be read as a state type, but the values represent an action/transition.

Naming might be confusing as the enum name can be read as a state type, but the values represent an action/transition.
/* The ImBug simply shares pointer with data owned by someone else, and will not perform any
/* The ImBuf simply shares pointer with data owned by someone else, and will not perform any

ImBuf

`ImBuf`
* memory management when the ImBuf frees the buffer. */
IB_DO_NOT_TAKE_OWNERSHIP = 0,