dcb81a434d
The Flip node produces artifacts if not connected directly to an input.
This due to a wrong calculation of depending area of interest, which is
a regressed introduced in 70a8a9e.
This is fixed by reverting the removal of the area of interest
calculation method in the aforementioned commit.
Pull Request: https://projects.blender.org/blender/blender/pulls/120149
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
/* SPDX-FileCopyrightText: 2011 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
#include "COM_MultiThreadedOperation.h"
|
|
|
|
namespace blender::compositor {
|
|
|
|
class FlipOperation : public MultiThreadedOperation {
|
|
private:
|
|
SocketReader *input_operation_;
|
|
bool flip_x_;
|
|
bool flip_y_;
|
|
|
|
public:
|
|
FlipOperation();
|
|
bool determine_depending_area_of_interest(rcti *input,
|
|
ReadBufferOperation *read_operation,
|
|
rcti *output) override;
|
|
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override;
|
|
|
|
void init_execution() override;
|
|
void deinit_execution() override;
|
|
void setFlipX(bool flipX)
|
|
{
|
|
flip_x_ = flipX;
|
|
}
|
|
void setFlipY(bool flipY)
|
|
{
|
|
flip_y_ = flipY;
|
|
}
|
|
|
|
void update_memory_buffer_partial(MemoryBuffer *output,
|
|
const rcti &area,
|
|
Span<MemoryBuffer *> inputs) override;
|
|
};
|
|
|
|
} // namespace blender::compositor
|