Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Castilla <manzanillawork@gmail.com>2021-10-14 00:00:50 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-10-14 00:41:14 +0300
commitea79efef70da14100b591b50dcada819808f20b6 (patch)
tree4faf296870f1ab27ee33fee2b331fdb6b2d2bec4 /source/blender/compositor/intern
parentecb8a574c752068de9f8d9eb98f54db1569df2f7 (diff)
Cleanup: remove `this->` for `m_` prefixed members in Compositor
For cleaning old code style as new code usually omit it.
Diffstat (limited to 'source/blender/compositor/intern')
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.cc16
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.h40
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cc179
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.h8
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cc30
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.h2
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cc74
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.h34
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.cc14
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.h12
-rw-r--r--source/blender/compositor/intern/COM_Node.h16
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.cc10
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.h12
-rw-r--r--source/blender/compositor/intern/COM_NodeOperationBuilder.cc2
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.cc29
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.h4
-rw-r--r--source/blender/compositor/intern/COM_SingleThreadedOperation.cc20
-rw-r--r--source/blender/compositor/intern/COM_SingleThreadedOperation.h2
18 files changed, 245 insertions, 259 deletions
diff --git a/source/blender/compositor/intern/COM_CompositorContext.cc b/source/blender/compositor/intern/COM_CompositorContext.cc
index 5d8355c181a..81043f1f163 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.cc
+++ b/source/blender/compositor/intern/COM_CompositorContext.cc
@@ -22,14 +22,14 @@ namespace blender::compositor {
CompositorContext::CompositorContext()
{
- this->m_scene = nullptr;
- this->m_rd = nullptr;
- this->m_quality = eCompositorQuality::High;
- this->m_hasActiveOpenCLDevices = false;
- this->m_fastCalculation = false;
- this->m_viewSettings = nullptr;
- this->m_displaySettings = nullptr;
- this->m_bnodetree = nullptr;
+ m_scene = nullptr;
+ m_rd = nullptr;
+ m_quality = eCompositorQuality::High;
+ m_hasActiveOpenCLDevices = false;
+ m_fastCalculation = false;
+ m_viewSettings = nullptr;
+ m_displaySettings = nullptr;
+ m_bnodetree = nullptr;
}
int CompositorContext::getFramenumber() const
diff --git a/source/blender/compositor/intern/COM_CompositorContext.h b/source/blender/compositor/intern/COM_CompositorContext.h
index 1ae596736ae..835d565fc91 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.h
+++ b/source/blender/compositor/intern/COM_CompositorContext.h
@@ -99,7 +99,7 @@ class CompositorContext {
*/
void setRendering(bool rendering)
{
- this->m_rendering = rendering;
+ m_rendering = rendering;
}
/**
@@ -107,7 +107,7 @@ class CompositorContext {
*/
bool isRendering() const
{
- return this->m_rendering;
+ return m_rendering;
}
/**
@@ -115,7 +115,7 @@ class CompositorContext {
*/
void setRenderData(RenderData *rd)
{
- this->m_rd = rd;
+ m_rd = rd;
}
/**
@@ -123,7 +123,7 @@ class CompositorContext {
*/
void setbNodeTree(bNodeTree *bnodetree)
{
- this->m_bnodetree = bnodetree;
+ m_bnodetree = bnodetree;
}
/**
@@ -131,7 +131,7 @@ class CompositorContext {
*/
const bNodeTree *getbNodeTree() const
{
- return this->m_bnodetree;
+ return m_bnodetree;
}
/**
@@ -139,7 +139,7 @@ class CompositorContext {
*/
const RenderData *getRenderData() const
{
- return this->m_rd;
+ return m_rd;
}
void setScene(Scene *scene)
@@ -156,7 +156,7 @@ class CompositorContext {
*/
void setPreviewHash(bNodeInstanceHash *previews)
{
- this->m_previews = previews;
+ m_previews = previews;
}
/**
@@ -164,7 +164,7 @@ class CompositorContext {
*/
bNodeInstanceHash *getPreviewHash() const
{
- return this->m_previews;
+ return m_previews;
}
/**
@@ -172,7 +172,7 @@ class CompositorContext {
*/
void setViewSettings(const ColorManagedViewSettings *viewSettings)
{
- this->m_viewSettings = viewSettings;
+ m_viewSettings = viewSettings;
}
/**
@@ -180,7 +180,7 @@ class CompositorContext {
*/
const ColorManagedViewSettings *getViewSettings() const
{
- return this->m_viewSettings;
+ return m_viewSettings;
}
/**
@@ -188,7 +188,7 @@ class CompositorContext {
*/
void setDisplaySettings(const ColorManagedDisplaySettings *displaySettings)
{
- this->m_displaySettings = displaySettings;
+ m_displaySettings = displaySettings;
}
/**
@@ -196,7 +196,7 @@ class CompositorContext {
*/
const ColorManagedDisplaySettings *getDisplaySettings() const
{
- return this->m_displaySettings;
+ return m_displaySettings;
}
/**
@@ -204,7 +204,7 @@ class CompositorContext {
*/
void setQuality(eCompositorQuality quality)
{
- this->m_quality = quality;
+ m_quality = quality;
}
/**
@@ -212,7 +212,7 @@ class CompositorContext {
*/
eCompositorQuality getQuality() const
{
- return this->m_quality;
+ return m_quality;
}
/**
@@ -225,7 +225,7 @@ class CompositorContext {
*/
bool getHasActiveOpenCLDevices() const
{
- return this->m_hasActiveOpenCLDevices;
+ return m_hasActiveOpenCLDevices;
}
/**
@@ -233,7 +233,7 @@ class CompositorContext {
*/
void setHasActiveOpenCLDevices(bool hasAvtiveOpenCLDevices)
{
- this->m_hasActiveOpenCLDevices = hasAvtiveOpenCLDevices;
+ m_hasActiveOpenCLDevices = hasAvtiveOpenCLDevices;
}
/** Whether it has a view with a specific name and not the default one. */
@@ -247,7 +247,7 @@ class CompositorContext {
*/
const char *getViewName() const
{
- return this->m_viewName;
+ return m_viewName;
}
/**
@@ -255,7 +255,7 @@ class CompositorContext {
*/
void setViewName(const char *viewName)
{
- this->m_viewName = viewName;
+ m_viewName = viewName;
}
int getChunksize() const
@@ -265,11 +265,11 @@ class CompositorContext {
void setFastCalculation(bool fastCalculation)
{
- this->m_fastCalculation = fastCalculation;
+ m_fastCalculation = fastCalculation;
}
bool isFastCalculation() const
{
- return this->m_fastCalculation;
+ return m_fastCalculation;
}
bool isGroupnodeBufferEnabled() const
{
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cc b/source/blender/compositor/intern/COM_ExecutionGroup.cc
index 655bc030dec..8841f44ea48 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cc
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cc
@@ -56,16 +56,16 @@ std::ostream &operator<<(std::ostream &os, const ExecutionGroupFlags &flags)
ExecutionGroup::ExecutionGroup(int id)
{
m_id = id;
- this->m_bTree = nullptr;
- this->m_height = 0;
- this->m_width = 0;
- this->m_max_read_buffer_offset = 0;
- this->m_x_chunks_len = 0;
- this->m_y_chunks_len = 0;
- this->m_chunks_len = 0;
- this->m_chunks_finished = 0;
- BLI_rcti_init(&this->m_viewerBorder, 0, 0, 0, 0);
- this->m_executionStartTime = 0;
+ m_bTree = nullptr;
+ m_height = 0;
+ m_width = 0;
+ m_max_read_buffer_offset = 0;
+ m_x_chunks_len = 0;
+ m_y_chunks_len = 0;
+ m_chunks_len = 0;
+ m_chunks_finished = 0;
+ BLI_rcti_init(&m_viewerBorder, 0, 0, 0, 0);
+ m_executionStartTime = 0;
}
std::ostream &operator<<(std::ostream &os, const ExecutionGroup &execution_group)
@@ -139,8 +139,8 @@ NodeOperation *ExecutionGroup::getOutputOperation() const
void ExecutionGroup::init_work_packages()
{
m_work_packages.clear();
- if (this->m_chunks_len != 0) {
- m_work_packages.resize(this->m_chunks_len);
+ if (m_chunks_len != 0) {
+ m_work_packages.resize(m_chunks_len);
for (unsigned int index = 0; index < m_chunks_len; index++) {
m_work_packages[index].type = eWorkPackageType::Tile;
m_work_packages[index].state = eWorkPackageState::NotScheduled;
@@ -157,12 +157,12 @@ void ExecutionGroup::init_read_buffer_operations()
for (NodeOperation *operation : m_operations) {
if (operation->get_flags().is_read_buffer_operation) {
ReadBufferOperation *readOperation = static_cast<ReadBufferOperation *>(operation);
- this->m_read_operations.append(readOperation);
+ m_read_operations.append(readOperation);
max_offset = MAX2(max_offset, readOperation->getOffset());
}
}
max_offset++;
- this->m_max_read_buffer_offset = max_offset;
+ m_max_read_buffer_offset = max_offset;
}
void ExecutionGroup::initExecution()
@@ -175,11 +175,11 @@ void ExecutionGroup::initExecution()
void ExecutionGroup::deinitExecution()
{
m_work_packages.clear();
- this->m_chunks_len = 0;
- this->m_x_chunks_len = 0;
- this->m_y_chunks_len = 0;
- this->m_read_operations.clear();
- this->m_bTree = nullptr;
+ m_chunks_len = 0;
+ m_x_chunks_len = 0;
+ m_y_chunks_len = 0;
+ m_read_operations.clear();
+ m_bTree = nullptr;
}
void ExecutionGroup::determineResolution(unsigned int resolution[2])
@@ -188,30 +188,30 @@ void ExecutionGroup::determineResolution(unsigned int resolution[2])
resolution[0] = operation->getWidth();
resolution[1] = operation->getHeight();
this->setResolution(resolution);
- BLI_rcti_init(&this->m_viewerBorder, 0, this->m_width, 0, this->m_height);
+ BLI_rcti_init(&m_viewerBorder, 0, m_width, 0, m_height);
}
void ExecutionGroup::init_number_of_chunks()
{
- if (this->m_flags.single_threaded) {
- this->m_x_chunks_len = 1;
- this->m_y_chunks_len = 1;
- this->m_chunks_len = 1;
+ if (m_flags.single_threaded) {
+ m_x_chunks_len = 1;
+ m_y_chunks_len = 1;
+ m_chunks_len = 1;
}
else {
- const float chunkSizef = this->m_chunkSize;
- const int border_width = BLI_rcti_size_x(&this->m_viewerBorder);
- const int border_height = BLI_rcti_size_y(&this->m_viewerBorder);
- this->m_x_chunks_len = ceil(border_width / chunkSizef);
- this->m_y_chunks_len = ceil(border_height / chunkSizef);
- this->m_chunks_len = this->m_x_chunks_len * this->m_y_chunks_len;
+ const float chunkSizef = m_chunkSize;
+ const int border_width = BLI_rcti_size_x(&m_viewerBorder);
+ const int border_height = BLI_rcti_size_y(&m_viewerBorder);
+ m_x_chunks_len = ceil(border_width / chunkSizef);
+ m_y_chunks_len = ceil(border_height / chunkSizef);
+ m_chunks_len = m_x_chunks_len * m_y_chunks_len;
}
}
blender::Array<unsigned int> ExecutionGroup::get_execution_order() const
{
blender::Array<unsigned int> chunk_order(m_chunks_len);
- for (int chunk_index = 0; chunk_index < this->m_chunks_len; chunk_index++) {
+ for (int chunk_index = 0; chunk_index < m_chunks_len; chunk_index++) {
chunk_order[chunk_index] = chunk_index;
}
@@ -227,8 +227,8 @@ blender::Array<unsigned int> ExecutionGroup::get_execution_order() const
order_type = viewer->getChunkOrder();
}
- const int border_width = BLI_rcti_size_x(&this->m_viewerBorder);
- const int border_height = BLI_rcti_size_y(&this->m_viewerBorder);
+ const int border_width = BLI_rcti_size_x(&m_viewerBorder);
+ const int border_height = BLI_rcti_size_y(&m_viewerBorder);
int index;
switch (order_type) {
case ChunkOrdering::Random: {
@@ -242,16 +242,16 @@ blender::Array<unsigned int> ExecutionGroup::get_execution_order() const
case ChunkOrdering::CenterOut: {
ChunkOrderHotspot hotspot(border_width * centerX, border_height * centerY, 0.0f);
blender::Array<ChunkOrder> chunk_orders(m_chunks_len);
- for (index = 0; index < this->m_chunks_len; index++) {
+ for (index = 0; index < m_chunks_len; index++) {
const WorkPackage &work_package = m_work_packages[index];
chunk_orders[index].index = index;
- chunk_orders[index].x = work_package.rect.xmin - this->m_viewerBorder.xmin;
- chunk_orders[index].y = work_package.rect.ymin - this->m_viewerBorder.ymin;
+ chunk_orders[index].x = work_package.rect.xmin - m_viewerBorder.xmin;
+ chunk_orders[index].y = work_package.rect.ymin - m_viewerBorder.ymin;
chunk_orders[index].update_distance(&hotspot, 1);
}
- std::sort(&chunk_orders[0], &chunk_orders[this->m_chunks_len - 1]);
- for (index = 0; index < this->m_chunks_len; index++) {
+ std::sort(&chunk_orders[0], &chunk_orders[m_chunks_len - 1]);
+ for (index = 0; index < m_chunks_len; index++) {
chunk_order[index] = chunk_orders[index].index;
}
@@ -264,7 +264,7 @@ blender::Array<unsigned int> ExecutionGroup::get_execution_order() const
unsigned int my = border_height / 2;
unsigned int bx = mx + 2 * tx;
unsigned int by = my + 2 * ty;
- float addition = this->m_chunks_len / COM_RULE_OF_THIRDS_DIVIDER;
+ float addition = m_chunks_len / COM_RULE_OF_THIRDS_DIVIDER;
ChunkOrderHotspot hotspots[9]{
ChunkOrderHotspot(mx, my, addition * 0),
@@ -279,17 +279,17 @@ blender::Array<unsigned int> ExecutionGroup::get_execution_order() const
};
blender::Array<ChunkOrder> chunk_orders(m_chunks_len);
- for (index = 0; index < this->m_chunks_len; index++) {
+ for (index = 0; index < m_chunks_len; index++) {
const WorkPackage &work_package = m_work_packages[index];
chunk_orders[index].index = index;
- chunk_orders[index].x = work_package.rect.xmin - this->m_viewerBorder.xmin;
- chunk_orders[index].y = work_package.rect.ymin - this->m_viewerBorder.ymin;
+ chunk_orders[index].x = work_package.rect.xmin - m_viewerBorder.xmin;
+ chunk_orders[index].y = work_package.rect.ymin - m_viewerBorder.ymin;
chunk_orders[index].update_distance(hotspots, 9);
}
- std::sort(&chunk_orders[0], &chunk_orders[this->m_chunks_len]);
+ std::sort(&chunk_orders[0], &chunk_orders[m_chunks_len]);
- for (index = 0; index < this->m_chunks_len; index++) {
+ for (index = 0; index < m_chunks_len; index++) {
chunk_order[index] = chunk_orders[index].index;
}
@@ -310,21 +310,21 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
{
const CompositorContext &context = graph->getContext();
const bNodeTree *bTree = context.getbNodeTree();
- if (this->m_width == 0 || this->m_height == 0) {
+ if (m_width == 0 || m_height == 0) {
return;
} /** \note Break out... no pixels to calculate. */
if (bTree->test_break && bTree->test_break(bTree->tbh)) {
return;
} /** \note Early break out for blur and preview nodes. */
- if (this->m_chunks_len == 0) {
+ if (m_chunks_len == 0) {
return;
} /** \note Early break out. */
unsigned int chunk_index;
- this->m_executionStartTime = PIL_check_seconds_timer();
+ m_executionStartTime = PIL_check_seconds_timer();
- this->m_chunks_finished = 0;
- this->m_bTree = bTree;
+ m_chunks_finished = 0;
+ m_bTree = bTree;
blender::Array<unsigned int> chunk_order = get_execution_order();
@@ -341,12 +341,11 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
finished = true;
int numberEvaluated = 0;
- for (int index = startIndex;
- index < this->m_chunks_len && numberEvaluated < maxNumberEvaluated;
+ for (int index = startIndex; index < m_chunks_len && numberEvaluated < maxNumberEvaluated;
index++) {
chunk_index = chunk_order[index];
- int yChunk = chunk_index / this->m_x_chunks_len;
- int xChunk = chunk_index - (yChunk * this->m_x_chunks_len);
+ int yChunk = chunk_index / m_x_chunks_len;
+ int xChunk = chunk_index - (yChunk * m_x_chunks_len);
const WorkPackage &work_package = m_work_packages[chunk_index];
switch (work_package.state) {
case eWorkPackageState::NotScheduled: {
@@ -389,7 +388,7 @@ MemoryBuffer **ExecutionGroup::getInputBuffersOpenCL(int chunkNumber)
WorkPackage &work_package = m_work_packages[chunkNumber];
MemoryBuffer **memoryBuffers = (MemoryBuffer **)MEM_callocN(
- sizeof(MemoryBuffer *) * this->m_max_read_buffer_offset, __func__);
+ sizeof(MemoryBuffer *) * m_max_read_buffer_offset, __func__);
rcti output;
for (ReadBufferOperation *readOperation : m_read_operations) {
MemoryProxy *memoryProxy = readOperation->getMemoryProxy();
@@ -417,9 +416,9 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo
work_package.state = eWorkPackageState::Executed;
}
- atomic_add_and_fetch_u(&this->m_chunks_finished, 1);
+ atomic_add_and_fetch_u(&m_chunks_finished, 1);
if (memoryBuffers) {
- for (unsigned int index = 0; index < this->m_max_read_buffer_offset; index++) {
+ for (unsigned int index = 0; index < m_max_read_buffer_offset; index++) {
MemoryBuffer *buffer = memoryBuffers[index];
if (buffer) {
if (buffer->isTemporarily()) {
@@ -430,19 +429,16 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo
}
MEM_freeN(memoryBuffers);
}
- if (this->m_bTree) {
+ if (m_bTree) {
/* Status report is only performed for top level Execution Groups. */
- float progress = this->m_chunks_finished;
- progress /= this->m_chunks_len;
- this->m_bTree->progress(this->m_bTree->prh, progress);
+ float progress = m_chunks_finished;
+ progress /= m_chunks_len;
+ m_bTree->progress(m_bTree->prh, progress);
char buf[128];
- BLI_snprintf(buf,
- sizeof(buf),
- TIP_("Compositing | Tile %u-%u"),
- this->m_chunks_finished,
- this->m_chunks_len);
- this->m_bTree->stats_draw(this->m_bTree->sdh, buf);
+ BLI_snprintf(
+ buf, sizeof(buf), TIP_("Compositing | Tile %u-%u"), m_chunks_finished, m_chunks_len);
+ m_bTree->stats_draw(m_bTree->sdh, buf);
}
}
@@ -450,30 +446,29 @@ inline void ExecutionGroup::determineChunkRect(rcti *r_rect,
const unsigned int xChunk,
const unsigned int yChunk) const
{
- const int border_width = BLI_rcti_size_x(&this->m_viewerBorder);
- const int border_height = BLI_rcti_size_y(&this->m_viewerBorder);
+ const int border_width = BLI_rcti_size_x(&m_viewerBorder);
+ const int border_height = BLI_rcti_size_y(&m_viewerBorder);
- if (this->m_flags.single_threaded) {
- BLI_rcti_init(
- r_rect, this->m_viewerBorder.xmin, border_width, this->m_viewerBorder.ymin, border_height);
+ if (m_flags.single_threaded) {
+ BLI_rcti_init(r_rect, m_viewerBorder.xmin, border_width, m_viewerBorder.ymin, border_height);
}
else {
- const unsigned int minx = xChunk * this->m_chunkSize + this->m_viewerBorder.xmin;
- const unsigned int miny = yChunk * this->m_chunkSize + this->m_viewerBorder.ymin;
- const unsigned int width = MIN2((unsigned int)this->m_viewerBorder.xmax, this->m_width);
- const unsigned int height = MIN2((unsigned int)this->m_viewerBorder.ymax, this->m_height);
+ const unsigned int minx = xChunk * m_chunkSize + m_viewerBorder.xmin;
+ const unsigned int miny = yChunk * m_chunkSize + m_viewerBorder.ymin;
+ const unsigned int width = MIN2((unsigned int)m_viewerBorder.xmax, m_width);
+ const unsigned int height = MIN2((unsigned int)m_viewerBorder.ymax, m_height);
BLI_rcti_init(r_rect,
- MIN2(minx, this->m_width),
- MIN2(minx + this->m_chunkSize, width),
- MIN2(miny, this->m_height),
- MIN2(miny + this->m_chunkSize, height));
+ MIN2(minx, m_width),
+ MIN2(minx + m_chunkSize, width),
+ MIN2(miny, m_height),
+ MIN2(miny + m_chunkSize, height));
}
}
void ExecutionGroup::determineChunkRect(rcti *r_rect, const unsigned int chunkNumber) const
{
- const unsigned int yChunk = chunkNumber / this->m_x_chunks_len;
- const unsigned int xChunk = chunkNumber - (yChunk * this->m_x_chunks_len);
+ const unsigned int yChunk = chunkNumber / m_x_chunks_len;
+ const unsigned int xChunk = chunkNumber - (yChunk * m_x_chunks_len);
determineChunkRect(r_rect, xChunk, yChunk);
}
@@ -492,7 +487,7 @@ MemoryBuffer *ExecutionGroup::allocateOutputBuffer(rcti &rect)
bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area)
{
- if (this->m_flags.single_threaded) {
+ if (m_flags.single_threaded) {
return scheduleChunkWhenPossible(graph, 0, 0);
}
/* Find all chunks inside the rect
@@ -540,15 +535,15 @@ bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph,
const int chunk_x,
const int chunk_y)
{
- if (chunk_x < 0 || chunk_x >= (int)this->m_x_chunks_len) {
+ if (chunk_x < 0 || chunk_x >= (int)m_x_chunks_len) {
return true;
}
- if (chunk_y < 0 || chunk_y >= (int)this->m_y_chunks_len) {
+ if (chunk_y < 0 || chunk_y >= (int)m_y_chunks_len) {
return true;
}
/* Check if chunk is already executed or scheduled and not yet executed. */
- const int chunk_index = chunk_y * this->m_x_chunks_len + chunk_x;
+ const int chunk_index = chunk_y * m_x_chunks_len + chunk_x;
WorkPackage &work_package = m_work_packages[chunk_index];
if (work_package.state == eWorkPackageState::Executed) {
return true;
@@ -589,11 +584,8 @@ void ExecutionGroup::setViewerBorder(float xmin, float xmax, float ymin, float y
{
const NodeOperation &operation = *this->getOutputOperation();
if (operation.get_flags().use_viewer_border) {
- BLI_rcti_init(&this->m_viewerBorder,
- xmin * this->m_width,
- xmax * this->m_width,
- ymin * this->m_height,
- ymax * this->m_height);
+ BLI_rcti_init(
+ &m_viewerBorder, xmin * m_width, xmax * m_width, ymin * m_height, ymax * m_height);
}
}
@@ -601,11 +593,8 @@ void ExecutionGroup::setRenderBorder(float xmin, float xmax, float ymin, float y
{
const NodeOperation &operation = *this->getOutputOperation();
if (operation.isOutputOperation(true) && operation.get_flags().use_render_border) {
- BLI_rcti_init(&this->m_viewerBorder,
- xmin * this->m_width,
- xmax * this->m_width,
- ymin * this->m_height,
- ymax * this->m_height);
+ BLI_rcti_init(
+ &m_viewerBorder, xmin * m_width, xmax * m_width, ymin * m_height, ymax * m_height);
}
}
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h
index 58386c959a4..2799bef80d4 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.h
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.h
@@ -266,7 +266,7 @@ class ExecutionGroup {
*/
void setOutputExecutionGroup(bool is_output)
{
- this->m_flags.is_output = is_output;
+ m_flags.is_output = is_output;
}
/**
@@ -281,8 +281,8 @@ class ExecutionGroup {
*/
void setResolution(unsigned int resolution[2])
{
- this->m_width = resolution[0];
- this->m_height = resolution[1];
+ m_width = resolution[0];
+ m_height = resolution[1];
}
/**
@@ -381,7 +381,7 @@ class ExecutionGroup {
void setChunksize(int chunksize)
{
- this->m_chunkSize = chunksize;
+ m_chunkSize = chunksize;
}
/**
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cc b/source/blender/compositor/intern/COM_ExecutionSystem.cc
index 9b1ec823f75..510331f3294 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cc
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cc
@@ -43,25 +43,25 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
const char *viewName)
{
num_work_threads_ = WorkScheduler::get_num_cpu_threads();
- this->m_context.setViewName(viewName);
- this->m_context.setScene(scene);
- this->m_context.setbNodeTree(editingtree);
- this->m_context.setPreviewHash(editingtree->previews);
- this->m_context.setFastCalculation(fastcalculation);
+ m_context.setViewName(viewName);
+ m_context.setScene(scene);
+ m_context.setbNodeTree(editingtree);
+ m_context.setPreviewHash(editingtree->previews);
+ m_context.setFastCalculation(fastcalculation);
/* initialize the CompositorContext */
if (rendering) {
- this->m_context.setQuality((eCompositorQuality)editingtree->render_quality);
+ m_context.setQuality((eCompositorQuality)editingtree->render_quality);
}
else {
- this->m_context.setQuality((eCompositorQuality)editingtree->edit_quality);
+ m_context.setQuality((eCompositorQuality)editingtree->edit_quality);
}
- this->m_context.setRendering(rendering);
- this->m_context.setHasActiveOpenCLDevices(WorkScheduler::has_gpu_devices() &&
- (editingtree->flag & NTREE_COM_OPENCL));
+ m_context.setRendering(rendering);
+ m_context.setHasActiveOpenCLDevices(WorkScheduler::has_gpu_devices() &&
+ (editingtree->flag & NTREE_COM_OPENCL));
- this->m_context.setRenderData(rd);
- this->m_context.setViewSettings(viewSettings);
- this->m_context.setDisplaySettings(displaySettings);
+ m_context.setRenderData(rd);
+ m_context.setViewSettings(viewSettings);
+ m_context.setDisplaySettings(displaySettings);
BLI_mutex_init(&work_mutex_);
BLI_condition_init(&work_finished_cond_);
@@ -94,12 +94,12 @@ ExecutionSystem::~ExecutionSystem()
for (NodeOperation *operation : m_operations) {
delete operation;
}
- this->m_operations.clear();
+ m_operations.clear();
for (ExecutionGroup *group : m_groups) {
delete group;
}
- this->m_groups.clear();
+ m_groups.clear();
}
void ExecutionSystem::set_operations(const Vector<NodeOperation *> &operations,
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h
index eb0ad805217..303111b8b42 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.h
@@ -200,7 +200,7 @@ class ExecutionSystem {
*/
const CompositorContext &getContext() const
{
- return this->m_context;
+ return m_context;
}
SharedOperationBuffers &get_active_buffers()
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cc b/source/blender/compositor/intern/COM_MemoryBuffer.cc
index b80be46d46a..6851c3b5c5c 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cc
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cc
@@ -47,14 +47,14 @@ static rcti create_rect(const int width, const int height)
MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, const rcti &rect, MemoryBufferState state)
{
m_rect = rect;
- this->m_is_a_single_elem = false;
- this->m_memoryProxy = memoryProxy;
- this->m_num_channels = COM_data_type_num_channels(memoryProxy->getDataType());
- this->m_buffer = (float *)MEM_mallocN_aligned(
- sizeof(float) * buffer_len() * this->m_num_channels, 16, "COM_MemoryBuffer");
+ m_is_a_single_elem = false;
+ m_memoryProxy = memoryProxy;
+ m_num_channels = COM_data_type_num_channels(memoryProxy->getDataType());
+ m_buffer = (float *)MEM_mallocN_aligned(
+ sizeof(float) * buffer_len() * m_num_channels, 16, "COM_MemoryBuffer");
owns_data_ = true;
- this->m_state = state;
- this->m_datatype = memoryProxy->getDataType();
+ m_state = state;
+ m_datatype = memoryProxy->getDataType();
set_strides();
}
@@ -62,14 +62,14 @@ MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, const rcti &rect, MemoryBuf
MemoryBuffer::MemoryBuffer(DataType dataType, const rcti &rect, bool is_a_single_elem)
{
m_rect = rect;
- this->m_is_a_single_elem = is_a_single_elem;
- this->m_memoryProxy = nullptr;
- this->m_num_channels = COM_data_type_num_channels(dataType);
- this->m_buffer = (float *)MEM_mallocN_aligned(
- sizeof(float) * buffer_len() * this->m_num_channels, 16, "COM_MemoryBuffer");
+ m_is_a_single_elem = is_a_single_elem;
+ m_memoryProxy = nullptr;
+ m_num_channels = COM_data_type_num_channels(dataType);
+ m_buffer = (float *)MEM_mallocN_aligned(
+ sizeof(float) * buffer_len() * m_num_channels, 16, "COM_MemoryBuffer");
owns_data_ = true;
- this->m_state = MemoryBufferState::Temporary;
- this->m_datatype = dataType;
+ m_state = MemoryBufferState::Temporary;
+ m_datatype = dataType;
set_strides();
}
@@ -153,20 +153,20 @@ BuffersIterator<float> MemoryBuffer::iterate_with(Span<MemoryBuffer *> inputs, c
MemoryBuffer *MemoryBuffer::inflate() const
{
BLI_assert(is_a_single_elem());
- MemoryBuffer *inflated = new MemoryBuffer(this->m_datatype, this->m_rect, false);
- inflated->copy_from(this, this->m_rect);
+ MemoryBuffer *inflated = new MemoryBuffer(m_datatype, m_rect, false);
+ inflated->copy_from(this, m_rect);
return inflated;
}
float MemoryBuffer::get_max_value() const
{
- float result = this->m_buffer[0];
+ float result = m_buffer[0];
const unsigned int size = this->buffer_len();
unsigned int i;
- const float *fp_src = this->m_buffer;
+ const float *fp_src = m_buffer;
- for (i = 0; i < size; i++, fp_src += this->m_num_channels) {
+ for (i = 0; i < size; i++, fp_src += m_num_channels) {
float value = *fp_src;
if (value > result) {
result = value;
@@ -181,10 +181,10 @@ float MemoryBuffer::get_max_value(const rcti &rect) const
rcti rect_clamp;
/* first clamp the rect by the bounds or we get un-initialized values */
- BLI_rcti_isect(&rect, &this->m_rect, &rect_clamp);
+ BLI_rcti_isect(&rect, &m_rect, &rect_clamp);
if (!BLI_rcti_is_empty(&rect_clamp)) {
- MemoryBuffer temp_buffer(this->m_datatype, rect_clamp);
+ MemoryBuffer temp_buffer(m_datatype, rect_clamp);
temp_buffer.fill_from(*this);
return temp_buffer.get_max_value();
}
@@ -195,9 +195,9 @@ float MemoryBuffer::get_max_value(const rcti &rect) const
MemoryBuffer::~MemoryBuffer()
{
- if (this->m_buffer && owns_data_) {
- MEM_freeN(this->m_buffer);
- this->m_buffer = nullptr;
+ if (m_buffer && owns_data_) {
+ MEM_freeN(m_buffer);
+ m_buffer = nullptr;
}
}
@@ -398,30 +398,28 @@ void MemoryBuffer::fill(const rcti &area,
void MemoryBuffer::fill_from(const MemoryBuffer &src)
{
rcti overlap;
- overlap.xmin = MAX2(this->m_rect.xmin, src.m_rect.xmin);
- overlap.xmax = MIN2(this->m_rect.xmax, src.m_rect.xmax);
- overlap.ymin = MAX2(this->m_rect.ymin, src.m_rect.ymin);
- overlap.ymax = MIN2(this->m_rect.ymax, src.m_rect.ymax);
+ overlap.xmin = MAX2(m_rect.xmin, src.m_rect.xmin);
+ overlap.xmax = MIN2(m_rect.xmax, src.m_rect.xmax);
+ overlap.ymin = MAX2(m_rect.ymin, src.m_rect.ymin);
+ overlap.ymax = MIN2(m_rect.ymax, src.m_rect.ymax);
copy_from(&src, overlap);
}
void MemoryBuffer::writePixel(int x, int y, const float color[4])
{
- if (x >= this->m_rect.xmin && x < this->m_rect.xmax && y >= this->m_rect.ymin &&
- y < this->m_rect.ymax) {
+ if (x >= m_rect.xmin && x < m_rect.xmax && y >= m_rect.ymin && y < m_rect.ymax) {
const int offset = get_coords_offset(x, y);
- memcpy(&this->m_buffer[offset], color, sizeof(float) * this->m_num_channels);
+ memcpy(&m_buffer[offset], color, sizeof(float) * m_num_channels);
}
}
void MemoryBuffer::addPixel(int x, int y, const float color[4])
{
- if (x >= this->m_rect.xmin && x < this->m_rect.xmax && y >= this->m_rect.ymin &&
- y < this->m_rect.ymax) {
+ if (x >= m_rect.xmin && x < m_rect.xmax && y >= m_rect.ymin && y < m_rect.ymax) {
const int offset = get_coords_offset(x, y);
- float *dst = &this->m_buffer[offset];
+ float *dst = &m_buffer[offset];
const float *src = color;
- for (int i = 0; i < this->m_num_channels; i++, dst++, src++) {
+ for (int i = 0; i < m_num_channels; i++, dst++, src++) {
*dst += *src;
}
}
@@ -436,7 +434,7 @@ static void read_ewa_elem(void *userdata, int x, int y, float result[4])
void MemoryBuffer::read_elem_filtered(
const float x, const float y, float dx[2], float dy[2], float *out) const
{
- BLI_assert(this->m_datatype == DataType::Color);
+ BLI_assert(m_datatype == DataType::Color);
const float deriv[2][2] = {{dx[0], dx[1]}, {dy[0], dy[1]}};
@@ -472,10 +470,10 @@ static void read_ewa_pixel_sampled(void *userdata, int x, int y, float result[4]
void MemoryBuffer::readEWA(float *result, const float uv[2], const float derivatives[2][2])
{
if (m_is_a_single_elem) {
- memcpy(result, m_buffer, sizeof(float) * this->m_num_channels);
+ memcpy(result, m_buffer, sizeof(float) * m_num_channels);
}
else {
- BLI_assert(this->m_datatype == DataType::Color);
+ BLI_assert(m_datatype == DataType::Color);
float inv_width = 1.0f / (float)this->getWidth(), inv_height = 1.0f / (float)this->getHeight();
/* TODO(sergey): Render pipeline uses normalized coordinates and derivatives,
* but compositor uses pixel space. For now let's just divide the values and
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h
index 1eafc42ea69..c0d086e5727 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.h
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.h
@@ -330,12 +330,12 @@ class MemoryBuffer {
uint8_t get_num_channels() const
{
- return this->m_num_channels;
+ return m_num_channels;
}
uint8_t get_elem_bytes_len() const
{
- return this->m_num_channels * sizeof(float);
+ return m_num_channels * sizeof(float);
}
/**
@@ -370,13 +370,13 @@ class MemoryBuffer {
*/
float *getBuffer()
{
- return this->m_buffer;
+ return m_buffer;
}
float *release_ownership_buffer()
{
owns_data_ = false;
- return this->m_buffer;
+ return m_buffer;
}
MemoryBuffer *inflate() const;
@@ -494,15 +494,15 @@ class MemoryBuffer {
bool clip_y = (extend_y == MemoryBufferExtend::Clip && (y < m_rect.ymin || y >= m_rect.ymax));
if (clip_x || clip_y) {
/* clip result outside rect is zero */
- memset(result, 0, this->m_num_channels * sizeof(float));
+ memset(result, 0, m_num_channels * sizeof(float));
}
else {
int u = x;
int v = y;
this->wrap_pixel(u, v, extend_x, extend_y);
const int offset = get_coords_offset(u, v);
- float *buffer = &this->m_buffer[offset];
- memcpy(result, buffer, sizeof(float) * this->m_num_channels);
+ float *buffer = &m_buffer[offset];
+ memcpy(result, buffer, sizeof(float) * m_num_channels);
}
}
@@ -520,11 +520,11 @@ class MemoryBuffer {
const int offset = get_coords_offset(u, v);
BLI_assert(offset >= 0);
- BLI_assert(offset < this->buffer_len() * this->m_num_channels);
+ BLI_assert(offset < this->buffer_len() * m_num_channels);
BLI_assert(!(extend_x == MemoryBufferExtend::Clip && (u < m_rect.xmin || u >= m_rect.xmax)) &&
!(extend_y == MemoryBufferExtend::Clip && (v < m_rect.ymin || v >= m_rect.ymax)));
- float *buffer = &this->m_buffer[offset];
- memcpy(result, buffer, sizeof(float) * this->m_num_channels);
+ float *buffer = &m_buffer[offset];
+ memcpy(result, buffer, sizeof(float) * m_num_channels);
}
void writePixel(int x, int y, const float color[4]);
@@ -540,18 +540,18 @@ class MemoryBuffer {
this->wrap_pixel(u, v, extend_x, extend_y);
if ((extend_x != MemoryBufferExtend::Repeat && (u < 0.0f || u >= getWidth())) ||
(extend_y != MemoryBufferExtend::Repeat && (v < 0.0f || v >= getHeight()))) {
- copy_vn_fl(result, this->m_num_channels, 0.0f);
+ copy_vn_fl(result, m_num_channels, 0.0f);
return;
}
if (m_is_a_single_elem) {
- memcpy(result, m_buffer, sizeof(float) * this->m_num_channels);
+ memcpy(result, m_buffer, sizeof(float) * m_num_channels);
}
else {
- BLI_bilinear_interpolation_wrap_fl(this->m_buffer,
+ BLI_bilinear_interpolation_wrap_fl(m_buffer,
result,
getWidth(),
getHeight(),
- this->m_num_channels,
+ m_num_channels,
u,
v,
extend_x == MemoryBufferExtend::Repeat,
@@ -566,7 +566,7 @@ class MemoryBuffer {
*/
inline bool isTemporarily() const
{
- return this->m_state == MemoryBufferState::Temporary;
+ return m_state == MemoryBufferState::Temporary;
}
void copy_from(const MemoryBuffer *src, const rcti &area);
@@ -632,7 +632,7 @@ class MemoryBuffer {
*/
const rcti &get_rect() const
{
- return this->m_rect;
+ return m_rect;
}
/**
@@ -668,7 +668,7 @@ class MemoryBuffer {
void clear_elem(float *out) const
{
- memset(out, 0, this->m_num_channels * sizeof(float));
+ memset(out, 0, m_num_channels * sizeof(float));
}
template<typename T> T get_relative_x(T x) const
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.cc b/source/blender/compositor/intern/COM_MemoryProxy.cc
index 58dea234ced..6502a8f4b9a 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.cc
+++ b/source/blender/compositor/intern/COM_MemoryProxy.cc
@@ -23,9 +23,9 @@ namespace blender::compositor {
MemoryProxy::MemoryProxy(DataType datatype)
{
- this->m_writeBufferOperation = nullptr;
- this->m_executor = nullptr;
- this->m_datatype = datatype;
+ m_writeBufferOperation = nullptr;
+ m_executor = nullptr;
+ m_datatype = datatype;
}
void MemoryProxy::allocate(unsigned int width, unsigned int height)
@@ -36,14 +36,14 @@ void MemoryProxy::allocate(unsigned int width, unsigned int height)
result.ymin = 0;
result.ymax = height;
- this->m_buffer = new MemoryBuffer(this, result, MemoryBufferState::Default);
+ m_buffer = new MemoryBuffer(this, result, MemoryBufferState::Default);
}
void MemoryProxy::free()
{
- if (this->m_buffer) {
- delete this->m_buffer;
- this->m_buffer = nullptr;
+ if (m_buffer) {
+ delete m_buffer;
+ m_buffer = nullptr;
}
}
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.h b/source/blender/compositor/intern/COM_MemoryProxy.h
index 6814afada74..cae52182f26 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.h
+++ b/source/blender/compositor/intern/COM_MemoryProxy.h
@@ -68,7 +68,7 @@ class MemoryProxy {
*/
void setExecutor(ExecutionGroup *executor)
{
- this->m_executor = executor;
+ m_executor = executor;
}
/**
@@ -76,7 +76,7 @@ class MemoryProxy {
*/
ExecutionGroup *getExecutor() const
{
- return this->m_executor;
+ return m_executor;
}
/**
@@ -85,7 +85,7 @@ class MemoryProxy {
*/
void setWriteBufferOperation(WriteBufferOperation *operation)
{
- this->m_writeBufferOperation = operation;
+ m_writeBufferOperation = operation;
}
/**
@@ -94,7 +94,7 @@ class MemoryProxy {
*/
WriteBufferOperation *getWriteBufferOperation() const
{
- return this->m_writeBufferOperation;
+ return m_writeBufferOperation;
}
/**
@@ -112,12 +112,12 @@ class MemoryProxy {
*/
inline MemoryBuffer *getBuffer()
{
- return this->m_buffer;
+ return m_buffer;
}
inline DataType getDataType()
{
- return this->m_datatype;
+ return m_datatype;
}
#ifdef WITH_CXX_GUARDEDALLOC
diff --git a/source/blender/compositor/intern/COM_Node.h b/source/blender/compositor/intern/COM_Node.h
index 08d0b9a4fd5..76eb03693ae 100644
--- a/source/blender/compositor/intern/COM_Node.h
+++ b/source/blender/compositor/intern/COM_Node.h
@@ -97,7 +97,7 @@ class Node {
*/
void setbNode(bNode *node)
{
- this->m_editorNode = node;
+ m_editorNode = node;
}
/**
@@ -106,7 +106,7 @@ class Node {
*/
void setbNodeTree(bNodeTree *nodetree)
{
- this->m_editorNodeTree = nodetree;
+ m_editorNodeTree = nodetree;
}
/**
@@ -145,7 +145,7 @@ class Node {
*/
void setIsInActiveGroup(bool value)
{
- this->m_inActiveGroup = value;
+ m_inActiveGroup = value;
}
/**
@@ -156,7 +156,7 @@ class Node {
*/
inline bool isInActiveGroup() const
{
- return this->m_inActiveGroup;
+ return m_inActiveGroup;
}
/**
@@ -222,7 +222,7 @@ class NodeInput {
Node *getNode() const
{
- return this->m_node;
+ return m_node;
}
DataType getDataType() const
{
@@ -230,7 +230,7 @@ class NodeInput {
}
bNodeSocket *getbNodeSocket() const
{
- return this->m_editorSocket;
+ return m_editorSocket;
}
void setLink(NodeOutput *link);
@@ -264,7 +264,7 @@ class NodeOutput {
Node *getNode() const
{
- return this->m_node;
+ return m_node;
}
DataType getDataType() const
{
@@ -272,7 +272,7 @@ class NodeOutput {
}
bNodeSocket *getbNodeSocket() const
{
- return this->m_editorSocket;
+ return m_editorSocket;
}
float getEditorValueFloat();
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cc b/source/blender/compositor/intern/COM_NodeOperation.cc
index a34fdd64da9..914842c816c 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.cc
+++ b/source/blender/compositor/intern/COM_NodeOperation.cc
@@ -34,7 +34,7 @@ NodeOperation::NodeOperation()
{
canvas_input_index_ = 0;
canvas_ = COM_AREA_NONE;
- this->m_btree = nullptr;
+ m_btree = nullptr;
}
/** Get constant value when operation is constant, otherwise return default_value. */
@@ -179,22 +179,22 @@ void NodeOperation::initExecution()
void NodeOperation::initMutex()
{
- BLI_mutex_init(&this->m_mutex);
+ BLI_mutex_init(&m_mutex);
}
void NodeOperation::lockMutex()
{
- BLI_mutex_lock(&this->m_mutex);
+ BLI_mutex_lock(&m_mutex);
}
void NodeOperation::unlockMutex()
{
- BLI_mutex_unlock(&this->m_mutex);
+ BLI_mutex_unlock(&m_mutex);
}
void NodeOperation::deinitMutex()
{
- BLI_mutex_end(&this->m_mutex);
+ BLI_mutex_end(&m_mutex);
}
void NodeOperation::deinitExecution()
diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h
index 0483090d8ca..2bdc2bfeb0b 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.h
+++ b/source/blender/compositor/intern/COM_NodeOperation.h
@@ -125,11 +125,11 @@ class NodeOperationInput {
void setResizeMode(ResizeMode resizeMode)
{
- this->m_resizeMode = resizeMode;
+ m_resizeMode = resizeMode;
}
ResizeMode getResizeMode() const
{
- return this->m_resizeMode;
+ return m_resizeMode;
}
SocketReader *getReader();
@@ -442,7 +442,7 @@ class NodeOperation {
void setbNodeTree(const bNodeTree *tree)
{
- this->m_btree = tree;
+ m_btree = tree;
}
void set_execution_system(ExecutionSystem *system)
@@ -561,13 +561,13 @@ class NodeOperation {
inline bool isBraked() const
{
- return this->m_btree->test_break(this->m_btree->tbh);
+ return m_btree->test_break(m_btree->tbh);
}
inline void updateDraw()
{
- if (this->m_btree->update_draw) {
- this->m_btree->update_draw(this->m_btree->udh);
+ if (m_btree->update_draw) {
+ m_btree->update_draw(m_btree->udh);
}
}
diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
index 2801cb401be..151356efb92 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
@@ -753,7 +753,7 @@ static void add_group_operations_recursive(Tags &visited, NodeOperation *op, Exe
ExecutionGroup *NodeOperationBuilder::make_group(NodeOperation *op)
{
- ExecutionGroup *group = new ExecutionGroup(this->m_groups.size());
+ ExecutionGroup *group = new ExecutionGroup(m_groups.size());
m_groups.append(group);
Tags visited;
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cc b/source/blender/compositor/intern/COM_OpenCLDevice.cc
index 815bac4009e..0b52d92e92d 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.cc
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.cc
@@ -42,14 +42,14 @@ OpenCLDevice::OpenCLDevice(cl_context context,
cl_program program,
cl_int vendorId)
{
- this->m_device = device;
- this->m_context = context;
- this->m_program = program;
- this->m_queue = nullptr;
- this->m_vendorID = vendorId;
+ m_device = device;
+ m_context = context;
+ m_program = program;
+ m_queue = nullptr;
+ m_vendorID = vendorId;
cl_int error;
- this->m_queue = clCreateCommandQueue(this->m_context, this->m_device, 0, &error);
+ m_queue = clCreateCommandQueue(m_context, m_device, 0, &error);
}
OpenCLDevice::OpenCLDevice(OpenCLDevice &&other) noexcept
@@ -64,8 +64,8 @@ OpenCLDevice::OpenCLDevice(OpenCLDevice &&other) noexcept
OpenCLDevice::~OpenCLDevice()
{
- if (this->m_queue) {
- clReleaseCommandQueue(this->m_queue);
+ if (m_queue) {
+ clReleaseCommandQueue(m_queue);
}
}
@@ -131,7 +131,7 @@ cl_mem OpenCLDevice::COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel,
const cl_image_format *imageFormat = determineImageFormat(result);
- cl_mem clBuffer = clCreateImage2D(this->m_context,
+ cl_mem clBuffer = clCreateImage2D(m_context,
CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,
imageFormat,
result->getWidth(),
@@ -206,8 +206,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
(size_t)outputMemoryBuffer->getHeight(),
};
- error = clEnqueueNDRangeKernel(
- this->m_queue, kernel, 2, nullptr, size, nullptr, 0, nullptr, nullptr);
+ error = clEnqueueNDRangeKernel(m_queue, kernel, 2, nullptr, size, nullptr, 0, nullptr, nullptr);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
@@ -227,7 +226,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel,
size_t size[2];
cl_int2 offset;
- if (this->m_vendorID == NVIDIA) {
+ if (m_vendorID == NVIDIA) {
localSize = 32;
}
@@ -255,11 +254,11 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel,
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
error = clEnqueueNDRangeKernel(
- this->m_queue, kernel, 2, nullptr, size, nullptr, 0, nullptr, nullptr);
+ m_queue, kernel, 2, nullptr, size, nullptr, 0, nullptr, nullptr);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
- clFlush(this->m_queue);
+ clFlush(m_queue);
if (operation->isBraked()) {
breaked = false;
}
@@ -271,7 +270,7 @@ cl_kernel OpenCLDevice::COM_clCreateKernel(const char *kernelname,
std::list<cl_kernel> *clKernelsToCleanUp)
{
cl_int error;
- cl_kernel kernel = clCreateKernel(this->m_program, kernelname, &error);
+ cl_kernel kernel = clCreateKernel(m_program, kernelname, &error);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.h b/source/blender/compositor/intern/COM_OpenCLDevice.h
index 3de9d01c28c..9c72fa31d95 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.h
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.h
@@ -93,12 +93,12 @@ class OpenCLDevice : public Device {
cl_context getContext()
{
- return this->m_context;
+ return m_context;
}
cl_command_queue getQueue()
{
- return this->m_queue;
+ return m_queue;
}
cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel,
diff --git a/source/blender/compositor/intern/COM_SingleThreadedOperation.cc b/source/blender/compositor/intern/COM_SingleThreadedOperation.cc
index 01be6e1afed..7d7ae0ab155 100644
--- a/source/blender/compositor/intern/COM_SingleThreadedOperation.cc
+++ b/source/blender/compositor/intern/COM_SingleThreadedOperation.cc
@@ -22,7 +22,7 @@ namespace blender::compositor {
SingleThreadedOperation::SingleThreadedOperation()
{
- this->m_cachedInstance = nullptr;
+ m_cachedInstance = nullptr;
flags.complex = true;
flags.single_threaded = true;
}
@@ -34,30 +34,30 @@ void SingleThreadedOperation::initExecution()
void SingleThreadedOperation::executePixel(float output[4], int x, int y, void * /*data*/)
{
- this->m_cachedInstance->readNoCheck(output, x, y);
+ m_cachedInstance->readNoCheck(output, x, y);
}
void SingleThreadedOperation::deinitExecution()
{
deinitMutex();
- if (this->m_cachedInstance) {
- delete this->m_cachedInstance;
- this->m_cachedInstance = nullptr;
+ if (m_cachedInstance) {
+ delete m_cachedInstance;
+ m_cachedInstance = nullptr;
}
}
void *SingleThreadedOperation::initializeTileData(rcti *rect)
{
- if (this->m_cachedInstance) {
- return this->m_cachedInstance;
+ if (m_cachedInstance) {
+ return m_cachedInstance;
}
lockMutex();
- if (this->m_cachedInstance == nullptr) {
+ if (m_cachedInstance == nullptr) {
//
- this->m_cachedInstance = createMemoryBuffer(rect);
+ m_cachedInstance = createMemoryBuffer(rect);
}
unlockMutex();
- return this->m_cachedInstance;
+ return m_cachedInstance;
}
} // namespace blender::compositor
diff --git a/source/blender/compositor/intern/COM_SingleThreadedOperation.h b/source/blender/compositor/intern/COM_SingleThreadedOperation.h
index 9945f938ff9..ac81b495d6f 100644
--- a/source/blender/compositor/intern/COM_SingleThreadedOperation.h
+++ b/source/blender/compositor/intern/COM_SingleThreadedOperation.h
@@ -29,7 +29,7 @@ class SingleThreadedOperation : public NodeOperation {
protected:
inline bool isCached()
{
- return this->m_cachedInstance != nullptr;
+ return m_cachedInstance != nullptr;
}
public: