diff options
author | Pierre Ossman <ossman@cendio.se> | 2017-01-02 19:49:52 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-02-10 17:05:20 +0100 |
commit | 3d74d88806d09f3a899be5d8f1df8ec20ed9a14d (patch) | |
tree | a2a86607aa8dda47559c5be82fadad9247844193 /vncviewer/Surface_X11.cxx | |
parent | 403ac27d2377df4fed8bf5039125f6d89aaa6955 (diff) | |
download | tigervnc-3d74d88806d09f3a899be5d8f1df8ec20ed9a14d.tar.gz tigervnc-3d74d88806d09f3a899be5d8f1df8ec20ed9a14d.zip |
Render on a temporary surface when needed
Some platforms draw directly to the screen, which means that updates
will flicker if we draw multiple layers. Prevent this by first
composing the update on a hidden surface.
Diffstat (limited to 'vncviewer/Surface_X11.cxx')
-rw-r--r-- | vncviewer/Surface_X11.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vncviewer/Surface_X11.cxx b/vncviewer/Surface_X11.cxx index c7e3778e..e7616143 100644 --- a/vncviewer/Surface_X11.cxx +++ b/vncviewer/Surface_X11.cxx @@ -48,6 +48,12 @@ void Surface::draw(int src_x, int src_y, int x, int y, int w, int h) XRenderFreePicture(fl_display, winPict); } +void Surface::draw(Surface* dst, int src_x, int src_y, int x, int y, int w, int h) +{ + XRenderComposite(fl_display, PictOpSrc, picture, None, dst->picture, + src_x, src_y, 0, 0, x, y, w, h); +} + void Surface::alloc() { XRenderPictFormat* format; |