fb_pool: Return true from resize when dimensions change
parent
1b7b51af44
commit
77d8efcbe3
|
@ -99,7 +99,7 @@ uint32_t nvnc_fb_get_fourcc_format(const struct nvnc_fb* fb);
|
||||||
|
|
||||||
struct nvnc_fb_pool* nvnc_fb_pool_new(uint16_t width, uint16_t height,
|
struct nvnc_fb_pool* nvnc_fb_pool_new(uint16_t width, uint16_t height,
|
||||||
uint32_t fourcc_format);
|
uint32_t fourcc_format);
|
||||||
void nvnc_fb_pool_resize(struct nvnc_fb_pool*, uint16_t width, uint16_t height,
|
bool nvnc_fb_pool_resize(struct nvnc_fb_pool*, uint16_t width, uint16_t height,
|
||||||
uint32_t fourcc_format);
|
uint32_t fourcc_format);
|
||||||
|
|
||||||
void nvnc_fb_pool_ref(struct nvnc_fb_pool*);
|
void nvnc_fb_pool_ref(struct nvnc_fb_pool*);
|
||||||
|
|
|
@ -75,18 +75,20 @@ static void nvnc_fb_pool__destroy(struct nvnc_fb_pool* self)
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT
|
EXPORT
|
||||||
void nvnc_fb_pool_resize(struct nvnc_fb_pool* self, uint16_t width,
|
bool nvnc_fb_pool_resize(struct nvnc_fb_pool* self, uint16_t width,
|
||||||
uint16_t height, uint32_t fourcc_format)
|
uint16_t height, uint32_t fourcc_format)
|
||||||
{
|
{
|
||||||
if (width == self->width && height == self->height &&
|
if (width == self->width && height == self->height &&
|
||||||
fourcc_format == self->fourcc_format)
|
fourcc_format == self->fourcc_format)
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
nvnc_fb_pool__destroy_fbs(self);
|
nvnc_fb_pool__destroy_fbs(self);
|
||||||
|
|
||||||
self->width = width;
|
self->width = width;
|
||||||
self->height = height;
|
self->height = height;
|
||||||
self->fourcc_format = fourcc_format;
|
self->fourcc_format = fourcc_format;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT
|
EXPORT
|
||||||
|
|
Loading…
Reference in New Issue