Minor simplification of Fl_Wayland_Graphics_Driver::cairo_init.
This commit is contained in:
parent
394298aff4
commit
d8eb1f9ca4
@ -71,7 +71,6 @@ struct fl_wld_buffer *Fl_Wayland_Graphics_Driver::create_shm_buffer(int width, i
|
||||
buffer->data_size = size;
|
||||
buffer->width = width;
|
||||
buffer->draw_buffer = new uchar[buffer->data_size];
|
||||
memset(buffer->draw_buffer, 0, buffer->data_size); // necessary for transparent windows
|
||||
buffer->draw_buffer_needs_commit = false;
|
||||
//fprintf(stderr, "create_shm_buffer: %dx%d = %d\n", width, height, size);
|
||||
cairo_init(buffer, width, height, stride, Fl_Cairo_Graphics_Driver::cairo_format);
|
||||
@ -105,8 +104,7 @@ void Fl_Wayland_Graphics_Driver::cairo_init(struct fl_wld_buffer *buffer, int wi
|
||||
return;
|
||||
}
|
||||
cairo_surface_destroy(surf);
|
||||
cairo_set_source_rgba(buffer->cairo_, 1.0, 1.0, 1.0, 0.);
|
||||
cairo_paint(buffer->cairo_);
|
||||
memset(buffer->draw_buffer, 0, buffer->data_size); // useful for transparent windows
|
||||
cairo_set_source_rgba(buffer->cairo_, .0, .0, .0, 1.0); // Black default color
|
||||
cairo_save(buffer->cairo_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user