[Bug 37977] New: an image is needlessly hashed twice [in qxl_image.c, qxl_image_create()]

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jun 6 02:40:43 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=37977

           Summary: an image is needlessly hashed twice [in qxl_image.c,
                    qxl_image_create()]
           Product: Spice
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: xorg qxl
        AssignedTo: spice-bugs at lists.freedesktop.org
        ReportedBy: ykaul at redhat.com


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.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the spice-bugs mailing list