diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2009-04-09 14:31:01 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2009-04-10 12:00:36 -0700 |
commit | f1a995d1496d73741731e32f475097c44a8da972 (patch) | |
tree | 1625b7bb7d1483518bc0681419a532a7c86b8a79 /glx/glxdri2.c | |
parent | aa2928325fe51d94a636dde9c090e8f54a311a12 (diff) |
DRI2: Do not send the real front buffer of a window to the client
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'glx/glxdri2.c')
-rw-r--r-- | glx/glxdri2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/glx/glxdri2.c b/glx/glxdri2.c index c896536c8..ea5b5ef72 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -406,6 +406,7 @@ dri2GetBuffers(__DRIdrawable *driDrawable, __GLXDRIdrawable *private = loaderPrivate; DRI2BufferPtr buffers; int i; + int skip = 0; buffers = DRI2GetBuffers(private->base.pDraw, width, height, attachments, count, out_count); @@ -420,6 +421,14 @@ dri2GetBuffers(__DRIdrawable *driDrawable, /* This assumes the DRI2 buffer attachment tokens matches the * __DRIbuffer tokens. */ for (i = 0; i < *out_count; i++) { + /* Do not send the real front buffer of a window to the client. + */ + if ((private->base.pDraw->type == DRAWABLE_WINDOW) + && (buffers[i].attachment == DRI2BufferFrontLeft)) { + skip++; + continue; + } + private->buffers[i].attachment = buffers[i].attachment; private->buffers[i].name = buffers[i].name; private->buffers[i].pitch = buffers[i].pitch; @@ -427,6 +436,7 @@ dri2GetBuffers(__DRIdrawable *driDrawable, private->buffers[i].flags = buffers[i].flags; } + *out_count -= skip; return private->buffers; } |