Cleanup: pass a const ibuf to ED_draw_imbuf_method

This commit is contained in:
Campbell Barton
2023-07-02 19:40:28 +10:00
parent 1c104b16dd
commit 4be274a703
2 changed files with 2 additions and 2 deletions

View File

@@ -205,7 +205,7 @@ void ED_draw_imbuf_ctx_clipping(const struct bContext *C,
float zoom_x,
float zoom_y);
int ED_draw_imbuf_method(struct ImBuf *ibuf);
int ED_draw_imbuf_method(const struct ImBuf *ibuf);
/**
* Don't move to `GPU_immediate_util.h` because this uses user-prefs and isn't very low level.

View File

@@ -621,7 +621,7 @@ void ED_draw_imbuf_ctx(
ED_draw_imbuf_ctx_clipping(C, ibuf, x, y, use_filter, 0.0f, 0.0f, 0.0f, 0.0f, zoom_x, zoom_y);
}
int ED_draw_imbuf_method(ImBuf *ibuf)
int ED_draw_imbuf_method(const ImBuf *ibuf)
{
if (U.image_draw_method == IMAGE_DRAW_METHOD_AUTO) {
/* Use faster GLSL when CPU to GPU transfer is unlikely to be a bottleneck,