egl: Blit to the bound frontbuffer with pipe
authorJakob Bornecrantz <wallbraker@gmail.com>
Thu, 29 Jan 2009 01:33:22 +0000 (02:33 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Thu, 29 Jan 2009 02:00:15 +0000 (03:00 +0100)
src/gallium/state_trackers/egl/egl_surface.c

index edc3a2f4e06c3d73138e752824c912e22bbad79d..9e13f2fe585a308576b1b24718dacb27dd814970 100644 (file)
@@ -280,6 +280,7 @@ drm_show_screen_surface_mesa(_EGLDriver *drv, EGLDisplay dpy,
        struct drm_device *dev = (struct drm_device *)drv;
        struct drm_surface *surf = lookup_drm_surface(surface);
        struct drm_screen *scrn = lookup_drm_screen(dpy, screen);
+       struct pipe_context *pipe;
        _EGLMode *mode = _eglLookupMode(dpy, m);
        int ret;
        unsigned int i, k;
@@ -339,6 +340,13 @@ drm_show_screen_surface_mesa(_EGLDriver *drv, EGLDisplay dpy,
        if (ret)
                goto err_crtc;
 
+       pipe = drm_api_hocks.create_context(dev->screen);
+       pipe->surface_fill(pipe, scrn->surface,
+                          0, 0,
+                          scrn->front.width, scrn->front.height,
+                          0xFF00FFFF);
+       pipe->destroy(pipe);
+
        surf->screen = scrn;
 
        scrn->surf = surf;