diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-01-05 15:43:32 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-01-05 15:53:33 +0300 |
commit | 7cd6f667e33e60f3d53e465023bb75f90f499b07 (patch) | |
tree | f799d32f50aa4c84e0c446f7d95edf3f6e83b1ae /source/blender/draw/tests | |
parent | f41de6dc46ad0849d93b72580fefffdde4546cba (diff) |
Fix T84053: Mask overlay in image editor not working
The mask overlay wasn't part of the overlay engine. The reasoning nehind
this was that more editors used the mask overlay and most of them used
old drawing code. This patch adds the mask overlay drawing to the draw
overlay engine. This code path will only be used by the image editor
VSE, Compositor and Movie Clip editor will still use the previous
method.
During this patch some alternatives have been researched:
1. `ED_mask_draw_region`: this would lead to different code paths when
drawing in the image editor, and some hacks to retrieve the correct
framebuffer.
2. Add mask drawing to image engine: Would lead to incorrect color
management when viewing the mask.
3. Add mask drawing to image engine and overlay engine: Would lead to
duplicated code.
4. Add mask drawing to overlay engine and for combined overlay select
the correct framebuffer.
Option 4 was chosen as the exception (switching framebuffers) can be
done without hacks. The code stays clean.
Diffstat (limited to 'source/blender/draw/tests')
-rw-r--r-- | source/blender/draw/tests/shaders_test.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/tests/shaders_test.cc b/source/blender/draw/tests/shaders_test.cc index d365f76aabe..2c8b3d85a0a 100644 --- a/source/blender/draw/tests/shaders_test.cc +++ b/source/blender/draw/tests/shaders_test.cc @@ -241,6 +241,7 @@ TEST_F(DrawTest, overlay_glsl_shaders) EXPECT_NE(OVERLAY_shader_edit_uv_stretching_angle_get(), nullptr); EXPECT_NE(OVERLAY_shader_edit_uv_tiled_image_borders_get(), nullptr); EXPECT_NE(OVERLAY_shader_edit_uv_stencil_image(), nullptr); + EXPECT_NE(OVERLAY_shader_edit_uv_mask_image(), nullptr); EXPECT_NE(OVERLAY_shader_extra(false), nullptr); EXPECT_NE(OVERLAY_shader_extra(true), nullptr); EXPECT_NE(OVERLAY_shader_extra_groundline(), nullptr); |