Blender V5.3
IMB_partial_update.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024-2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
27
28#pragma once
29
30#include "BLI_bit_vector.hh"
31#include "BLI_vector.hh"
32
33#include "DNA_vec_types.h"
34
35#include "IMB_imbuf_types.hh"
36
37namespace blender {
38
39/* -------------------------------------------------------------------- */
42
44void IMB_partial_update_mark_region(ImBuf *ibuf, const rcti &region);
45
48
50void IMB_mark_dirty(ImBuf *ibuf);
51
53
54/* -------------------------------------------------------------------- */
57
58namespace imbuf::partial_update {
59
61constexpr int CHUNK_SIZE = 256;
62
64struct Changes {
65 enum class Kind {
67 None,
69 Partial,
71 Full,
73 Resized,
74 };
75
77
78 /* Buffer resolution. */
79 int buffer_width = 0;
81
82 /* Chunk grid resolution of #modified_chunks. */
83 int chunk_x_len = 0;
84 int chunk_y_len = 0;
85
86 /* Modified bitmask for chunks of size #CHUNK_SIZE x #CHUNK_SIZE. */
88
91
94};
95
96} // namespace imbuf::partial_update
97
100
103
106
109 imbuf::ChangesetID last_changeset_id);
110
112
115
116} // namespace blender
BMesh Iterators.
void IMB_mark_dirty(ImBuf *ibuf)
imbuf::ChangesetID IMB_partial_update_changeset_id_current()
void IMB_partial_update_free(ImBuf *ibuf)
void IMB_partial_update_mark_region(ImBuf *ibuf, const rcti &region)
void IMB_partial_update_mark_full(ImBuf *ibuf)
imbuf::ChangesetID IMB_partial_update_changeset_id_next()
imbuf::partial_update::Changes IMB_partial_update_collect(ImBuf *ibuf, imbuf::ChangesetID last_changeset_id)
void IMB_partial_update_flush(ImBuf *ibuf)