Blender  V2.93
COM_DilateErodeOperation.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2011, Blender Foundation.
17  */
18 
19 #pragma once
20 
21 #include "COM_NodeOperation.h"
22 
23 namespace blender::compositor {
24 
26  private:
30  SocketReader *m_inputProgram;
31 
32  float m_distance;
33  float m__switch;
34  float m_inset;
35 
40  int m_scope;
41 
42  public:
44 
48  void executePixel(float output[4], int x, int y, void *data) override;
49 
53  void initExecution() override;
54 
55  void *initializeTileData(rcti *rect) override;
59  void deinitExecution() override;
60 
61  void setDistance(float distance)
62  {
63  this->m_distance = distance;
64  }
65  void setSwitch(float sw)
66  {
67  this->m__switch = sw;
68  }
69  void setInset(float inset)
70  {
71  this->m_inset = inset;
72  }
73 
75  ReadBufferOperation *readOperation,
76  rcti *output) override;
77 };
78 
80  private:
81  protected:
86  float m_distance;
87  int m_scope;
88 
89  public:
91 
95  void executePixel(float output[4], int x, int y, void *data) override;
96 
100  void initExecution() override;
101 
102  void *initializeTileData(rcti *rect) override;
106  void deinitExecution() override;
107 
108  void setDistance(float distance)
109  {
110  this->m_distance = distance;
111  }
113  ReadBufferOperation *readOperation,
114  rcti *output) override;
115 
116  void executeOpenCL(OpenCLDevice *device,
117  MemoryBuffer *outputMemoryBuffer,
118  cl_mem clOutputBuffer,
119  MemoryBuffer **inputMemoryBuffers,
120  std::list<cl_mem> *clMemToCleanUp,
121  std::list<cl_kernel> *clKernelsToCleanUp) override;
122 };
124  public:
126 
130  void executePixel(float output[4], int x, int y, void *data) override;
131 
132  void executeOpenCL(OpenCLDevice *device,
133  MemoryBuffer *outputMemoryBuffer,
134  cl_mem clOutputBuffer,
135  MemoryBuffer **inputMemoryBuffers,
136  std::list<cl_mem> *clMemToCleanUp,
137  std::list<cl_kernel> *clKernelsToCleanUp) override;
138 };
139 
141  protected:
146 
148 
149  public:
151 
155  void executePixel(float output[4], int x, int y, void *data) override;
156 
160  void initExecution() override;
161 
162  void *initializeTileData(rcti *rect) override;
166  void deinitExecution() override;
167  void deinitializeTileData(rcti *rect, void *data) override;
168 
169  void setIterations(int iterations)
170  {
171  this->m_iterations = iterations;
172  }
173 
175  ReadBufferOperation *readOperation,
176  rcti *output) override;
177 };
178 
180  public:
182 
183  void *initializeTileData(rcti *rect) override;
184 };
185 
186 } // namespace blender::compositor
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define output
void executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, std::list< cl_mem > *clMemToCleanUp, std::list< cl_kernel > *clKernelsToCleanUp) override
custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevic...
void executePixel(float output[4], int x, int y, void *data) override
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) override
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) override
void executePixel(float output[4], int x, int y, void *data) override
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) override
void deinitializeTileData(rcti *rect, void *data) override
void executePixel(float output[4], int x, int y, void *data) override
void executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, std::list< cl_mem > *clMemToCleanUp, std::list< cl_kernel > *clKernelsToCleanUp) override
custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevic...
void executePixel(float output[4], int x, int y, void *data) override
a MemoryBuffer contains access to the data of a chunk
NodeOperation contains calculation logic.
device representing an GPU OpenCL device. an instance of this class represents a single cl_device
ccl_device_inline float distance(const float2 &a, const float2 &b)