Bug 37977

Summary: an image is needlessly hashed twice [in qxl_image.c, qxl_image_create()]
Product: Spice Reporter: Yaniv Kaul <ykaul>
Component: xorg qxlAssignee: Spice Bug List <spice-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
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.