summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2013-09-24 12:24:36 -0400
committerYonit Halperin <yhalperi@redhat.com>2013-09-24 12:24:36 -0400
commitbf33ef7a1e03176ee203c353f0cec0bf7f7a18d5 (patch)
treeeee95855b4e72845e73a21fa29940a6afea2f01b
parentbdff8849a7b58612cf65223bd4317ec2fb1db539 (diff)
tmp. comments in preperation to changing fill_bits to resize bitmapsqxl-mem-control
-rw-r--r--server/red_worker.c24
m---------spice-common0
2 files changed, 24 insertions, 0 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index f22b817..30db551 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -7408,6 +7408,11 @@ static inline void red_display_add_image_to_pixmap_cache(RedChannelClient *rcc,
}
}
+//from image to send-image. send src_area. bool - crop.
+// maybe instead of "on_compression" cb, we can use the returning image to deduce this.
+//static void
+
+
typedef enum {
FILL_BITS_TYPE_INVALID,
FILL_BITS_TYPE_CACHE,
@@ -7417,6 +7422,7 @@ typedef enum {
FILL_BITS_TYPE_BITMAP,
} FillBitsType;
+
// upon compression or caching...
typedef void (*fill_bits_on_compression_proc)(DisplayChannelClient *dcc,
SpiceImage *simage,
@@ -7547,6 +7553,24 @@ static FillBitsType fill_bits(DisplayChannelClient *dcc, SpiceMarshaller *m,
spice_debug("drawable %p: vis-size=%u bitmap-size=%u ratio=%.2f", drawable, visible_size, bitmap_size, vis_ratio);
}
+ /*
+ * TODO:
+ * If low band:
+ * don't cache immediatly
+ * (1) **compress
+ * (2) if extents-vis-area << bitmap-area (&& send-time of comressed-bitmap >> X)
+ * compress extents-vis-are (currently not supported with GLZ because of the stride....). Maybe with Quic and not Jpeg, cause it might be better with GLZ
+ * If vis-area-comp-size << total-compression size, dont cache, and send only the small area
+ * (3) Add some heuristic to guess if an image will be in use later (maybe if it is in the pipe again
+ * with larger vis region?), and then don't do all of this?
+ * BUT:
+ * - we need to update the Drawable marshalling...
+ * - maybe it will take time till the covering image will be sent. So maybe
+ * we shouldn't do it based on tree-rgn, but only on the bbox of the drawbale. Otherwise we will have rendering artifacts
+ * - If there is clipping, we will need to change it
+ *
+ * **I don't know exactly the efficiency of the compression ratio, that's why I do the compression of the whole bitmap....
+ */
/* Images must be added to the cache only after they are compressed
in order to prevent starvation in the client between pixmap_cache and
diff --git a/spice-common b/spice-common
-Subproject 9b184544a9b41ba3b5fb2f1cdc805070f2cbff5
+Subproject 3363fe79f9d450774dd018a794c0b4381c1ef0a