Enhance graphics editor performance with batch processing and profiling
- Integrated performance profiling using ScopedTimer in GraphicsEditor and ScreenEditor for better timing insights. - Implemented batch texture updates in GraphicsEditor and ScreenEditor to reduce individual texture update calls, improving rendering efficiency. - Enhanced tile rendering in ScreenEditor with pre-allocated vectors for batch operations, optimizing drawing performance. - Added safety checks and validation in various components to prevent crashes and ensure data integrity during rendering operations. - Updated Bitmap and Arena classes to support improved texture management and synchronization, enhancing overall graphics performance.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#include "app/editor/overworld/map_properties.h"
|
||||
|
||||
#include "app/core/performance_monitor.h"
|
||||
#include "app/editor/overworld/overworld_editor.h"
|
||||
#include "app/editor/overworld/ui_constants.h"
|
||||
#include "app/gfx/atlas_renderer.h"
|
||||
#include "app/gui/canvas.h"
|
||||
#include "app/gui/color.h"
|
||||
#include "app/gui/icons.h"
|
||||
@@ -1050,6 +1052,8 @@ std::string MapPropertiesSystem::GetOverlayDescription(uint16_t overlay_id) {
|
||||
void MapPropertiesSystem::DrawOverlayPreviewOnMap(int current_map,
|
||||
int current_world,
|
||||
bool show_overlay_preview) {
|
||||
gfx::ScopedTimer timer("map_properties_draw_overlay_preview");
|
||||
|
||||
if (!show_overlay_preview || !maps_bmp_ || !canvas_)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user