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:
authorMonique Dewanchand <m.dewanchand@atmind.nl>2012-06-01 14:20:24 +0400
committerMonique Dewanchand <m.dewanchand@atmind.nl>2012-06-01 14:20:24 +0400
commit285a24b3e07b3441e98a0a502c42af50b9738f3a (patch)
tree8b767dd73e3d5317c29f07621663fb8f0d4cf3f5 /source/blender/compositor/intern/COM_MemoryProxy.cpp
parenta78dca27a22d1d434dcde6d589cc7969c5039565 (diff)
Replaced tile based memory manager with a single aligned buffer
- should increase speed with large node setups - enables caching of buffers in the node editor (in the future) - OpenCL part still needs some work
Diffstat (limited to 'source/blender/compositor/intern/COM_MemoryProxy.cpp')
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.cpp b/source/blender/compositor/intern/COM_MemoryProxy.cpp
index 7ff4f4949f0..15df11a77d1 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.cpp
+++ b/source/blender/compositor/intern/COM_MemoryProxy.cpp
@@ -25,15 +25,26 @@
MemoryProxy::MemoryProxy()
{
- this->state = NULL;
this->writeBufferOperation = NULL;
this->executor = NULL;
}
-MemoryProxy::~MemoryProxy()
+void MemoryProxy::allocate(unsigned int width, unsigned int height)
{
- if (this->state) {
- delete this->state;
- this->state = NULL;
+ rcti result;
+ result.xmin = 0;
+ result.xmax = width;
+ result.ymin = 0;
+ result.ymax = height;
+
+ buffer = new MemoryBuffer(this, &result);
+}
+
+void MemoryProxy::free()
+{
+ if (buffer) {
+ delete buffer;
+ buffer = NULL;
}
}
+