[Spice-devel] [PATCH 09/11] spicec: use pre/post copy

Marc-André Lureau marcandre.lureau at gmail.com
Tue Sep 24 04:42:20 PDT 2013


Ensure the GL state is appropriate for calling GCanvas::copy_pixels.
---
 client/red_gl_canvas.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/client/red_gl_canvas.cpp b/client/red_gl_canvas.cpp
index 81203d9..e8c3f1e 100644
--- a/client/red_gl_canvas.cpp
+++ b/client/red_gl_canvas.cpp
@@ -71,6 +71,7 @@ void GCanvas::copy_pixels(const QRegion& region, RedDrawable& dest_dc)
     pixman_box32_t *rects;
     int num_rects;
 
+    pre_gl_copy();
     rects = pixman_region32_rectangles((pixman_region32_t *)&region, &num_rects);
     for (int i = 0; i < num_rects; i++) {
         SpiceRect r;
@@ -82,6 +83,7 @@ void GCanvas::copy_pixels(const QRegion& region, RedDrawable& dest_dc)
 
         dest_dc.copy_pixels(*_pixmap, r.left, r.top, r);
     }
+    post_gl_copy();
 }
 
 void GCanvas::copy_pixels(const QRegion& region, RedDrawable* dest_dc, const PixmapHeader* pixmap)
-- 
1.8.3.1



More information about the Spice-devel mailing list