src/pi/ui/ViewManager.cpp
void ViewManager::drawActiveLayout(SDL_Surface * screen, bool useLocalScreenUpdate) {
	if(invalidate) {
		// Fill background with white
		SDL_FillRect(screen, NULL, 0xffffffff);
		// Draw tle layout
		getActiveLayout().draw(screen, true, false);
		// Draw the tab view
		if(tabView != NULL)
			tabView->draw(screen, true, false);
		// Update the whole screen
		SDL_Flip(screen);
		invalidate = false;
	}
	else {
		// Draw the layout
		getActiveLayout().draw(screen, false, useLocalScreenUpdate);
		// Draw the tab view
		if(tabView != NULL)
			tabView->draw(screen, false, useLocalScreenUpdate);
		// Update the whole screen if required
		if(!useLocalScreenUpdate)
			SDL_Flip(screen);
	}
}
/** Draw the currently active layout on the screen.
 * The 'useLocalScreenUpdate' could improve performance by updating only changed area of the screen **/
Draw the currently active layout on the screen.
The 'useLocalScreenUpdate' could improve performance by updating only changed area of the screen
Draw the currently active layout on the screen . The ' useLocalScreenUpdate ' could improve performance by updating only changed area of the screen
void ViewManager::drawActiveLayout(SDL_Surface * screen, bool useLocalScreenUpdate) {
	if(invalidate) {
		SDL_FillRect(screen, NULL, 0xffffffff);
		getActiveLayout().draw(screen, true, false);
		if(tabView != NULL)
			tabView->draw(screen, true, false);
		SDL_Flip(screen);
		invalidate = false;
	}
	else {
		getActiveLayout().draw(screen, false, useLocalScreenUpdate);
		if(tabView != NULL)
			tabView->draw(screen, false, useLocalScreenUpdate);
		 if required
		if(!useLocalScreenUpdate)
			SDL_Flip(screen);
	}
}
void ViewManager :: drawActiveLayout ( SDL_Surface * screen , bool useLocalScreenUpdate ) { if ( invalidate ) { SDL_FillRect ( screen , NULL , 0xffffffff ) ; getActiveLayout ( ) . draw ( screen , true , false ) ; if ( tabView != NULL ) tabView -> draw ( screen , true , false ) ; SDL_Flip ( screen ) ; invalidate = false ; } else { getActiveLayout ( ) . draw ( screen , false , useLocalScreenUpdate ) ; if ( tabView != NULL ) tabView -> draw ( screen , false , useLocalScreenUpdate ) ; if ( ! useLocalScreenUpdate ) SDL_Flip ( screen ) ; } }
Draw the currently active layout on the screen.
Draw the currently active layout on the screen .
// Fill background with white // Draw tle layout // Draw the tab view // Update the whole screen // Draw the layout // Draw the tab view // Update the whole screen if required