mesa: add a function to do the image data copy stuff for save_CompressedTex(Sub)Image
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 14 Oct 2011 06:28:22 +0000 (14:28 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Mon, 17 Oct 2011 01:41:58 +0000 (09:41 +0800)
commite9edcf8b1d6f319af6db8dd25aa267f662456139
tree50fd6f2fb2a3a5c18adb6e44cbc3b5f3dcd4183b
parent1448bdf1c0995e3ac2e0f97c51e5e2d73eded8e0
mesa: add a function to do the image data copy stuff for save_CompressedTex(Sub)Image

Introuduce a simple function called copy_data to do the image data copy
stuff for all the save_CompressedTex*Image function. The function check
the NULL data case to avoid some potential segfault. This also would
make the code a bit simpler and less redundance.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/dlist.c