summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-09-23 21:59:16 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-09-30 02:19:51 +0200
commit37548f17e45bf21038f13b2820047f43c2d83154 (patch)
tree1d2c638ff6cebf63429b668e321193b276474bf2 /client
parentc2b1c0e7f33186a7167e6666cd5dbd0ddeb2562e (diff)
spicec: use pre/post copy
Ensure the GL state is appropriate for calling GCanvas::copy_pixels.
Diffstat (limited to 'client')
-rw-r--r--client/red_gl_canvas.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/red_gl_canvas.cpp b/client/red_gl_canvas.cpp
index 81203d99..e8c3f1e8 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)