diff options
Diffstat (limited to 'source/blender/draw/engines/image/image_drawing_mode.hh')
-rw-r--r-- | source/blender/draw/engines/image/image_drawing_mode.hh | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh index b56f3062901..52d57ea2ba5 100644 --- a/source/blender/draw/engines/image/image_drawing_mode.hh +++ b/source/blender/draw/engines/image/image_drawing_mode.hh @@ -227,7 +227,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD IMAGE_InstanceData &instance_data) const { while (iterator.get_next_change() == ePartialUpdateIterResult::ChangeAvailable) { - /* Quick exit when tile_buffer isn't availble. */ + /* Quick exit when tile_buffer isn't available. */ if (iterator.tile_data.tile_buffer == nullptr) { continue; } @@ -247,8 +247,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD GPUTexture *texture = info.texture; const float texture_width = GPU_texture_width(texture); const float texture_height = GPU_texture_height(texture); - // TODO - // early bound check. + /* TODO: early bound check. */ ImageTileWrapper tile_accessor(iterator.tile_data.tile); float tile_offset_x = static_cast<float>(tile_accessor.get_tile_x_offset()); float tile_offset_y = static_cast<float>(tile_accessor.get_tile_y_offset()); @@ -274,9 +273,9 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD if (!region_overlap) { continue; } - // convert the overlapping region to texel space and to ss_pixel space... - // TODO: first convert to ss_pixel space as integer based. and from there go back to texel - // space. But perhaps this isn't needed and we could use an extraction offset somehow. + /* Convert the overlapping region to texel space and to ss_pixel space... + * TODO: first convert to ss_pixel space as integer based. and from there go back to texel + * space. But perhaps this isn't needed and we could use an extraction offset somehow. */ rcti gpu_texture_region_to_update; BLI_rcti_init( &gpu_texture_region_to_update, @@ -297,8 +296,8 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD ceil((changed_overlapping_region_in_uv_space.ymin - tile_offset_y) * tile_height), ceil((changed_overlapping_region_in_uv_space.ymax - tile_offset_y) * tile_height)); - // Create an image buffer with a size - // extract and scale into an imbuf + /* Create an image buffer with a size. + * Extract and scale into an imbuf. */ const int texture_region_width = BLI_rcti_size_x(&gpu_texture_region_to_update); const int texture_region_height = BLI_rcti_size_y(&gpu_texture_region_to_update); @@ -394,7 +393,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD * * Returns true when a float buffer was created. Somehow the VSE cache increases the ref * counter, but might use a different mechanism for destructing the image, that doesn't free the - * rect_float as the refcounter isn't 0. To work around this we destruct any created local + * rect_float as the reference-counter isn't 0. To work around this we destruct any created local * buffers ourself. */ bool ensure_float_buffer(ImBuf &image_buffer) const @@ -477,18 +476,18 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD instance_data->partial_update.ensure_image(image); instance_data->clear_dirty_flag(); - // Step: Find out which screen space textures are needed to draw on the screen. Remove the - // screen space textures that aren't needed. + /* Step: Find out which screen space textures are needed to draw on the screen. Remove the + * screen space textures that aren't needed. */ const ARegion *region = draw_ctx->region; method.update_screen_space_bounds(region); method.update_region_uv_bounds(region); method.update_screen_uv_bounds(); - // Step: Update the GPU textures based on the changes in the image. + /* Step: Update the GPU textures based on the changes in the image. */ instance_data->update_gpu_texture_allocations(); update_textures(*instance_data, image, iuser); - // Step: Add the GPU textures to the shgroup. + /* Step: Add the GPU textures to the shgroup. */ instance_data->update_batches(); add_depth_shgroups(*instance_data, image, iuser); add_shgroups(instance_data); |