Tweak to try to reduce low space builds
This commit is contained in:
parent
2c1e2061db
commit
3020893ba2
|
@ -49,11 +49,10 @@ void common_hal_displayio_bitmap_construct_from_buffer(displayio_bitmap_t *self,
|
||||||
self->width = width;
|
self->width = width;
|
||||||
self->height = height;
|
self->height = height;
|
||||||
self->stride = stride(width, bits_per_value);
|
self->stride = stride(width, bits_per_value);
|
||||||
|
self->data_alloc = false;
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = m_malloc(self->stride * height * sizeof(uint32_t), false);
|
data = m_malloc(self->stride * height * sizeof(uint32_t), false);
|
||||||
self->data_alloc = true;
|
self->data_alloc = true;
|
||||||
} else {
|
|
||||||
self->data_alloc = false;
|
|
||||||
}
|
}
|
||||||
self->data = data;
|
self->data = data;
|
||||||
self->read_only = read_only;
|
self->read_only = read_only;
|
||||||
|
|
Loading…
Reference in New Issue