[Bf-blender-cvs] [a01e7d62c58] draw-colormanagement: Style: Rename processor arguments in C api and glsl impl.
Clément Foucault
noreply at git.blender.org
Tue Feb 11 15:10:18 CET 2020
Commit: a01e7d62c58d31dc9aded0fd6a11e2cf798ee2ea
Author: Clément Foucault
Date: Tue Feb 11 14:52:09 2020 +0100
Branches: draw-colormanagement
https://developer.blender.org/rBa01e7d62c58d31dc9aded0fd6a11e2cf798ee2ea
Style: Rename processor arguments in C api and glsl impl.
===================================================================
M intern/opencolorio/fallback_impl.cc
M intern/opencolorio/ocio_capi.cc
M intern/opencolorio/ocio_capi.h
M intern/opencolorio/ocio_impl.h
M intern/opencolorio/ocio_impl_glsl.cc
===================================================================
diff --git a/intern/opencolorio/fallback_impl.cc b/intern/opencolorio/fallback_impl.cc
index 8174714520f..8dc95d22233 100644
--- a/intern/opencolorio/fallback_impl.cc
+++ b/intern/opencolorio/fallback_impl.cc
@@ -695,8 +695,8 @@ bool FallbackImpl::supportGLSLDraw(void)
}
bool FallbackImpl::setupGLSLDraw(struct OCIO_GLSLDrawState ** /*state_r*/,
- OCIO_ConstProcessorRcPtr * /*processor*/,
- OCIO_ConstProcessorRcPtr * /*processor_display*/,
+ OCIO_ConstProcessorRcPtr * /*ocio_processor_scene_to_ui*/,
+ OCIO_ConstProcessorRcPtr * /*ocio_processor_ui_to_display*/,
OCIO_CurveMappingSettings * /*curve_mapping_settings*/,
float /*dither*/,
bool /*predivide*/,
diff --git a/intern/opencolorio/ocio_capi.cc b/intern/opencolorio/ocio_capi.cc
index 74f692e12c3..84c36de364c 100644
--- a/intern/opencolorio/ocio_capi.cc
+++ b/intern/opencolorio/ocio_capi.cc
@@ -385,15 +385,20 @@ int OCIO_supportGLSLDraw(void)
}
int OCIO_setupGLSLDraw(struct OCIO_GLSLDrawState **state_r,
- OCIO_ConstProcessorRcPtr *processor,
- OCIO_ConstProcessorRcPtr *processor_display,
+ OCIO_ConstProcessorRcPtr *ocio_processor_scene_to_ui,
+ OCIO_ConstProcessorRcPtr *ocio_processor_ui_to_display,
OCIO_CurveMappingSettings *curve_mapping_settings,
float dither,
bool predivide,
bool overlay)
{
- return (int)impl->setupGLSLDraw(
- state_r, processor, processor_display, curve_mapping_settings, dither, predivide, overlay);
+ return (int)impl->setupGLSLDraw(state_r,
+ ocio_processor_scene_to_ui,
+ ocio_processor_ui_to_display,
+ curve_mapping_settings,
+ dither,
+ predivide,
+ overlay);
}
void OCIO_finishGLSLDraw(struct OCIO_GLSLDrawState *state)
diff --git a/intern/opencolorio/ocio_capi.h b/intern/opencolorio/ocio_capi.h
index 804b677e397..57799222788 100644
--- a/intern/opencolorio/ocio_capi.h
+++ b/intern/opencolorio/ocio_capi.h
@@ -223,8 +223,8 @@ void OCIO_matrixTransformScale(float *m44, float *offset4, const float *scale4);
int OCIO_supportGLSLDraw(void);
int OCIO_setupGLSLDraw(struct OCIO_GLSLDrawState **state_r,
- OCIO_ConstProcessorRcPtr *processor,
- OCIO_ConstProcessorRcPtr *processor_display,
+ OCIO_ConstProcessorRcPtr *ocio_processor_scene_to_ui,
+ OCIO_ConstProcessorRcPtr *ocio_processor_ui_to_display,
OCIO_CurveMappingSettings *curve_mapping_settings,
float dither,
bool predivide,
diff --git a/intern/opencolorio/ocio_impl.h b/intern/opencolorio/ocio_impl.h
index 2ca0521a924..3ffc0a4a475 100644
--- a/intern/opencolorio/ocio_impl.h
+++ b/intern/opencolorio/ocio_impl.h
@@ -142,8 +142,8 @@ class IOCIOImpl {
virtual bool supportGLSLDraw(void) = 0;
virtual bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r,
- OCIO_ConstProcessorRcPtr *processor,
- OCIO_ConstProcessorRcPtr *processor_display,
+ OCIO_ConstProcessorRcPtr *ocio_processor_scene_to_ui,
+ OCIO_ConstProcessorRcPtr *ocio_processor_ui_to_display,
OCIO_CurveMappingSettings *curve_mapping_settings,
float dither,
bool predivide,
@@ -264,8 +264,8 @@ class FallbackImpl : public IOCIOImpl {
bool supportGLSLDraw(void);
bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r,
- OCIO_ConstProcessorRcPtr *processor,
- OCIO_ConstProcessorRcPtr *processor_display,
+ OCIO_ConstProcessorRcPtr *ocio_processor_scene_to_ui,
+ OCIO_ConstProcessorRcPtr *ocio_processor_ui_to_display,
OCIO_CurveMappingSettings *curve_mapping_settings,
float dither,
bool predivide,
@@ -385,8 +385,8 @@ class OCIOImpl : public IOCIOImpl {
bool supportGLSLDraw(void);
bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r,
- OCIO_ConstProcessorRcPtr *processor,
- OCIO_ConstProcessorRcPtr *processor_display,
+ OCIO_ConstProcessorRcPtr *ocio_processor_scene_to_ui,
+ OCIO_ConstProcessorRcPtr *ocio_processor_ui_to_display,
OCIO_CurveMappingSettings *curve_mapping_settings,
float dither,
bool predivide,
diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
index 8d4a2376e2a..df6adc8f34b 100644
--- a/intern/opencolorio/ocio_impl_glsl.cc
+++ b/intern/opencolorio/ocio_impl_glsl.cc
@@ -203,8 +203,8 @@ static GLuint linkShaders(GLuint frag, GLuint vert)
}
static void updateGLSLShader(OCIO_GLSLShader *shader,
- ConstProcessorRcPtr *ocio_processor,
- ConstProcessorRcPtr *ocio_processor_display,
+ ConstProcessorRcPtr *processor_scene_to_ui,
+ ConstProcessorRcPtr *processpr_ui_to_display,
GpuShaderDesc *shader_desc,
const std::string &cache_id)
{
@@ -240,10 +240,10 @@ static void updateGLSLShader(OCIO_GLSLShader *shader,
os << "#define texture3D texture\n";
shader_desc->setFunctionName("OCIO_to_display_linear_with_look");
- os << (*ocio_processor)->getGpuShaderText(*shader_desc) << "\n";
+ os << (*processor_scene_to_ui)->getGpuShaderText(*shader_desc) << "\n";
shader_desc->setFunctionName("OCIO_to_display_encoded");
- os << (*ocio_processor_display)->getGpuShaderText(*shader_desc) << "\n";
+ os << (*processpr_ui_to_display)->getGpuShaderText(*shader_desc) << "\n";
os << datatoc_gpu_shader_display_transform_glsl;
@@ -283,8 +283,8 @@ static void updateGLSLShader(OCIO_GLSLShader *shader,
}
static void ensureGLSLShader(OCIO_GLSLShader **shader_ptr,
- ConstProcessorRcPtr *ocio_processor,
- ConstProcessorRcPtr *ocio_processor_display,
+ ConstProcessorRcPtr *processor_scene_to_ui,
+ ConstProcessorRcPtr *processpr_ui_to_display,
GpuShaderDesc *shader_desc,
const std::string &cache_id)
{
@@ -294,7 +294,7 @@ static void ensureGLSLShader(OCIO_GLSLShader **shader_ptr,
OCIO_GLSLShader *shader = OBJECT_GUARDED_NEW(OCIO_GLSLShader);
- updateGLSLShader(shader, ocio_processor, ocio_processor_display, shader_desc, cache_id);
+ updateGLSLShader(shader, processor_scene_to_ui, processpr_ui_to_display, shader_desc, cache_id);
*shader_ptr = shader;
}
@@ -319,8 +319,8 @@ static void freeGLSLShader(OCIO_GLSLShader *shader)
* \{ */
static void updateGLSLLut3d(OCIO_GLSLLut3d *lut3d,
- ConstProcessorRcPtr *ocio_processor,
- ConstProcessorRcPtr *ocio_processor_display,
+ ConstProcessorRcPtr *processor_scene_to_ui,
+ ConstProcessorRcPtr *processpr_ui_to_display,
GpuShaderDesc *shader_desc,
const std::string &cache_id)
{
@@ -329,7 +329,7 @@ static void updateGLSLLut3d(OCIO_GLSLLut3d *lut3d,
float *lut_data = (float *)MEM_mallocN(LUT3D_TEXTURE_SIZE, __func__);
- ConstProcessorRcPtr *ocio_processors[2] = {ocio_processor, ocio_processor_display};
+ ConstProcessorRcPtr *ocio_processors[2] = {processor_scene_to_ui, processpr_ui_to_display};
for (int i = 0; i < 2; i++) {
ConstProcessorRcPtr *processor = ocio_processors[i];
@@ -359,8 +359,8 @@ static void updateGLSLLut3d(OCIO_GLSLLut3d *lut3d,
}
static void ensureGLSLLut3d(OCIO_GLSLLut3d **lut3d_ptr,
- ConstProcessorRcPtr *ocio_processor,
- ConstProcessorRcPtr *ocio_processor_display,
+ ConstProcessorRcPtr *processor_scene_to_ui,
+ ConstProcessorRcPtr *processpr_ui_to_display,
GpuShaderDesc *shaderDesc,
const std::string &cache_id)
{
@@ -395,7 +395,7 @@ static void ensureGLSLLut3d(OCIO_GLSLLut3d **lut3d_ptr,
NULL);
}
- updateGLSLLut3d(lut3d, ocio_processor, ocio_processor_display, shaderDesc, cache_id);
+ updateGLSLLut3d(lut3d, processor_scene_to_ui, processpr_ui_to_display, shaderDesc, cache_id);
lut3d->valid = (lut3d->texture != 0);
@@ -588,18 +588,19 @@ bool OCIOImpl::supportGLSLDraw()
* restore OpenGL context to it's pre-GLSL draw state.
*/
bool OCIOImpl::setupGLSLDraw(OCIO_GLSLDrawState **state_r,
- OCIO_ConstProcessorRcPtr *processor,
- OCIO_ConstProcessorRcPtr *processor_display,
+ OCIO_ConstProcessorRcPtr *ocio_processor_scene_to_ui,
+ OCIO_ConstProcessorRcPtr *ocio_processor_ui_to_display,
OCIO_CurveMappingSettings *curve_mapping_settings,
float dither,
bool use_predivide,
bool use_overlay)
{
- ConstProcessorRcPtr ocio_processor = *(ConstProcessorRcPtr *)processor;
- ConstProcessorRcPtr ocio_processor_display = *(ConstProcessorRcPtr *)processor_display;
+ ConstProcessorRcPtr processor_scene_to_ui = *(ConstProcessorRcPtr *)ocio_processor_scene_to_ui;
+ ConstProcessorRcPtr processpr_ui_to_display = *(
+ ConstPr
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list