Bug 37977 - an image is needlessly hashed twice [in qxl_image.c, qxl_image_create()]
Summary: an image is needlessly hashed twice [in qxl_image.c, qxl_image_create()]
Alias: None
Product: Spice
Classification: Unclassified
Component: xorg qxl (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
Depends on:
Reported: 2011-06-06 02:40 UTC by Yaniv Kaul
Modified: 2012-05-08 01:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Yaniv Kaul 2011-06-06 02:40:40 UTC
It is once hashed, but not copied:
hash = hash_and_copy (data, stride, NULL, -1, Bpp, width, height);

then, since it was not found in the cache (because it wasn't added to it in the first place - a different bug) it is hashed (and now copied) again:
hash_and_copy (data, stride,
		       chunk->data, dest_stride,
		       Bpp, width, height);

There is no need to hash it again.
We could change hash_and_copy() not to hash if not needed.
Comment 1 Yaniv Kaul 2012-05-08 01:21:11 UTC
Fixed when cache was added the QXL for Linux.

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.