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 <campbell@blender.org>2022-02-02 05:15:43 +0300
committerCampbell Barton <campbell@blender.org>2022-02-02 05:53:46 +0300
commitd82372aee3a473226ea6b565f09cebd54310a4cd (patch)
tree3b85051e46aa7b1672d1f82c9466d764408532e9 /source/blender/draw
parent811606a0640f93eca3249a3f15c5a4e61922abeb (diff)
Cleanup: spelling in comments
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/image/image_drawing_mode.hh21
-rw-r--r--source/blender/draw/intern/draw_cache_impl_subdivision.cc4
2 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 dfff93b9429..3be34ef6acb 100644
--- a/source/blender/draw/engines/image/image_drawing_mode.hh
+++ b/source/blender/draw/engines/image/image_drawing_mode.hh
@@ -227,8 +227,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());
@@ -253,9 +252,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,
floor((changed_overlapping_region_in_uv_space.xmin - info.uv_bounds.xmin) *
@@ -275,8 +274,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);
@@ -437,17 +436,17 @@ 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_uv_bounds(region);
- // 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);
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index a24a3a5a3a7..4a8670a9ee2 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -999,7 +999,7 @@ static bool draw_subdiv_build_cache(DRWSubdivCache *cache,
cache->face_ptex_offset = BKE_subdiv_face_ptex_offset_get(subdiv);
- // Build patch coordinates for all the face dots
+ /* Build patch coordinates for all the face dots. */
cache->fdots_patch_coords = gpu_vertbuf_create_from_format(get_blender_patch_coords_format(),
mesh_eval->totpoly);
CompressedPatchCoord *blender_fdots_patch_coords = (CompressedPatchCoord *)GPU_vertbuf_get_data(
@@ -1760,7 +1760,7 @@ static void draw_subdiv_cache_ensure_mat_offsets(DRWSubdivCache *cache,
int *mat_start = static_cast<int *>(MEM_callocN(sizeof(int) * mat_len, "subdiv mat_start"));
int *subdiv_polygon_offset = cache->subdiv_polygon_offset;
- // TODO: parallel_reduce?
+ /* TODO: parallel_reduce? */
for (int i = 0; i < mesh_eval->totpoly; i++) {
const MPoly *mpoly = &mesh_eval->mpoly[i];
const int next_offset = (i == mesh_eval->totpoly - 1) ? number_of_quads :