From 5f6fb5bb41ed0057f0e2f0ccded717fbf04e55e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 29 Jul 2020 18:13:19 +0200 Subject: Cleanup: Split gpu_texture_image.c into BKE and IMB modules This is in order to disolve GPU_draw.h into more meaningful code blocks. All the Image related function are in `image_gpu.c`. All the MovieClip related function are in `movieclip.c`. The IMB module now has a connection with GPU. This is not strickly necessary and the code could be move to `image_gpu.c` if needed. The Image garbage collection is also ported to `image_gpu.c`. --- source/blender/imbuf/IMB_imbuf.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source/blender/imbuf/IMB_imbuf.h') diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 478297e61b2..089174f8d5a 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -88,6 +88,12 @@ struct GSet; struct ImageFormatData; struct Stereo3dFormat; +/** + * + * \attention defined in GPU_texture.h + */ +struct GPUTexture; + /** * * \attention Defined in allocimbuf.c @@ -727,6 +733,24 @@ void IMB_processor_apply_threaded_scanlines(int total_scanlines, void IMB_ffmpeg_init(void); const char *IMB_ffmpeg_last_error(void); +/** + * + * \attention defined in util_gpu.c + */ +void IMB_gpu_get_format(const struct ImBuf *ibuf, + bool high_bitdepth, + uint *r_data_format, + uint *r_texture_format); +void *IMB_gpu_get_data(const struct ImBuf *ibuf, + const bool do_rescale, + const int rescale_size[2], + const bool compress_as_srgb, + const bool store_premultiplied, + bool *r_freedata); +struct GPUTexture *IMB_create_gpu_texture(struct ImBuf *ibuf, + bool use_high_bitdepth, + bool use_premult); + /** * * \attention defined in stereoimbuf.c -- cgit v1.2.3