Skip to content

Commit

Permalink
ext-image-copy-capture: Fix unused variable warning in release build
Browse files Browse the repository at this point in the history
  • Loading branch information
any1 committed Nov 10, 2024
1 parent bc1ece6 commit 666ffac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ext-image-copy-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,13 @@ static void ext_image_copy_capture_schedule_capture(struct ext_image_copy_captur

ext_image_copy_capture_frame_v1_capture(self->frame);

#ifndef NDEBUG
float damage_area = calculate_region_area(&self->buffer->buffer_damage);
float pixel_area = self->buffer->width * self->buffer->height;

nvnc_trace("Committed %sbuffer: %p with %.02f %% damage",
self->cursor ? "cursor " : "", self->buffer,
100.0 * damage_area / pixel_area);
#endif
}

static void ext_image_copy_capture_schedule_from_timer(void* obj)
Expand Down Expand Up @@ -506,10 +507,12 @@ static void frame_handle_ready(void *data,
ext_image_copy_capture_frame_v1_destroy(self->frame);
self->frame = NULL;

#ifndef NDEBUG
float damage_area = calculate_region_area(&self->buffer->frame_damage);
float pixel_area = self->buffer->width * self->buffer->height;
nvnc_trace("Frame ready with damage: %.02f %", 100.0 * damage_area /
pixel_area);
#endif

assert(self->buffer);

Expand Down

0 comments on commit 666ffac

Please sign in to comment.