Blender  V3.3
COM_SingleThreadedOperation.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. */
3 
5 
6 namespace blender::compositor {
7 
9 {
10  cached_instance_ = nullptr;
11  flags_.complex = true;
12  flags_.single_threaded = true;
13 }
14 
16 {
17  init_mutex();
18 }
19 
20 void SingleThreadedOperation::execute_pixel(float output[4], int x, int y, void * /*data*/)
21 {
22  cached_instance_->read_no_check(output, x, y);
23 }
24 
26 {
27  deinit_mutex();
28  if (cached_instance_) {
29  delete cached_instance_;
30  cached_instance_ = nullptr;
31  }
32 }
34 {
35  if (cached_instance_) {
36  return cached_instance_;
37  }
38 
39  lock_mutex();
40  if (cached_instance_ == nullptr) {
41  //
42  cached_instance_ = create_memory_buffer(rect);
43  }
44  unlock_mutex();
45  return cached_instance_;
46 }
47 
48 } // 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
void read_no_check(float *result, int x, int y, MemoryBufferExtend extend_x=MemoryBufferExtend::Clip, MemoryBufferExtend extend_y=MemoryBufferExtend::Clip)
void execute_pixel(float output[4], int x, int y, void *data) override
virtual MemoryBuffer * create_memory_buffer(rcti *rect)=0
ccl_global KernelShaderEvalInput ccl_global float * output