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:
authorJeroen Bakker <jeroen@blender.org>2021-09-08 11:28:45 +0300
committerJeroen Bakker <jeroen@blender.org>2021-09-08 11:28:45 +0300
commit60e9fb9929c08e705f21fabad9d832ed25e01bd8 (patch)
tree9216bd2f91015031bb61869df66a4cb9c0ca6f64
parent2b2d427bbac6716092336f0d0f698706a390f4ad (diff)
Cleanup: consisten naming slot -> resolution.
Makes naming consistent with image_gpu.c
-rw-r--r--source/blender/blenkernel/intern/image.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 966dd0595da..33f007c6dee 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -155,8 +155,8 @@ static void image_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, c
for (int eye = 0; eye < 2; eye++) {
for (int i = 0; i < TEXTARGET_COUNT; i++) {
- for (int slot = 0; slot < IMA_TEXTURE_RESOLUTION_LEN; slot++) {
- image_dst->gputexture[i][eye][slot] = NULL;
+ for (int resolution = 0; resolution < IMA_TEXTURE_RESOLUTION_LEN; resolution++) {
+ image_dst->gputexture[i][eye][resolution] = NULL;
}
}
}
@@ -210,10 +210,10 @@ static void image_foreach_cache(ID *id,
for (int eye = 0; eye < 2; eye++) {
for (int a = 0; a < TEXTARGET_COUNT; a++) {
- for (int slot = 0; slot < IMA_TEXTURE_RESOLUTION_LEN; slot++) {
- key.offset_in_ID = offsetof(Image, gputexture[a][eye][slot]);
+ for (int resolution = 0; resolution < IMA_TEXTURE_RESOLUTION_LEN; resolution++) {
+ key.offset_in_ID = offsetof(Image, gputexture[a][eye][resolution]);
key.cache_v = image->gputexture[a][eye];
- function_callback(id, &key, (void **)&image->gputexture[a][eye][slot], 0, user_data);
+ function_callback(id, &key, (void **)&image->gputexture[a][eye][resolution], 0, user_data);
}
}
}
@@ -243,8 +243,8 @@ static void image_blend_write(BlendWriter *writer, ID *id, const void *id_addres
BLI_listbase_clear(&ima->gpu_refresh_areas);
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 2; j++) {
- for (int slot = 0; slot < IMA_TEXTURE_RESOLUTION_LEN; slot++) {
- ima->gputexture[i][j][slot] = NULL;
+ for (int resolution = 0; resolution < IMA_TEXTURE_RESOLUTION_LEN; resolution++) {
+ ima->gputexture[i][j][resolution] = NULL;
}
}
}
@@ -683,8 +683,8 @@ bool BKE_image_has_opengl_texture(Image *ima)
{
for (int eye = 0; eye < 2; eye++) {
for (int i = 0; i < TEXTARGET_COUNT; i++) {
- for (int slot = 0; slot < IMA_TEXTURE_RESOLUTION_LEN; slot++) {
- if (ima->gputexture[i][eye][slot] != NULL) {
+ for (int resolution = 0; resolution < IMA_TEXTURE_RESOLUTION_LEN; resolution++) {
+ if (ima->gputexture[i][eye][resolution] != NULL) {
return true;
}
}
@@ -3539,10 +3539,10 @@ static void image_free_tile(Image *ima, ImageTile *tile)
}
for (int eye = 0; eye < 2; eye++) {
- for (int slot = 0; slot < IMA_TEXTURE_RESOLUTION_LEN; slot++) {
- if (ima->gputexture[i][eye][slot] != NULL) {
- GPU_texture_free(ima->gputexture[i][eye][slot]);
- ima->gputexture[i][eye][slot] = NULL;
+ for (int resolution = 0; resolution < IMA_TEXTURE_RESOLUTION_LEN; resolution++) {
+ if (ima->gputexture[i][eye][resolution] != NULL) {
+ GPU_texture_free(ima->gputexture[i][eye][resolution]);
+ ima->gputexture[i][eye][resolution] = NULL;
}
}
}
@@ -3811,15 +3811,15 @@ ImageTile *BKE_image_add_tile(struct Image *ima, int tile_number, const char *la
}
for (int eye = 0; eye < 2; eye++) {
- for (int slot = 0; slot < IMA_TEXTURE_RESOLUTION_LEN; slot++) {
+ for (int resolution = 0; resolution < IMA_TEXTURE_RESOLUTION_LEN; resolution++) {
/* Reallocate GPU tile array. */
- if (ima->gputexture[TEXTARGET_2D_ARRAY][eye][slot] != NULL) {
- GPU_texture_free(ima->gputexture[TEXTARGET_2D_ARRAY][eye][slot]);
- ima->gputexture[TEXTARGET_2D_ARRAY][eye][slot] = NULL;
+ if (ima->gputexture[TEXTARGET_2D_ARRAY][eye][resolution] != NULL) {
+ GPU_texture_free(ima->gputexture[TEXTARGET_2D_ARRAY][eye][resolution]);
+ ima->gputexture[TEXTARGET_2D_ARRAY][eye][resolution] = NULL;
}
- if (ima->gputexture[TEXTARGET_TILE_MAPPING][eye][slot] != NULL) {
- GPU_texture_free(ima->gputexture[TEXTARGET_TILE_MAPPING][eye][slot]);
- ima->gputexture[TEXTARGET_TILE_MAPPING][eye][slot] = NULL;
+ if (ima->gputexture[TEXTARGET_TILE_MAPPING][eye][resolution] != NULL) {
+ GPU_texture_free(ima->gputexture[TEXTARGET_TILE_MAPPING][eye][resolution]);
+ ima->gputexture[TEXTARGET_TILE_MAPPING][eye][resolution] = NULL;
}
}
}
@@ -3875,16 +3875,16 @@ void BKE_image_reassign_tile(struct Image *ima, ImageTile *tile, int new_tile_nu
}
for (int eye = 0; eye < 2; eye++) {
- for (int slot = 0; slot < IMA_TEXTURE_RESOLUTION_LEN; slot++) {
+ for (int resolution = 0; resolution < IMA_TEXTURE_RESOLUTION_LEN; resolution++) {
/* Reallocate GPU tile array. */
- if (ima->gputexture[TEXTARGET_2D_ARRAY][eye][slot] != NULL) {
- GPU_texture_free(ima->gputexture[TEXTARGET_2D_ARRAY][eye][slot]);
- ima->gputexture[TEXTARGET_2D_ARRAY][eye][slot] = NULL;
+ if (ima->gputexture[TEXTARGET_2D_ARRAY][eye][resolution] != NULL) {
+ GPU_texture_free(ima->gputexture[TEXTARGET_2D_ARRAY][eye][resolution]);
+ ima->gputexture[TEXTARGET_2D_ARRAY][eye][resolution] = NULL;
}
- if (ima->gputexture[TEXTARGET_TILE_MAPPING][eye][slot] != NULL) {
- GPU_texture_free(ima->gputexture[TEXTARGET_TILE_MAPPING][eye][slot]);
- ima->gputexture[TEXTARGET_TILE_MAPPING][eye][slot] = NULL;
+ if (ima->gputexture[TEXTARGET_TILE_MAPPING][eye][resolution] != NULL) {
+ GPU_texture_free(ima->gputexture[TEXTARGET_TILE_MAPPING][eye][resolution]);
+ ima->gputexture[TEXTARGET_TILE_MAPPING][eye][resolution] = NULL;
}
}
}