diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-08-10 18:44:57 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-08-24 13:45:31 -0400 |
commit | 37be9e0c2efd21e088e8106b4356de7fcbe5a95b (patch) | |
tree | 3cb472decbaccec1ad3c7f84aa11d89eb892a17a /client/display_channel.cpp | |
parent | a91daa2feb50a3d39150993a9d1b397b3c85ad03 (diff) | |
download | spice-37be9e0c2efd21e088e8106b4356de7fcbe5a95b.tar.gz spice-37be9e0c2efd21e088e8106b4356de7fcbe5a95b.tar.xz spice-37be9e0c2efd21e088e8106b4356de7fcbe5a95b.zip |
Add support for Composite command to the client
All the real work is being done in spice-common, so this patch is just
hooking up the virtual calls and adding the SPICE_DISPLAY_CAP_COMPOSITE
capability.
Diffstat (limited to 'client/display_channel.cpp')
-rw-r--r-- | client/display_channel.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/display_channel.cpp b/client/display_channel.cpp index 17bdf6a6..d08072de 100644 --- a/client/display_channel.cpp +++ b/client/display_channel.cpp @@ -650,6 +650,8 @@ DisplayChannel::DisplayChannel(RedClient& client, uint32_t id, get_process_loop().add_trigger(_interrupt_update); set_draw_handlers(); + + set_capability(SPICE_DISPLAY_CAP_COMPOSITE); } DisplayChannel::~DisplayChannel() @@ -692,6 +694,8 @@ void DisplayChannel::set_draw_handlers() &DisplayChannel::handle_draw_transparent); handler->set_handler(SPICE_MSG_DISPLAY_DRAW_ALPHA_BLEND, &DisplayChannel::handle_draw_alpha_blend); + handler->set_handler(SPICE_MSG_DISPLAY_DRAW_COMPOSITE, + &DisplayChannel::handle_draw_composite); handler->set_handler(SPICE_MSG_DISPLAY_STREAM_DATA, &DisplayChannel::handle_stream_data); } @@ -712,6 +716,7 @@ void DisplayChannel::clear_draw_handlers() handler->set_handler(SPICE_MSG_DISPLAY_DRAW_TEXT, NULL); handler->set_handler(SPICE_MSG_DISPLAY_DRAW_TRANSPARENT, NULL); handler->set_handler(SPICE_MSG_DISPLAY_DRAW_ALPHA_BLEND, NULL); + handler->set_handler(SPICE_MSG_DISPLAY_DRAW_COMPOSITE, NULL); handler->set_handler(SPICE_MSG_DISPLAY_STREAM_DATA, NULL); } @@ -1735,6 +1740,14 @@ void DisplayChannel::handle_draw_alpha_blend(RedPeer::InMessage* message) DRAW(alpha_blend); } +void DisplayChannel::handle_draw_composite(RedPeer::InMessage* message) +{ + Canvas *canvas; + SpiceMsgDisplayDrawComposite* composite = (SpiceMsgDisplayDrawComposite*)message->data(); + canvas = _surfaces_cache[composite->base.surface_id]; + DRAW(composite); +} + void DisplayChannel::streams_time() { _next_timer_time = 0; |