Commit e30ea496 authored by Siarhei Siamashka's avatar Siarhei Siamashka
Browse files

DRI2: erase the offscreen framebuffer part on first buffer allocation



Do this mostly for security reasons. We don't want any application
to see whatever was last rendered by the previous GLES application
by just peeking into a freshly allocated DRI2 buffer.
Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
parent 4a99dcef
......@@ -360,6 +360,11 @@ static DRI2Buffer2Ptr MaliDRI2CreateBuffer(DrawablePtr pDraw,
window_state->pDraw = pDraw;
HASH_ADD_PTR(private->HashWindowState, pDraw, window_state);
DebugMsg("Allocate DRI2 bookkeeping for window %p\n", pDraw);
if (disp && can_use_overlay) {
/* erase the offscreen part of the framebuffer */
memset(disp->framebuffer_addr + disp->gfx_layer_size, 0,
disp->framebuffer_size - disp->gfx_layer_size);
}
}
window_state->buf_request_cnt++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment