Bug 41713 - RFE: qxl mask is sent as garbage when not used
Summary: RFE: qxl mask is sent as garbage when not used
Status: RESOLVED MOVED
Alias: None
Product: Spice
Classification: Unclassified
Component: server (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 03:23 UTC by Yaniv Kaul
Modified: 2018-06-03 10:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Yaniv Kaul 2011-10-12 03:23:25 UTC
If mask is not used, instead of sending the type as 'none' or something (1 byte), we send garbage (memory is not even zero'ed), and the whole Mask structure (13 bytes). Waste.

The code (with my printf) from server/red_worker.c:

static void fill_mask(RedChannelClient *rcc, SpiceMarshaller *m,
                      SpiceImage *mask_bitmap, Drawable *drawable)
{
    DisplayChannel *display_channel = SPICE_CONTAINEROF(rcc->channel, DisplayChannel, common.base);
    DisplayChannelClient *dcc = RCC_TO_DCC(rcc);

    if (mask_bitmap && m) {
        if (display_channel->common.worker->image_compression != SPICE_IMAGE_COMPRESS_OFF) {
            spice_image_compression_t save_img_comp =
                display_channel->common.worker->image_compression;
            display_channel->common.worker->image_compression = SPICE_IMAGE_COMPRESS_OFF;
            fill_bits(dcc, m, mask_bitmap, drawable, FALSE);
            display_channel->common.worker->image_compression = save_img_comp;
        } else {
            fill_bits(dcc, m, mask_bitmap, drawable, FALSE);
        }
    } else {
        red_printf("fill_mask not doing much");
    }
}
Comment 1 GitLab Migration User 2018-06-03 10:15:54 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/spice/spice-server/issues/25.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.