diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-04-23 09:04:36 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-05-06 11:23:27 +0300 |
commit | 40dc75db615c1161c38874c145770b8d77a995ad (patch) | |
tree | e72cdcc1ad6501d4ad4508133df8ef640c218af6 | |
parent | 1ad5c8633cc52aef5aa8a58bf529859caa8d1bd9 (diff) |
Do not call update_area when lacking device memory
The QXL_IO_NOTIFY_OOM is intended exactly for handling occurrences of
lacking memory. The spice server tries to first release resources that
are no longer in the current tree (and thus, do not need rendering).
It renders drawables only as a last resort. And even then,
it does not update the whole primary surface, but rather renders
the oldest X drawables.
The call to update_area is redundant, and its effect on performance
is noticeable when playing full screen video.
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
-rw-r--r-- | src/qxl_driver.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 6e06174..f7ccbbf 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -296,20 +296,6 @@ qxl_allocnf (qxl_screen_t *qxl, unsigned long size) while (!(result = qxl_alloc (qxl->mem, size))) { - struct QXLRam *ram_header = (void *)( - (unsigned long)qxl->ram + qxl->rom->ram_header_offset); - - /* Rather than go out of memory, we simply tell the - * device to dump everything - */ - ram_header->update_area.top = 0; - ram_header->update_area.bottom = qxl->virtual_y; - ram_header->update_area.left = 0; - ram_header->update_area.right = qxl->virtual_x; - ram_header->update_surface = 0; /* Only primary for now */ - - qxl_update_area(qxl); - #if 0 ErrorF ("eliminated memory (%d)\n", nth_oom++); #endif |