fix aspect ratio on split screen drag handle, add videoscope to editpanel in cwindow...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / canvas.C
index 2319f14b3b1ca0face0de48cd77e127b0a600e6a..a1f458541cea8d8080cf4bad17b9470dfc394be9 100644 (file)
@@ -690,6 +690,7 @@ int Canvas::keypress_event(BC_WindowBase *caller)
        return 1;
 }
 
+// process_scope uses the refresh frame for opengl
 void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
 {
        int best_color_model = output_frame->get_color_model();
@@ -734,6 +735,20 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
                refresh_frame->transfer_from(output_frame, -1);
 }
 
+void Canvas::process_scope(VideoDevice *video, VFrame *frame)
+{
+       if( !scope_on() ) return;
+       int use_opengl =
+               video->out_config->driver == PLAYBACK_X11_GL &&
+               frame->get_opengl_state() != VFrame::RAM;
+       if( use_opengl ) {
+               update_refresh(video, frame);
+               frame = refresh_frame;
+       }
+       if( frame )
+               draw_scope(frame);
+}
+
 void Canvas::clear(int flash)
 {
        BC_WindowBase *window = get_canvas();