[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45765] branches/tile/source/blender/ compositor/intern: TileBranch
Jeroen Bakker
j.bakker at atmind.nl
Wed Apr 18 22:29:54 CEST 2012
Revision: 45765
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45765
Author: jbakker
Date: 2012-04-18 20:29:54 +0000 (Wed, 18 Apr 2012)
Log Message:
-----------
TileBranch
* cleaned up whitespaces of compositor/intern
Modified Paths:
--------------
branches/tile/source/blender/compositor/intern/COM_ChunkOrder.cpp
branches/tile/source/blender/compositor/intern/COM_ChunkOrder.h
branches/tile/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
branches/tile/source/blender/compositor/intern/COM_ChunkOrderHotspot.h
branches/tile/source/blender/compositor/intern/COM_Converter.h
branches/tile/source/blender/compositor/intern/COM_ExecutionGroup.h
branches/tile/source/blender/compositor/intern/COM_ExecutionSystem.h
branches/tile/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
branches/tile/source/blender/compositor/intern/COM_ExecutionSystemHelper.h
branches/tile/source/blender/compositor/intern/COM_InputSocket.cpp
branches/tile/source/blender/compositor/intern/COM_InputSocket.h
branches/tile/source/blender/compositor/intern/COM_MemoryBuffer.h
branches/tile/source/blender/compositor/intern/COM_MemoryManager.cpp
branches/tile/source/blender/compositor/intern/COM_MemoryManager.h
branches/tile/source/blender/compositor/intern/COM_MemoryManagerState.cpp
branches/tile/source/blender/compositor/intern/COM_MemoryManagerState.h
branches/tile/source/blender/compositor/intern/COM_MemoryProxy.h
branches/tile/source/blender/compositor/intern/COM_Node.cpp
branches/tile/source/blender/compositor/intern/COM_Node.h
branches/tile/source/blender/compositor/intern/COM_NodeBase.cpp
branches/tile/source/blender/compositor/intern/COM_NodeBase.h
branches/tile/source/blender/compositor/intern/COM_NodeOperation.cpp
branches/tile/source/blender/compositor/intern/COM_OpenCLDevice.h
branches/tile/source/blender/compositor/intern/COM_OutputSocket.cpp
branches/tile/source/blender/compositor/intern/COM_OutputSocket.h
branches/tile/source/blender/compositor/intern/COM_Socket.cpp
branches/tile/source/blender/compositor/intern/COM_Socket.h
branches/tile/source/blender/compositor/intern/COM_SocketConnection.h
branches/tile/source/blender/compositor/intern/COM_SocketReader.h
Modified: branches/tile/source/blender/compositor/intern/COM_ChunkOrder.cpp
===================================================================
--- branches/tile/source/blender/compositor/intern/COM_ChunkOrder.cpp 2012-04-18 20:07:35 UTC (rev 45764)
+++ branches/tile/source/blender/compositor/intern/COM_ChunkOrder.cpp 2012-04-18 20:29:54 UTC (rev 45765)
@@ -24,25 +24,25 @@
#include "BLI_math.h"
ChunkOrder::ChunkOrder() {
- this->distance = 0.0;
+ this->distance = 0.0;
this->number = 0;
- this->x = 0;
- this->y = 0;
+ this->x = 0;
+ this->y = 0;
}
void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots) {
- unsigned int index;
- double distance = MAXFLOAT;
- for (index = 0 ; index < numberOfHotspots ; index ++) {
+ unsigned int index;
+ double distance = MAXFLOAT;
+ for (index = 0 ; index < numberOfHotspots ; index ++) {
ChunkOrderHotspot* hotspot = hotspots[index];
- double ndistance = hotspot->determineDistance(this->x, this->y);
- if (ndistance < distance) {
- distance = ndistance;
- }
- }
- this->distance = distance;
+ double ndistance = hotspot->determineDistance(this->x, this->y);
+ if (ndistance < distance) {
+ distance = ndistance;
+ }
+ }
+ this->distance = distance;
}
bool operator<(const ChunkOrder& a, const ChunkOrder& b) {
- return a.distance < b.distance;
+ return a.distance < b.distance;
}
Modified: branches/tile/source/blender/compositor/intern/COM_ChunkOrder.h
===================================================================
--- branches/tile/source/blender/compositor/intern/COM_ChunkOrder.h 2012-04-18 20:07:35 UTC (rev 45764)
+++ branches/tile/source/blender/compositor/intern/COM_ChunkOrder.h 2012-04-18 20:29:54 UTC (rev 45765)
@@ -27,21 +27,19 @@
class ChunkOrder {
private:
unsigned int number;
- int x;
- int y;
- double distance;
+ int x;
+ int y;
+ double distance;
public:
ChunkOrder();
void determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots);
friend bool operator<(const ChunkOrder& a, const ChunkOrder& b);
-
+
void setChunkNumber(unsigned int chunknumber) {this->number = chunknumber;}
- void setX(int x) {this->x = x;}
- void setY(int y) {this->y = y;}
+ void setX(int x) {this->x = x;}
+ void setY(int y) {this->y = y;}
unsigned int getChunkNumber() {return this->number;}
- double getDistance() {return this->distance;}
-
-
+ double getDistance() {return this->distance;}
};
#endif
Modified: branches/tile/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
===================================================================
--- branches/tile/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp 2012-04-18 20:07:35 UTC (rev 45764)
+++ branches/tile/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp 2012-04-18 20:29:54 UTC (rev 45765)
@@ -24,15 +24,15 @@
#include <math.h>
ChunkOrderHotspot::ChunkOrderHotspot(int x, int y, float addition) {
- this->x = x;
- this->y = y;
- this->addition = addition;
+ this->x = x;
+ this->y = y;
+ this->addition = addition;
}
double ChunkOrderHotspot::determineDistance(int x, int y) {
- int dx = x-this->x;
- int dy = y-this->y;
- double result = sqrt((double)(dx*dx+dy*dy));
- result += this->addition;
- return result;
+ int dx = x-this->x;
+ int dy = y-this->y;
+ double result = sqrt((double)(dx*dx+dy*dy));
+ result += this->addition;
+ return result;
}
Modified: branches/tile/source/blender/compositor/intern/COM_ChunkOrderHotspot.h
===================================================================
--- branches/tile/source/blender/compositor/intern/COM_ChunkOrderHotspot.h 2012-04-18 20:07:35 UTC (rev 45764)
+++ branches/tile/source/blender/compositor/intern/COM_ChunkOrderHotspot.h 2012-04-18 20:29:54 UTC (rev 45765)
@@ -25,13 +25,13 @@
class ChunkOrderHotspot {
private:
- int x;
- int y;
- float addition;
+ int x;
+ int y;
+ float addition;
public:
ChunkOrderHotspot(int x, int y, float addition);
- double determineDistance(int x, int y);
+ double determineDistance(int x, int y);
};
#endif
Modified: branches/tile/source/blender/compositor/intern/COM_Converter.h
===================================================================
--- branches/tile/source/blender/compositor/intern/COM_Converter.h 2012-04-18 20:07:35 UTC (rev 45764)
+++ branches/tile/source/blender/compositor/intern/COM_Converter.h 2012-04-18 20:29:54 UTC (rev 45765)
@@ -31,36 +31,36 @@
*/
class Converter {
public:
- /**
+ /**
* @brief Convert/wraps a bNode in its Node instance.
*
* For all nodetypes a wrapper class is created.
* Muted nodes are wrapped with MuteNode.
*
* @note When adding a new node to blender, this method needs to be changed to return the correct Node instance.
- *
- * @see Node
+ *
+ * @see Node
* @see MuteNode
- */
+ */
static Node* convert(bNode* bNode);
-
- /**
+
+ /**
* @brief This method will add a datetype conversion rule when the to-socket does not support the from-socket actual data type.
*
* @note this method is called when conversion is needed.
*
* @param connection the SocketConnection what needs conversion
* @param system the ExecutionSystem to add the conversion to.
- * @see SocketConnection - a link between two sockets
- */
+ * @see SocketConnection - a link between two sockets
+ */
static void convertDataType(SocketConnection* connection, ExecutionSystem *system);
-
+
/**
* @brief This method will add a resolution rule based on the settings of the InputSocket.
*
* @note Conversion logic is implemented in this method
* @see InputSocketResizeMode for the possible conversions.
-
+
* @param connection the SocketConnection what needs conversion
* @param system the ExecutionSystem to add the conversion to.
* @see SocketConnection - a link between two sockets
Modified: branches/tile/source/blender/compositor/intern/COM_ExecutionGroup.h
===================================================================
--- branches/tile/source/blender/compositor/intern/COM_ExecutionGroup.h 2012-04-18 20:07:35 UTC (rev 45764)
+++ branches/tile/source/blender/compositor/intern/COM_ExecutionGroup.h 2012-04-18 20:29:54 UTC (rev 45765)
@@ -62,94 +62,94 @@
*/
class ExecutionGroup {
private:
- // fields
+ // fields
/**
* @brief unique identifier of this node.
*/
string id;
-
+
/**
* @brief list of operations in this ExecutionGroup
*/
- vector<NodeOperation*> operations;
-
+ vector<NodeOperation*> operations;
+
/**
* @brief is this ExecutionGroup an input ExecutionGroup
* an input execution group is a group that is at the end of the calculation (the output is important for the user)
*/
- int isOutput;
-
+ int isOutput;
+
/**
* @brief Width of the output
*/
unsigned int width;
-
+
/**
* @brief Height of the output
*/
unsigned int height;
-
+
/**
* @brief size of a single chunk, being Width or of height
* a chunk is always a square, except at the edges of the MemoryBuffer
*/
unsigned int chunkSize;
-
+
/**
* @brief number of chunks in the x-axis
*/
unsigned int numberOfXChunks;
-
+
/**
* @brief number of chunks in the y-axis
*/
unsigned int numberOfYChunks;
-
+
/**
* @brief total number of chunks
*/
unsigned int numberOfChunks;
-
+
/**
* @brief contains this ExecutionGroup a complex NodeOperation.
*/
bool complex;
-
+
/**
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice
*/
bool openCL;
-
+
/**
* @brief what is the maximum number field of all ReadBufferOperation in this ExecutionGroup.
* @note this is used to construct the MemoryBuffers that will be passed during execution.
*/
unsigned int cachedMaxReadBufferOffset;
-
+
/**
* @brief a cached vector of all read operations in the execution group.
*/
- vector<NodeOperation*> cachedReadOperations;
-
- /**
+ vector<NodeOperation*> cachedReadOperations;
+
+ /**
* @brief reference to the original bNodeTree, this field is only set for the 'top' execution group.
* @note can only be used to call the callbacks for progress, status and break
- */
+ */
const bNodeTree * bTree;
-
+
/**
* @brief total number of chunks that have been calculated for this ExecutionGroup
*/
unsigned int chunksFinished;
-
- /**
+
+ /**
* @brief the chunkExecutionStates holds per chunk the execution state. this state can be
* - COM_ES_NOT_SCHEDULED: not scheduled
* - COM_ES_SCHEDULED: scheduled
* - COM_ES_EXECUTED: executed
- */
+ */
ChunkExecutionState *chunkExecutionStates;
-
+
/**
* @brief indicator when this ExecutionGroup has valid NodeOperations in its vector for Execution
* @note When building the ExecutionGroup NodeOperations are added via recursion. First a WriteBufferOperations is added, then the
@@ -157,45 +157,45 @@
* @note When this occurs, these settings are copied over from the node to the ExecutionGroup
* @note and the Initialized flag is set to true.
* @see complex
- * @see openCL
+ * @see openCL
*/
- bool initialized;
-
- // methods
+ bool initialized;
+
+ // methods
/**
* @brief check whether parameter operation can be added to the execution group
* @param operation the operation to be added
*/
- bool canContainOperation(NodeOperation* operation);
-
+ bool canContainOperation(NodeOperation* operation);
+
/**
* @brief get the Render priority of this ExecutionGroup
* @see ExecutionSystem.execute
*/
int getRenderPriotrity();
-
- /**
+
+ /**
* @brief calculate the actual chunk size of this execution group.
* @note A chunk size is an unsigned int that is both the height and width of a chunk.
* @note The chunk size will not be stored in the chunkSize field. This needs to be done
* @note by the calling method.
- */
+ */
unsigned int determineChunkSize();
-
-
+
+
/**
* @brief Determine the rect (minx, maxx, miny, maxy) of a chunk at a position.
* @note Only gives usefull results ater the determination of the chunksize
* @see determineChunkSize()
*/
void determineChunkRect(rcti* rect, const unsigned int xChunk, const unsigned int yChunk) const;
-
- /**
+
+ /**
* @brief determine the number of chunks, based on the chunkSize, width and height.
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list