Add dtrace probes for rendering and damage checking

pixman-rendering
Andri Yngvason 2020-07-07 13:44:41 +00:00
parent 5d2dd100b7
commit a4c093bbdf
1 changed files with 9 additions and 0 deletions

View File

@ -53,6 +53,7 @@
#include "pixman-renderer.h"
#include "transform-util.h"
#include "damage-refinery.h"
#include "usdt.h"
#define DEFAULT_ADDRESS "127.0.0.1"
#define DEFAULT_PORT 5900
@ -471,10 +472,14 @@ static void on_render(struct nvnc_display* display, struct nvnc_fb* fb)
if (!self->screencopy.back)
return;
DTRACE_PROBE(wayvnc, render_start);
enum wl_output_transform transform = self->selected_output->transform;
wv_pixman_render(fb, self->screencopy.back, transform,
&self->current_damage);
pixman_region_clear(&self->current_damage);
DTRACE_PROBE(wayvnc, render_end);
}
static void wayvnc_damage_region(struct wayvnc* self,
@ -506,6 +511,8 @@ void wayvnc_process_frame(struct wayvnc* self)
}
}
DTRACE_PROBE(wayvnc, refine_damage_start);
struct pixman_region16 txdamage, refined;
pixman_region_init(&txdamage);
pixman_region_init(&refined);
@ -521,6 +528,8 @@ void wayvnc_process_frame(struct wayvnc* self)
pixman_region_fini(&refined);
pixman_region_fini(&txdamage);
DTRACE_PROBE(wayvnc, refine_damage_end);
if (wayvnc_start_capture(self) < 0) {
log_error("Failed to start capture. Exiting...\n");
wayvnc_exit(self);