preview tooltip, ffv1 fmt, opengl overlay tweaks, clear nested render output bfr
[goodguy/history.git] / cinelerra-5.1 / cinelerra / canvas.C
index 85d4e6f51ce453286e7d2636fbf22d00d021d7ce..dc6d44a58e0a13032704219c1dd666e96ab4b8d2 100644 (file)
@@ -851,15 +851,17 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
        int best_color_model = output_frame->get_color_model();
        int use_opengl =
                device->out_config->driver == PLAYBACK_X11_GL &&
-               output_frame->get_opengl_state() == VFrame::SCREEN;
+               output_frame->get_opengl_state() != VFrame::RAM;
 
 // OpenGL does YUV->RGB in the compositing step
        if( use_opengl )
                best_color_model = BC_RGB888;
 
+       int out_w = output_frame->get_w();
+       int out_h = output_frame->get_h();
        if( refresh_frame &&
-          (refresh_frame->get_w() != device->out_w ||
-           refresh_frame->get_h() != device->out_h ||
+          (refresh_frame->get_w() != out_w ||
+           refresh_frame->get_h() != 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;
@@ -867,7 +869,7 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
 
        if( !refresh_frame ) {
                refresh_frame =
-                       new VFrame(device->out_w, device->out_h, best_color_model);
+                       new VFrame(out_w, out_h, best_color_model);
        }
 
        if( use_opengl ) {
@@ -879,7 +881,7 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
                get_canvas()->lock_window(" Canvas::output_refresh");
        }
        else
-               refresh_frame->transfer_from(output_frame);
+               refresh_frame->copy_from(output_frame);
 }