[igt-dev] [PATCH i-g-t 1/8] lib/igt_fb: Add igt_put_cairo_ctx as counter to igt_get_cairo_ctx

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Jan 24 12:26:35 UTC 2018


Op 23-01-18 om 16:50 schreef Ville Syrjälä:
> On Tue, Jan 23, 2018 at 01:56:35PM +0100, Maarten Lankhorst wrote:
>> This will allow support for NV12 in the future, where igt_get_cairo_ctx
>> will return a RGB image to draw with, which will be converted in
>> igt_put_cairo_ctx so tests don't have to add special support for NV12.
> Why do we need a special funciton? As in, can't you just do it the
> same as we handle the gtt vs. blit stuff?
The cairo_destroy() call will do the actual conversion back, but with this helper we can
actually check that every call to get() is followed by a put() and errors are consistently
checked. Not all callers have both, so I felt it better to put it in the core..


More information about the igt-dev mailing list