Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-08-15 22:41:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-15 23:44:25 +0300
commit8f565f5a6ffa4f6170caca2de50a733e8c72367a (patch)
tree95545357cdaefc10a0d11821c82a483c9aa382cb /source/blender/editors/space_image/image_draw.c
parent266e7b67fd3e2c219d8646e37a2fb3e393df4bda (diff)
WM: reuse visible region calculation
Avoids calculating the visible part of a region whenever on-screen overlays are drawn.
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r--source/blender/editors/space_image/image_draw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 97a3c7f2480..9a2b0d95c20 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -156,9 +156,8 @@ void ED_image_draw_info(Scene *scene,
char str[256];
int dx = 6;
/* local coordinate visible rect inside region, to accommodate overlapping ui */
- rcti rect;
- ED_region_visible_rect(ar, &rect);
- const int ymin = rect.ymin;
+ const rcti *rect = ED_region_visible_rect(ar);
+ const int ymin = rect->ymin;
const int dy = ymin + 0.3f * UI_UNIT_Y;
/* text colors */