Blender  V3.3
COM_MemoryProxy.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. */
3 
4 #pragma once
5 
6 #ifdef WITH_CXX_GUARDEDALLOC
7 # include "MEM_guardedalloc.h"
8 #endif
9 
10 #include "COM_defines.h"
11 
12 namespace blender::compositor {
13 
14 /* Forward declarations. */
15 class MemoryBuffer;
16 class ExecutionGroup;
17 class WriteBufferOperation;
18 
25 class MemoryProxy {
26  private:
30  WriteBufferOperation *write_buffer_operation_;
31 
35  ExecutionGroup *executor_;
36 
40  MemoryBuffer *buffer_;
41 
45  DataType datatype_;
46 
47  public:
49 
54  void set_executor(ExecutionGroup *executor)
55  {
56  executor_ = executor;
57  }
58 
63  {
64  return executor_;
65  }
66 
72  {
73  write_buffer_operation_ = operation;
74  }
75 
81  {
82  return write_buffer_operation_;
83  }
84 
88  void allocate(unsigned int width, unsigned int height);
89 
93  void free();
94 
99  {
100  return buffer_;
101  }
102 
104  {
105  return datatype_;
106  }
107 
108 #ifdef WITH_CXX_GUARDEDALLOC
109  MEM_CXX_CLASS_ALLOC_FUNCS("COM:MemoryProxy")
110 #endif
111 };
112 
113 } // namespace blender::compositor
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_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 type
_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 GLsizei width
Read Guarded memory(de)allocation.
Class ExecutionGroup is a group of Operations that are executed as one. This grouping is used to comb...
a MemoryBuffer contains access to the data of a chunk
A MemoryProxy is a unique identifier for a memory buffer. A single MemoryProxy is used among all chun...
void free()
free the allocated memory
void set_executor(ExecutionGroup *executor)
set the ExecutionGroup that can be scheduled to calculate a certain chunk.
ExecutionGroup * get_executor() const
get the ExecutionGroup that can be scheduled to calculate a certain chunk.
WriteBufferOperation * get_write_buffer_operation() const
get the WriteBufferOperation that is responsible for writing to this MemoryProxy
void allocate(unsigned int width, unsigned int height)
allocate memory of size width x height
void set_write_buffer_operation(WriteBufferOperation *operation)
set the WriteBufferOperation that is responsible for writing to this MemoryProxy
MemoryBuffer * get_buffer()
get the allocated memory
DataType
possible data types for sockets
Definition: COM_defines.h:30