From 285a24b3e07b3441e98a0a502c42af50b9738f3a Mon Sep 17 00:00:00 2001 From: Monique Dewanchand Date: Fri, 1 Jun 2012 10:20:24 +0000 Subject: 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 --- source/blender/compositor/intern/COM_MemoryProxy.h | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'source/blender/compositor/intern/COM_MemoryProxy.h') diff --git a/source/blender/compositor/intern/COM_MemoryProxy.h b/source/blender/compositor/intern/COM_MemoryProxy.h index 276ebeed1e2..e0ac72de0d3 100644 --- a/source/blender/compositor/intern/COM_MemoryProxy.h +++ b/source/blender/compositor/intern/COM_MemoryProxy.h @@ -26,7 +26,6 @@ class MemoryProxy; #ifndef _COM_MemoryProxy_h #define _COM_MemoryProxy_h #include "COM_ExecutionGroup.h" -#include "COM_MemoryManagerState.h" class ExecutionGroup; @@ -48,12 +47,6 @@ private: */ ExecutionGroup *executor; - /** - * @brief data of the different chunks. - * @note state is part of this class due to optimization in the MemoryManager - */ - MemoryManagerState * state; - /** * @brief datatype of this MemoryProxy */ @@ -63,9 +56,14 @@ private: * @brief channel information of this buffer */ ChannelInfo channelInfo[COM_NUMBER_OF_CHANNELS]; + + /** + * @brief the allocated memory + */ + MemoryBuffer* buffer; + public: MemoryProxy(); - ~MemoryProxy(); /** * @brief set the ExecutionGroup that can be scheduled to calculate a certain chunk. @@ -89,18 +87,21 @@ public: * @return WriteBufferOperation */ WriteBufferOperation *getWriteBufferOperation() {return this->writeBufferOperation;} - + /** - * @brief set the memorymanager state of this MemoryProxy, this is set from the MemoryManager - * @param state the state to set + * @brief allocate memory of size widht x height */ - void setState(MemoryManagerState *state) {this->state = state;} - + void allocate(unsigned int width, unsigned int height); + + /** + * @brief free the allocated memory + */ + void free(); + /** - * @brief get the state of this MemoryProxy - * @return MemoryManagerState reference to the state of this MemoryProxy. + * @brief get the allocated memory */ - MemoryManagerState *getState() {return this->state;} + inline MemoryBuffer* getBuffer() {return this->buffer;} }; #endif -- cgit v1.2.3