if (ctx->pipe == NULL)
goto fail;
- ctx->pipe->priv = ctx; /* I guess */
+ /* used in dri_flush_frontbuffer */
+ ctx->pipe->priv = ctx;
ctx->st = st_create_context(ctx->pipe, visual, st_share);
if (ctx->st == NULL)
draw->stfb,
read->stfb);
+ /* used in dri_flush_frontbuffer */
ctx->dPriv = driDrawPriv;
if (driDrawPriv)
#include "util/u_memory.h"
+static void
+dri_copy_to_front(__DRIdrawablePrivate *dPriv,
+ struct pipe_surface *from,
+ int x, int y, unsigned w, unsigned h)
+{
+ /* TODO send a message to the Xserver to copy to the real front buffer */
+}
+
+
static struct pipe_surface *
dri_surface_from_handle(struct pipe_screen *screen,
unsigned handle,
}
+void
+dri_flush_frontbuffer(struct pipe_screen *screen,
+ struct pipe_surface *surf,
+ void *context_private)
+{
+ struct dri_context *ctx = (struct dri_context *)context_private;
+ dri_copy_to_front(ctx->dPriv, surf, 0, 0, surf->width, surf->height);
+}
+
+
void
dri_swap_buffers(__DRIdrawablePrivate * dPriv)
{
const __GLcontextModes *visual,
boolean isPixmap);
+void
+dri_flush_frontbuffer(struct pipe_screen *screen,
+ struct pipe_surface *surf,
+ void *context_private);
+
void
dri_swap_buffers(__DRIdrawablePrivate * dPriv);