summaryrefslogtreecommitdiffstats
path: root/common/draw.h
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2016-01-20 15:10:40 +0100
committerFrediano Ziglio <fziglio@redhat.com>2016-01-20 15:56:00 +0000
commit93cd2f683650f1bce46d22fd368f5d81614a117f (patch)
treef0653ea2218e95f8652e0840c6a2668cf6835850 /common/draw.h
parentb61f43f228950505ef809dccd6a73aefdfd44ce1 (diff)
downloadspice-common-93cd2f683650f1bce46d22fd368f5d81614a117f.tar.gz
spice-common-93cd2f683650f1bce46d22fd368f5d81614a117f.tar.xz
spice-common-93cd2f683650f1bce46d22fd368f5d81614a117f.zip
draw: Add spice_image_descriptor_is_lossy
It will be used in the server code Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'common/draw.h')
-rw-r--r--common/draw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/draw.h b/common/draw.h
index 1155dc5..5ce56e7 100644
--- a/common/draw.h
+++ b/common/draw.h
@@ -294,6 +294,12 @@ typedef struct SpiceCursorHeader {
uint16_t hot_spot_y;
} SpiceCursorHeader;
+static inline int spice_image_descriptor_is_lossy(const SpiceImageDescriptor *descriptor)
+{
+ return descriptor->type == SPICE_IMAGE_TYPE_JPEG ||
+ descriptor->type == SPICE_IMAGE_TYPE_JPEG_ALPHA;
+}
+
SPICE_END_DECLS
#endif /* _H_SPICE_DRAW */