// Use DrawUpTrackerWindow instead. void UpdateTrackerWindow(struct Tracker_Windows *window){ UpdateTrackerWindowCoordinates(window); UpdateWBlockCoordinates(window,window->wblock); PixMap_reset(window); DrawWBlock(window,window->wblock); DrawLeftSlider(window); window->wblock->isgfxdatahere=true; }
void EditorWidget::updateEditor(){ if(ATOMIC_GET(is_starting_up)==true) return; { struct Patch *patch = ATOMIC_GET(atomic_must_redraw_instrument); if (patch!=NULL){ ATOMIC_SET(atomic_must_redraw_instrument, NULL); GFX_update_instrument_widget(patch);//GFX_update_instrument_patch_gui(patch); } } transfer_atomic_must_redraws(window); #if 0 //!defined(RELEASE) { int queue_size = GFX_get_op_queue_size(this->window); if (queue_size > 0 || this->window->must_calculate_coordinates==true || this->window->must_redraw==true || this->window->must_redraw_editor) printf("..Updating. Queue: %d. Update coordinates: %d. Redraw editor: %d. Redraw: %d\n", queue_size, this->window->must_calculate_coordinates, this->window->must_redraw_editor, this->window->must_redraw ); } #endif if (GFX_get_op_queue_size(this->window)>0) this->window->must_redraw = true; if (this->window->must_calculate_coordinates==true){ this->window->must_redraw = true; this->window->must_calculate_coordinates=false; } if (this->window->must_redraw) { UpdateTrackerWindowCoordinates(window); UpdateWBlockCoordinates(this->window, this->window->wblock); GFX_UpdateUpperLeft(window, window->wblock); UpdateAllPianoRollHeaders(window, window->wblock); SEQUENCER_update(); update(); this->window->must_redraw_editor=true; this->window->must_redraw=false; } if (this->window->must_redraw_editor==true){ GL_create(this->window, this->window->wblock); if (!is_playing()) SEQUENCER_update(); this->window->must_redraw_editor=false; } }
/************************************************************************** FUNCTION Redraw without flickering. ***************************************************************************/ void DrawUpTrackerWindow(struct Tracker_Windows *window){ //printf("Draw up tracker. width: %d, height: %d\n",window->width,window->height); if(window->must_redraw==true) return; #if UPDATECOORDINATES_WHEN_DRAWING struct WBlocks *wblock = window->wblock; #endif #if 0 while(GetXSubTrack_B2(wblock,window->curr_track,window->curr_track_sub) >= wblock->a.x2){ if(window->curr_track<wblock->left_track) break; // should not be possible if(window->curr_track==wblock->left_track && window->curr_track_sub==wblock->left_subtrack) break; CursorLeft_CurrPos(window); } #endif #if !USE_OPENGL GFX_BouncePoints(window); // To clear point buffer. (TODO: Implement a clear point buffer function.) #endif #if UPDATECOORDINATES_WHEN_DRAWING UpdateTrackerWindowCoordinates(window); UpdateWBlockCoordinates(window,wblock); #endif #if !USE_OPENGL PixMap_reset(window); #endif #if !USE_OPENGL struct WTracks *wtrack=ListLast1(&wblock->wtracks->l); int x2=wtrack->fxarea.x2; EraseAllLines(window, window->wblock, 0, x2); GFX_FilledBox(window,0, x2,0, window->width-1,window->height-1, PAINT_BUFFER); DrawLeftSlider(window); #endif DrawWBlock(window,window->wblock); window->wblock->isgfxdatahere=true; #if !USE_OPENGL ClearUnusedWindowsAreas(window); Blt_unMarkVisible(window); // Need a better name for this function. #endif }