mirror of https://github.com/yshui/picom.git
clang-tidy: disable some noisy warnings
Also fix some of the warnings Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
748cd665f4
commit
a252cbf028
|
@ -11,7 +11,9 @@ Checks: >
|
||||||
misc-static-assert,
|
misc-static-assert,
|
||||||
-clang-analyzer-*,
|
-clang-analyzer-*,
|
||||||
-readability-isolate-declaration,
|
-readability-isolate-declaration,
|
||||||
-readability-magic-numbers
|
-readability-magic-numbers,
|
||||||
|
-readability-identifier-length,
|
||||||
|
-bugprone-easily-swappable-parameters
|
||||||
AnalyzeTemporaryDtors: false
|
AnalyzeTemporaryDtors: false
|
||||||
FormatStyle: file
|
FormatStyle: file
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
|
@ -19,3 +21,7 @@ CheckOptions:
|
||||||
value: 4;8;16;24;32;1;2;3;4096;65536;
|
value: 4;8;16;24;32;1;2;3;4096;65536;
|
||||||
- key: readability-magic-numbers.IgnoredFloatingPointValues
|
- key: readability-magic-numbers.IgnoredFloatingPointValues
|
||||||
value: 255.0;1.0;
|
value: 255.0;1.0;
|
||||||
|
- key: readability-function-cognitive-complexity.IgnoreMacros
|
||||||
|
value: true
|
||||||
|
- key: readability-function-cognitive-complexity.DescribeBasicIncrements
|
||||||
|
value: true
|
||||||
|
|
|
@ -622,8 +622,8 @@ bool gl_kernel_blur(backend_t *base, double opacity, void *ctx, const rect_t *ex
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D, src_texture);
|
glBindTexture(GL_TEXTURE_2D, src_texture);
|
||||||
glUseProgram(p->prog);
|
glUseProgram(p->prog);
|
||||||
glUniform2f(p->uniform_pixel_norm, 1.0f / (GLfloat)tex_width,
|
glUniform2f(p->uniform_pixel_norm, 1.0F / (GLfloat)tex_width,
|
||||||
1.0f / (GLfloat)tex_height);
|
1.0F / (GLfloat)tex_height);
|
||||||
|
|
||||||
// The number of indices in the selected vertex array
|
// The number of indices in the selected vertex array
|
||||||
GLsizei nelems;
|
GLsizei nelems;
|
||||||
|
@ -644,7 +644,7 @@ bool gl_kernel_blur(backend_t *base, double opacity, void *ctx, const rect_t *ex
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
glUniform1f(p->uniform_opacity, 1.0);
|
glUniform1f(p->uniform_opacity, 1.0F);
|
||||||
} else {
|
} else {
|
||||||
// last pass, draw directly into the back buffer, with origin
|
// last pass, draw directly into the back buffer, with origin
|
||||||
// regions
|
// regions
|
||||||
|
@ -715,8 +715,8 @@ bool gl_dual_kawase_blur(backend_t *base, double opacity, void *ctx, const rect_
|
||||||
|
|
||||||
glUniform1f(down_pass->scale_loc, (GLfloat)scale_factor);
|
glUniform1f(down_pass->scale_loc, (GLfloat)scale_factor);
|
||||||
|
|
||||||
glUniform2f(down_pass->uniform_pixel_norm, 1.0f / (GLfloat)tex_width,
|
glUniform2f(down_pass->uniform_pixel_norm, 1.0F / (GLfloat)tex_width,
|
||||||
1.0f / (GLfloat)tex_height);
|
1.0F / (GLfloat)tex_height);
|
||||||
|
|
||||||
glDrawElements(GL_TRIANGLES, nelems, GL_UNSIGNED_INT, NULL);
|
glDrawElements(GL_TRIANGLES, nelems, GL_UNSIGNED_INT, NULL);
|
||||||
}
|
}
|
||||||
|
@ -764,8 +764,8 @@ bool gl_dual_kawase_blur(backend_t *base, double opacity, void *ctx, const rect_
|
||||||
}
|
}
|
||||||
|
|
||||||
glUniform1f(up_pass->scale_loc, (GLfloat)scale_factor);
|
glUniform1f(up_pass->scale_loc, (GLfloat)scale_factor);
|
||||||
glUniform2f(up_pass->uniform_pixel_norm, 1.0f / (GLfloat)tex_width,
|
glUniform2f(up_pass->uniform_pixel_norm, 1.0F / (GLfloat)tex_width,
|
||||||
1.0f / (GLfloat)tex_height);
|
1.0F / (GLfloat)tex_height);
|
||||||
|
|
||||||
glDrawElements(GL_TRIANGLES, nelems, GL_UNSIGNED_INT, NULL);
|
glDrawElements(GL_TRIANGLES, nelems, GL_UNSIGNED_INT, NULL);
|
||||||
}
|
}
|
||||||
|
@ -1511,8 +1511,8 @@ void *gl_create_blur_context(backend_t *base, enum blur_method method, void *arg
|
||||||
// Note: OpenGL matrices are column major
|
// Note: OpenGL matrices are column major
|
||||||
GLint viewport_dimensions[2];
|
GLint viewport_dimensions[2];
|
||||||
glGetIntegerv(GL_MAX_VIEWPORT_DIMS, viewport_dimensions);
|
glGetIntegerv(GL_MAX_VIEWPORT_DIMS, viewport_dimensions);
|
||||||
GLfloat projection_matrix[4][4] = {{2.0f / (GLfloat)viewport_dimensions[0], 0, 0, 0},
|
GLfloat projection_matrix[4][4] = {{2.0F / (GLfloat)viewport_dimensions[0], 0, 0, 0},
|
||||||
{0, 2.0f / (GLfloat)viewport_dimensions[1], 0, 0},
|
{0, 2.0F / (GLfloat)viewport_dimensions[1], 0, 0},
|
||||||
{0, 0, 0, 0},
|
{0, 0, 0, 0},
|
||||||
{-1, -1, 0, 1}};
|
{-1, -1, 0, 1}};
|
||||||
|
|
||||||
|
@ -1715,7 +1715,7 @@ bool gl_init(struct gl_data *gd, session_t *ps) {
|
||||||
glViewport(0, 0, viewport_dimensions[0], viewport_dimensions[1]);
|
glViewport(0, 0, viewport_dimensions[0], viewport_dimensions[1]);
|
||||||
|
|
||||||
// Clear screen
|
// Clear screen
|
||||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
glClearColor(0.0F, 0.0F, 0.0F, 1.0F);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||||
|
|
||||||
glGenFramebuffers(1, &gd->back_fbo);
|
glGenFramebuffers(1, &gd->back_fbo);
|
||||||
|
|
Loading…
Reference in New Issue