Skip to content

Commit

Permalink
Fix clang-tidy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhb committed Aug 27, 2020
1 parent 55a8182 commit dcde9f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions shell/platform/linux/fl_external_texture_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ bool fl_external_texture_gl_populate_texture(
FlutterOpenGLTexture* opengl_texture) {
size_t real_width = width, real_height = height;
if (!fl_external_texture_gl_copy_pixel_buffer(self, &real_width,
&real_height))
&real_height)) {
return false;
}

opengl_texture->target = GL_TEXTURE_2D;
opengl_texture->name = self->gl_texture_id;
Expand Down Expand Up @@ -93,13 +94,15 @@ bool fl_external_texture_gl_copy_pixel_buffer(FlExternalTextureGl* self,
size_t* height) {
const FlPixelBuffer* pixel_buffer =
self->callback(*width, *height, self->user_data);
if (!pixel_buffer || !pixel_buffer->buffer)
if (!pixel_buffer || !pixel_buffer->buffer) {
return false;
}
*width = pixel_buffer->width;
*height = pixel_buffer->height;

if (!self->gl.valid)
if (!self->gl.valid) {
fl_external_texture_gl_load_funcs(self);
}
if (self->gl_texture_id == 0) {
self->gl.genTextures(1, &self->gl_texture_id);
self->gl.bindTexture(GL_TEXTURE_2D, self->gl_texture_id);
Expand Down
3 changes: 2 additions & 1 deletion shell/platform/linux/fl_texture_registrar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ bool fl_texture_registrar_populate_texture(
FlutterOpenGLTexture* opengl_texture) {
FlExternalTextureGl* texture = FL_EXTERNAL_TEXTURE_GL(g_hash_table_lookup(
self->textures, reinterpret_cast<gconstpointer>(texture_id)));
if (texture == nullptr)
if (texture == nullptr) {
return false;
}
return fl_external_texture_gl_populate_texture(texture, width, height,
opengl_texture);
}
Expand Down

0 comments on commit dcde9f2

Please sign in to comment.