Kenneth Graunke <kenn...@whitecape.org> writes:

> On 04/29/2014 04:34 PM, Eric Anholt wrote:
> [snip]
>> @@ -558,12 +572,8 @@ intel_dup_image(__DRIimage *orig_image, void 
>> *loaderPrivate)
>>     if (image == NULL)
>>        return NULL;
>>  
>> -   intel_region_reference(&image->region, orig_image->region);
>> -   if (image->region == NULL) {
>> -      free(image);
>> -      return NULL;
>> -   }
>> -
>> +   drm_intel_bo_reference(orig_image->bo);
>> +   image->bo              = orig_image->bo
>
> I noticed you dropped this NULL check, rather than checking image->bo !=
> NULL.  Presumably in intel_dup_image, you know that the orig_image BO
> actually exists?  If so, this seems fine.

Yeah, we only return an image if it's got a BO attached.

(We also only returned images when they had regions attached, so even
the old code was doing a pointless check)

Attachment: pgpgRT1EXsWaB.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to