Blender V5.3
blender::imbuf::partial_update Namespace Reference

Namespaces

namespace  tests

Classes

struct  Changes
struct  Changeset
struct  Tracker

Functions

static int chunk_number_for_pixel (int pixel_offset)
static Tracker & tracker_ensure (ImBuf *ibuf)

Variables

constexpr int CHUNK_SIZE = 256
constexpr int MAX_HISTORY_LEN = 4
static uint64_t g_change_id_counter = 0

Function Documentation

◆ chunk_number_for_pixel()

int blender::imbuf::partial_update::chunk_number_for_pixel ( int pixel_offset)
static

Get the chunk number for the given pixel coordinate.

As chunks are squares this can be used for both x and y axis.

Definition at line 42 of file partial_update.cc.

References chunk_number_for_pixel(), and CHUNK_SIZE.

Referenced by chunk_number_for_pixel(), and blender::imbuf::partial_update::Changeset::mark_region().

◆ tracker_ensure()

Variable Documentation

◆ CHUNK_SIZE

◆ g_change_id_counter

uint64_t blender::imbuf::partial_update::g_change_id_counter = 0
static

Global change ID tracking.

This is global so that consumers can store only changeset IDs and detect changes even as image buffers change. If they would store ImBuf pointers, the same ImBuf address might get reused for another UDIM tile or pass.

Definition at line 188 of file partial_update.cc.

Referenced by blender::IMB_partial_update_changeset_id_current(), and blender::IMB_partial_update_changeset_id_next().

◆ MAX_HISTORY_LEN

int blender::imbuf::partial_update::MAX_HISTORY_LEN = 4
constexpr

Max number of changesets to keep in history.

Longer history needs more memory and processing, but lets more consumers benefit from partial changes, when they don't redraw/update on every frame.

Definition at line 35 of file partial_update.cc.

Referenced by blender::imbuf::partial_update::Tracker::limit_history().