From 8f565f5a6ffa4f6170caca2de50a733e8c72367a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 16 Aug 2019 05:41:43 +1000 Subject: WM: reuse visible region calculation Avoids calculating the visible part of a region whenever on-screen overlays are drawn. --- source/blender/editors/include/ED_screen.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include/ED_screen.h') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index e67a3b003fc..c7ee7be49b5 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -124,7 +124,8 @@ void ED_region_image_metadata_draw( void ED_region_image_metadata_panel_draw(struct ImBuf *ibuf, struct uiLayout *layout); void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy); float ED_region_blend_alpha(struct ARegion *ar); -void ED_region_visible_rect(struct ARegion *ar, struct rcti *rect); +void ED_region_visible_rect_calc(struct ARegion *ar, struct rcti *rect); +const rcti *ED_region_visible_rect(ARegion *ar); bool ED_region_is_overlap(int spacetype, int regiontype); int ED_region_snap_size_test(const struct ARegion *ar); -- cgit v1.2.3