if( refresh_frame &&
(refresh_frame->get_w() != device->out_w ||
- refresh_frame->get_h() != device->out_h ) ) {
+ refresh_frame->get_h() != device->out_h ||
+ refresh_frame->get_color_model() != best_color_model ) ) {
// x11 direct render uses BC_BGR8888, use tranfer_from to remap
delete refresh_frame; refresh_frame = 0;
}
}
+void Canvas::clear(int flush)
+{
+ if( refresh_frame )
+ refresh_frame->clear_frame();
+ BC_WindowBase *wdw = get_canvas();
+ if( !wdw ) return;
+ wdw->set_bg_color(BLACK);
+ wdw->clear_box(0,0, wdw->get_w(), wdw->get_h());
+ wdw->flash(flush);
+}