mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-15 08:22:07 -04:00
Merge branch 'gles2-scissor' into 'master'
render/gles2: scissor region on render See merge request wlroots/wlroots!5294
This commit is contained in:
commit
3397e98f19
4 changed files with 105 additions and 1 deletions
|
|
@ -90,6 +90,10 @@ static void render(const struct wlr_box *box, const pixman_region32_t *clip, GLi
|
|||
return;
|
||||
}
|
||||
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
glScissor(region.extents.x1, region.extents.y1, region.extents.x2 - region.extents.x1,
|
||||
region.extents.y2 - region.extents.y1);
|
||||
|
||||
glEnableVertexAttribArray(attrib);
|
||||
|
||||
for (int i = 0; i < rects_len;) {
|
||||
|
|
@ -120,6 +124,7 @@ static void render(const struct wlr_box *box, const pixman_region32_t *clip, GLi
|
|||
}
|
||||
|
||||
glDisableVertexAttribArray(attrib);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
|
||||
pixman_region32_fini(®ion);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -326,7 +326,6 @@ static int gles2_get_render_time(struct wlr_render_timer *wlr_timer) {
|
|||
renderer->procs.glGetQueryObjectivEXT(timer->id,
|
||||
GL_QUERY_RESULT_AVAILABLE_EXT, &available);
|
||||
if (!available) {
|
||||
wlr_log(WLR_ERROR, "timer was read too early, gpu isn't done!");
|
||||
wlr_egl_restore_context(&prev_ctx);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue