Viewport: Add debug flag to disable landscape cache

pull/195/head
Jonathan G Rennison 4 years ago
parent bfc26a0180
commit 2c4808e239

@ -328,6 +328,7 @@ enum ViewportDebugFlags {
VDF_DIRTY_BLOCK_PER_SPLIT, VDF_DIRTY_BLOCK_PER_SPLIT,
VDF_DISABLE_DRAW_SPLIT, VDF_DISABLE_DRAW_SPLIT,
VDF_SHOW_NO_LANDSCAPE_MAP_DRAW, VDF_SHOW_NO_LANDSCAPE_MAP_DRAW,
VDF_DISABLE_LANDSCAPE_CACHE,
}; };
uint32 _viewport_debug_flags; uint32 _viewport_debug_flags;
@ -357,6 +358,11 @@ void ClearViewportCaches()
for (Viewport *vp : _viewport_window_cache) { for (Viewport *vp : _viewport_window_cache) {
ClearViewportCache(vp); ClearViewportCache(vp);
} }
if (unlikely(HasBit(_viewport_debug_flags, VDF_DISABLE_LANDSCAPE_CACHE))) {
for (Viewport *vp : _viewport_window_cache) {
ClearViewportLandPixelCache(vp);
}
}
} }
void DeleteWindowViewport(Window *w) void DeleteWindowViewport(Window *w)

Loading…
Cancel
Save