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:
Diffstat (limited to 'source/blender/compositor/intern/COM_MemoryBuffer.cpp')
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index b88d42ea8d0..90f6d4a738d 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -141,6 +141,16 @@ void MemoryBuffer::writePixel(int x, int y, const float color[4])
}
}
+void MemoryBuffer::addPixel(int x, int y, const float color[4])
+{
+ if (x >= this->rect.xmin && x < this->rect.xmax &&
+ y >= this->rect.ymin && y < this->rect.ymax)
+ {
+ const int offset = (this->chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
+ add_v4_v4(&this->buffer[offset], color);
+ }
+}
+
void MemoryBuffer::readCubic(float result[4], float x, float y)
{
int x1 = floor(x);