change composer to chroma only - no src alpha blend, resize about pref, new expanders...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / canvas.C
index 2a478d41a93c5ab04b3902001ee04d3870caf794..2b3953002d58cc03f8dc56321dd223baea9ede1e 100644 (file)
@@ -844,7 +844,16 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
 // OpenGL does YUV->RGB in the compositing step
        if( use_opengl )
                best_color_model = BC_RGB888;
-
+       else if( BC_CModels::has_alpha(best_color_model) ) {
+               best_color_model =
+                       BC_CModels::is_float(best_color_model ) ?
+                               BC_RGB_FLOAT :
+                       BC_CModels::is_yuv(best_color_model ) ?
+                               ( BC_CModels::calculate_pixelsize(best_color_model) > 8 ?
+                                       BC_YUV161616 : BC_YUV888 ) :
+                               ( BC_CModels::calculate_pixelsize(best_color_model) > 8 ?
+                                       BC_RGB161616 : BC_RGB888 ) ;
+       }
        int out_w = output_frame->get_w();
        int out_h = output_frame->get_h();
        if( refresh_frame &&
@@ -869,7 +878,7 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
                get_canvas()->lock_window(" Canvas::output_refresh");
        }
        else
-               refresh_frame->copy_from(output_frame);
+               refresh_frame->transfer_from(output_frame, -1);
 }