127 short is_break =
G.is_break;
139 bmain, depsgraph, scene, rectx, recty, render_size_mode,
nullptr, &context);
142 context.is_playing = screen->
animtimer !=
nullptr;
143 context.is_scrubbing = screen->
scrubbing;
178 G.is_break = is_break;
188 r_viewrect[0] *= render_data.
xasp / render_data.
yasp;
223 float viewport_size[4];
270 Mask *
mask = SEQ_active_mask_get(scene);
274 float aspx = 1.0f, aspy = 1.0f;
338 return texture_coord;
364 const float xmin = v2d.
tot.
xmin;
365 const float ymin = v2d.
tot.
ymin;
402 return texture_coord;
412 if (hist.
data.is_empty()) {
420 const uchar col_grid[4] = {128, 128, 128, 128};
426 float text_scale_x, text_scale_y;
429 float prev_label_right = -
FLT_MAX;
433 const size_t buf_len = strlen(graticule.
label);
434 float text_width, text_height;
436 text_width *= text_scale_x;
437 text_height *= text_scale_y;
438 const float gap = text_height * 1.5f;
440 const float label_left =
x - text_width * 0.5f;
441 const bool show_label = label_left > prev_label_right;
447 area.
ymax - gap * 0.5f - text_height * 0.5f,
451 prev_label_right =
x + text_width * 0.5f + text_height;
456 const uchar col_border[4] = {64, 64, 64, 128};
462 for (
int ch = 0; ch < 3; ++ch) {
466 uchar col_line[4] = {32, 32, 32, 255};
467 uchar col_area[4] = {64, 64, 64, 128};
471 const float yb = area.
ymin;
473 const uint bin_val = hist.
data[bin][ch];
479 const float x0 = area.
xmin + f0 *
w;
480 const float x1 = area.
xmin + f1 *
w;
482 const float y = area.
ymin + bin_val * y_scale;
483 quads.
add_quad(x0, yb, x0,
y, x1, yb, x1,
y, col_area);
495 const float3 yuv = yuv_matrix * rgb;
496 return float2(yuv.y, yuv.z);
508 const uchar col_grid[4] = {128, 128, 128, 128};
509 const float x0 = area.
xmin;
510 const float x1 = area.
xmax;
511 const float h = area.
ymax - area.
ymin;
514 float text_scale_x, text_scale_y;
517 float prev_label_top = -
FLT_MAX;
520 const float y = area.
ymin + h * graticule.
value;
521 const size_t buf_len = strlen(graticule.
label);
522 float text_width_px, text_height_px;
524 const float text_width = text_width_px * text_scale_x;
525 const float text_height = text_height_px * text_scale_y;
526 const float pad_x = text_height_px * text_scale_x;
527 const float gap = text_width + pad_x;
529 const float label_bottom =
y - text_height * 0.5f;
530 const bool show_label = label_bottom > prev_label_top;
535 x0 + (gap - text_width) * 0.5f,
536 y - text_height * 0.5f,
540 prev_label_top =
y + text_height * 0.5f + text_height;
553 const float skin_rad =
DEG2RADF(123.0f);
558 const float radius = ((
w < h) ?
w : h) * 0.5f;
564 constexpr int circle_delta = 6;
565 constexpr int num_circle_points = 360 / circle_delta;
566 float2 circle_pos[num_circle_points];
567 float3 circle_col[num_circle_points];
568 for (
int i = 0; i < num_circle_points; i++) {
569 float a =
DEG2RADF(i * circle_delta);
575 float3 col = inv_yuv_to_rec709 * yuv;
583 constexpr float alpha_f = 0.8f;
584 constexpr uchar alpha_b =
uchar(alpha_f * 255.0f);
585 const uchar4 col_center(50, 50, 50, alpha_b);
587 uchar4 col1(0, 0, 0, alpha_b);
588 uchar4 col2(0, 0, 0, alpha_b);
589 uchar4 col3(0, 0, 0, alpha_b);
593 constexpr float mul_background = 0.2f;
594 for (
int i = 0; i < num_circle_points; i += 2) {
596 int idx2 = (i + 1) % num_circle_points;
597 int idx3 = (i + 2) % num_circle_points;
598 float2 pt1 = center + circle_pos[idx1] * radius;
599 float2 pt2 = center + circle_pos[idx2] * radius;
600 float2 pt3 = center + circle_pos[idx3] * radius;
601 float3 rgb1 = circle_col[idx1] * mul_background;
602 float3 rgb2 = circle_col[idx2] * mul_background;
603 float3 rgb3 = circle_col[idx3] * mul_background;
622 const float outer_radius = radius * 1.02f;
623 for (
int i = 0; i < num_circle_points; i++) {
625 int idx2 = (i + 1) % num_circle_points;
626 float2 pt1a = center + circle_pos[idx1] * radius;
627 float2 pt2a = center + circle_pos[idx2] * radius;
628 float2 pt1b = center + circle_pos[idx1] * outer_radius;
629 float2 pt2b = center + circle_pos[idx2] * outer_radius;
630 float3 rgb1 = circle_col[idx1];
631 float3 rgb2 = circle_col[idx2];
635 pt1a.x, pt1a.y, pt1b.x, pt1b.y, pt2a.x, pt2a.y, pt2b.x, pt2b.y, col1, col1, col2, col2);
642 const uchar4 col_grid(128, 128, 128, 128);
645 quads.
add_line(center.x - radius, center.y, center.x + radius, center.y, col_grid);
646 quads.
add_line(center.x, center.y - radius, center.x, center.y + radius, col_grid);
649 for (
int j = 1; j < 5; j++) {
650 float r = radius * j * 0.2f;
651 for (
int i = 0; i < num_circle_points; i++) {
653 int idx2 = (i + 1) % num_circle_points;
654 float2 pt1 = center + circle_pos[idx1] * r;
655 float2 pt2 = center + circle_pos[idx2] * r;
656 quads.
add_line(pt1.x, pt1.y, pt2.x, pt2.y, col_grid);
661 const float3 primaries[6] = {
669 const char *names =
"RYGCBM";
672 char buf[2] = {
'M', 0};
673 float text_scale_x, text_scale_y;
675 float text_width, text_height;
677 text_width *= text_scale_x;
678 text_height *= text_scale_y;
680 const uchar4 col_target(128, 128, 128, 192);
681 const float delta = radius * 0.01f;
682 for (
int i = 0; i < 6; i++) {
683 float3 safe = primaries[i] * 0.75f;
685 quads.
add_wire_quad(pos.x - delta, pos.y - delta, pos.x + delta, pos.y + delta, col_target);
689 pos.x + delta * 1.2f + text_width / 4,
690 pos.y - text_height / 2,
697 const uchar4 col_tone(255, 102, 0, 128);
700 center.x +
cosf(skin_rad) * radius,
701 center.y +
sinf(skin_rad) * radius,
712 return "VSE Vectorscope";
714 return "VSE Waveform";
718 return "VSE Histogram";
720 return "VSE Overexposed";
741 scene, timeline_frame, space_sequencer.
multiview_eye, 0, image_width, image_height);
742 if (scope_texture ==
nullptr) {
764 uchar black[4] = {0, 0, 0, 255};
782 imm_format,
"texCoord", gpu::VertAttrType::SFLOAT_32_32);
785 immUniform1i(
"img_premultiplied", premultiplied ? 1 : 0);
809 int viewport_size_i[4];
811 const int2 viewport_size =
int2(viewport_size_i[2], viewport_size_i[3]);
812 const int2 image_size =
int2(image_width, image_height);
947 if (scope_texture !=
nullptr) {
955 "seq_scope_display_buf", width, height, 1, format, usage,
nullptr);
956 if (scope_texture ==
nullptr) {
973 imm_format,
"texCoord", gpu::VertAttrType::SFLOAT_32_32);
978 const bool predivide = input_ibuf->
float_data() !=
nullptr;
989 const rctf texture_coord{0.0f, 1.0f, 0.0f, 1.0f};
1011 const int timeline_frame)
1067 if (is_active_seq) {
1075 immVertex2f(pos, strip_image_quad[0].
x, strip_image_quad[0].
y);
1076 immVertex2f(pos, strip_image_quad[1].
x, strip_image_quad[1].
y);
1077 immVertex2f(pos, strip_image_quad[2].
x, strip_image_quad[2].
y);
1078 immVertex2f(pos, strip_image_quad[3].
x, strip_image_quad[3].
y);
1099 const int line_start = selection_start.y;
1100 const int line_end = selection_end.y;
1102 for (
int line_index = line_start; line_index <= line_end; line_index++) {
1107 if (line_index == selection_start.y) {
1108 character_start = line.
characters[selection_start.x];
1110 if (line_index == selection_end.y) {
1111 character_end = line.
characters[selection_end.x];
1118 float2 selection_quad[4] = {
1119 {character_start.
position.x, line_y},
1129 selection_quad[i] += view_offs;
1132 for (
int i : {0, 1, 2, 2, 3, 0}) {
1133 immVertex2f(pos, selection_quad[i][0], selection_quad[i][1]);
1144 coords_view.x = std::round(coords_view.x);
1145 coords_view.y = std::round(coords_view.y);
1146 float2 coords_region_aligned;
1148 v2d, coords_view.x, coords_view.y, &coords_region_aligned.x, &coords_region_aligned.y);
1149 return coords_region_aligned;
1161 const float cursor_width = 10;
1162 float2 cursor_coords = runtime->
lines[cursor_position.y].characters[cursor_position.x].position;
1168 cursor_coords.x = std::max(cursor_coords.x, bound_left);
1169 cursor_coords.x = std::min(cursor_coords.x, bound_right);
1173 float2 cursor_quad[4] = {
1174 {cursor_coords.x, cursor_coords.y},
1175 {cursor_coords.x, cursor_coords.y + runtime->
line_height},
1176 {cursor_coords.x + cursor_width, cursor_coords.y + runtime->
line_height},
1177 {cursor_coords.x + cursor_width, cursor_coords.y},
1185 cursor_quad[i] += descender_offs + view_offs;
1188 for (
int i : {0, 1, 2, 2, 3, 0}) {
1189 immVertex2f(pos, cursor_quad[i][0], cursor_quad[i][1]);
1254 viewport, &view_settings, &display_settings, render_data.
dither_intensity);
1312 const rctf &texture_coord)
1317 imm_format,
"texCoord", gpu::VertAttrType::SFLOAT_32_32);
1337 const char *texture_colorspace_name,
1338 const bool predivide,
1340 const rctf &texture_coord)
1345 imm_format,
"texCoord", gpu::VertAttrType::SFLOAT_32_32);
1369 const int timeline_frame)
1396 scene, channels, editing.current_strips(), timeline_frame, 0);
1399 for (
Strip *strip : strips) {
1431 float original_proj[4][4];
1451 const float f5 = 0.25f;
1452 const float f10 = 0.5f;
1453 const float f20 = 1.0f;
1455 const float red[3] = {1.0f, 0.0f, 0.0f};
1456 const float white[3] = {1.0f, 1.0f, 1.0f};
1458 const int segments = 16;
1460 for (
int i = 0; i < segments + 1; i++) {
1465 immAttr3fv(attr_id.col, (i % 2 == 0) ? red : white);
1470 float crosshair_color[3];
1531 texture_format = gpu::TextureFormat::SFLOAT_32;
1534 texture_format = gpu::TextureFormat::SFLOAT_32_32_32;
1537 texture_format = gpu::TextureFormat::SFLOAT_32_32_32_32;
1540 BLI_assert_msg(0,
"Incompatible number of channels for float buffer in sequencer");
1545 "seq_display_buf", ibuf.
x, ibuf.
y, 1, texture_format, texture_usage,
nullptr);
1555 gpu::TextureFormat::UNORM_8_8_8_8,
1596 const ImBuf *current_ibuf,
1598 const ImBuf *reference_ibuf,
1603 if (current_texture) {
1608 const bool predivide = (current_ibuf->
float_data() !=
nullptr);
1610 *current_texture, texture_colorspace, predivide,
position, texture_coord);
1613 if (reference_texture) {
1618 const bool predivide = (reference_ibuf->
float_data() !=
nullptr);
1620 *reference_texture, texture_colorspace, predivide,
position, texture_coord);
1654 const ImBuf *input_ibuf,
1656 const int timeline_frame)
1661 const bool has_gpu_scope = input_ibuf && input_texture &&
1663 space_sequencer.
zebra != 0) ||
1669 if (has_cpu_scope) {
1671 space_sequencer, view_settings, display_settings, *input_ibuf, timeline_frame);
1673 if (has_gpu_scope) {
1685 if (has_cpu_scope || has_gpu_scope) {
1705 if (current_texture) {
1710 if (reference_texture) {
1737 if (show_preview_image && input_ibuf) {
1762 if ((is_playing ==
false) && show_preview_image &&
is_cursor_visible(space_sequencer)) {
1781 int xoffset = rect->
xmin +
U.widget_unit;
1782 int yoffset = rect->
ymax;
1787 float text_color[4] = {1, 1, 1, 1}, shadow_color[4] = {0, 0, 0, 0.8f};
1808 if (
G.is_rendering || !scene || !scene->ed ||
1817 const Editing &editing = *scene->ed;
1822 scene->view_settings,
1823 scene->display_settings,
1833 const bool need_current_frame = !(draw_frame_overlay && (space_sequencer.
overlay_frame_type ==
1835 const bool need_reference_frame = draw_frame_overlay && space_sequencer.
overlay_frame_type !=
1840 const int timeline_frame = show_edit_point ? editing.edit_point().value_or(render_data.
cfra) :
1853 ImBuf *current_ibuf =
nullptr;
1854 ImBuf *reference_ibuf =
nullptr;
1856 if (need_reference_frame) {
1859 C, timeline_frame + offset, view_names[space_sequencer.
multiview_eye]);
1860 if (use_gpu_texture && reference_ibuf) {
1864 if (need_current_frame) {
1867 if (use_gpu_texture && current_ibuf) {
1874 if (current_texture ==
nullptr) {
1886 ImBuf *overlay_ibuf = need_current_frame ? current_ibuf : reference_ibuf;
1887 gpu::Texture *overlay_texture = need_current_frame ? current_texture : reference_texture;
1894 show_imbuf ? current_texture :
nullptr,
1896 show_imbuf ? reference_texture :
nullptr);
1902 scene->view_settings,
1903 scene->display_settings,
1912 sequencer_draw_maskedit(
C, scene, region, sseq);
1917 if (reference_texture) {
#define STEREO_RIGHT_NAME
#define REGION_DRAW_POST_VIEW
#define GPU_batch_uniform_1f(batch, name, x)
#define GPU_batch_uniform_1i(batch, name, x)
#define GPU_FRAMEBUFFER_FREE_SAFE(fb)
#define GPU_ATTACHMENT_TEXTURE(_texture)
#define GPU_ATTACHMENT_NONE
#define GPU_framebuffer_ensure_config(_fb,...)
#define PRF_scope_with_name(ui_name, category)
#define ND_SEQUENCER_PREFETCH
#define BLI_assert_msg(a, msg)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
constexpr int64_t first() const
constexpr int64_t last(const int64_t n=0) const
constexpr IndexRange()=default
void add_quad(float x1, float y1, float x2, float y2, const uchar color[4])
void add_line(float x1, float y1, float x2, float y2, const uchar color[4])
void add_wire_quad(float x1, float y1, float x2, float y2, const uchar color[4])
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
IndexRange strip_text_selection_range_get(const TextVars *data)
static void draw_histogram(ARegion ®ion, const ScopeHistogram &hist, SeqQuadsBatch &quads, const rctf &area, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
static void sequencer_preview_draw_color_render(const SpaceSeq &space_sequencer, const Editing &editing, ARegion ®ion, const ImBuf *current_ibuf, gpu::Texture *current_texture, const ImBuf *reference_ibuf, gpu::Texture *reference_texture)
static Strip * special_seq_update
static gpu::Texture * create_texture(const ImBuf &ibuf)
static void preview_draw_end(const bContext *C)
static void preview_draw_texture_simple(gpu::Texture &texture, const rctf &position, const rctf &texture_coord)
static void preview_draw_color_render_begin(ARegion ®ion)
static float2 rgb_to_cbcr(const float3x3 &yuv_matrix, const float3 &rgb)
static void text_selection_draw(const bContext *C, const Strip *strip, uint pos)
static void sequencer_preview_clear()
bool sequencer_text_editing_active_poll(bContext *C)
static void preview_draw_overlay_begin(ARegion ®ion)
static void sequencer_draw_scopes(Scene *scene, const SpaceSeq &space_sequencer, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, ARegion ®ion, int timeline_frame, int image_width, int image_height, bool premultiplied)
static void sequencer_preview_draw_overlays(const bContext *C, const wmWindowManager &wm, Scene *scene, const SpaceSeq &space_sequencer, const Editing &editing, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, ARegion ®ion, gpu::Texture *current_texture, gpu::Texture *reference_texture, const ImBuf *input_ibuf, gpu::Texture *input_texture, const int timeline_frame)
static float2 coords_region_view_align(const View2D *v2d, const float2 coords)
void special_preview_clear()
static rctf preview_get_reference_position(const SpaceSeq &space_sequencer, const Editing &editing, const ARegion ®ion)
static void text_edit_draw(const bContext *C)
static void draw_registered_callbacks(const bContext *C, ARegion ®ion)
static rctf preview_get_full_position(const ARegion ®ion)
static void sequencer_preview_draw_empty(ARegion ®ion)
static void preview_draw_texture_to_linear(gpu::Texture &texture, const char *texture_colorspace_name, const bool predivide, const rctf &position, const rctf &texture_coord)
static const char * get_scope_debug_name(eSpaceSeq_RegionType type)
static bool check_scope_needs_input_texture(const SpaceSeq &sseq)
static rctf preview_get_full_texture_coord()
void sequencer_preview_region_draw(const bContext *C, ARegion *region)
static void update_cpu_scopes(const SpaceSeq &space_sequencer, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, const ImBuf &ibuf, const int timeline_frame)
static void sequencer_stop_running_jobs(const bContext *C, Scene *scene)
int2 strip_text_cursor_offset_to_position(const seq::TextVarsRuntime *runtime, int cursor_offset)
static void preview_draw_all_image_overlays(const bContext *C, const Scene *scene, const Editing &editing, const int timeline_frame)
static void draw_waveform_graticule(ARegion *region, SeqQuadsBatch &quads, const rctf &area, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
static rctf preview_get_reference_texture_coord(const SpaceSeq &space_sequencer, const Editing &editing)
static void text_edit_draw_cursor(const bContext *C, const Strip *strip, uint pos)
Strip * strip_under_mouse_get(const Scene *scene, const View2D *v2d, const int mval[2])
Strip * special_preview_get()
bool sequencer_view_preview_only_poll(const bContext *C)
void sequencer_special_update_set(Strip *strip)
void special_preview_set(bContext *C, const int mval[2])
static void sequencer_draw_borders_overlay(const SpaceSeq &sseq, const View2D &v2d, const Scene *scene)
static void draw_cursor_2d(const ARegion *region, const float2 &cursor)
static void seq_prefetch_wm_notify(const bContext *C, Scene *scene)
bool check_show_imbuf(const SpaceSeq &sseq)
static void sequencer_draw_gpencil_overlay(const bContext *C)
static int get_reference_frame_offset(const Editing &editing, const RenderData &render_data)
void sequencer_scrubbing_region_draw(const bContext *C, ARegion *region)
ImBuf * sequencer_ibuf_get(const bContext *C, int timeline_frame, const char *viewname)
static void strip_draw_image_origin_and_outline(const bContext *C, Strip *strip, bool is_active_seq)
static void update_gpu_scopes(const ImBuf *input_ibuf, gpu::Texture *input_texture, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, const SpaceSeq &space_sequencer, Scene *scene, int timeline_frame)
static void draw_vectorscope_graticule(ARegion *region, SeqQuadsBatch &quads, const rctf &area, const ocio::ScopeInfo &scope_info)
static const char * get_texture_colorspace_name(const ImBuf &ibuf)
static void sequencer_display_size(const RenderData &render_data, float r_viewrect[2])
static void preview_draw_begin(const bContext *C, const RenderData &render_data, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, ARegion ®ion, eSpaceSeq_RegionType preview_type)
static bool is_cursor_visible(const SpaceSeq &sseq)
T clamp(const T &a, const T &min, const T &max)
VecBase< T, Size > divide_ceil(const VecBase< T, Size > &a, const VecBase< T, Size > &b)
CartesianBasis invert(const CartesianBasis &basis)
T interpolate(const T &a, const T &b, const FactorT &t)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
float2 image_preview_unit_to_px(const Scene *scene, const float2 co_src)
gpu::Texture * preview_cache_get_gpu_texture(Scene *scene, int timeline_frame, int view_id, int display_channel, int width, int height)
ImBuf * render_give_ibuf(const RenderData *context, float timeline_frame, int chanshown)
bool prefetch_need_redraw(const bContext *C, Scene *scene)
std::recursive_mutex & text_runtime_mutex_get()
void preview_cache_set_gpu_texture(Scene *scene, int timeline_frame, int view_id, int display_channel, gpu::Texture *texture)
Array< float2 > image_transform_quad_get(const Scene *scene, const Strip *strip)
Editing * editing_get(const Scene *scene)
float get_render_scale_factor(eSpaceSeq_Proxy_RenderSize render_size, short scene_render_scale)
float3x3 image_transform_matrix_get(const Scene *scene, const Strip *strip)
Strip * select_active_get(const Scene *scene)
void preview_cache_set_gpu_scope_texture(Scene *scene, int timeline_frame, int view_id, int display_channel, gpu::Texture *texture)
float2 image_transform_origin_preview_offset_get(const Scene *scene, const Strip *strip)
void render_new_render_data(Main *bmain, Depsgraph *depsgraph, Scene *scene, int rectx, int recty, eSpaceSeq_Proxy_RenderSize preview_render_size, Render *render, RenderData *r_context)
bool effects_can_render_text(const Strip *strip)
gpu::Texture * preview_cache_get_gpu_scope_texture(Scene *scene, int timeline_frame, int view_id, int display_channel, int width, int height)
ListBaseT< SeqTimelineChannel > * channels_displayed_get(const Editing *ed)
VectorSet< Strip * > query_rendered_strips(const Scene *scene, ListBaseT< SeqTimelineChannel > *channels, ListBaseT< Strip > *seqbase, const int timeline_frame, const int displayed_channel)
ImBuf * render_give_ibuf_direct(const RenderData *context, float timeline_frame, Strip *strip)
void get_color_3fv(int colorid, float col[3])
void frame_buffer_clear(int colorid)
char char char char void view2d_text_cache_add(View2D *v2d, float x, float y, const char *str, size_t str_len, const unsigned char col[4])
void view2d_view_ortho(const View2D *v2d)
void view2d_totRect_set(View2D *v2d, int width, int height)
void view2d_curRect_validate(View2D *v2d)
void view2d_view_restore(const bContext *C)
void draw_safe_areas(uint pos, const rctf *rect, const float title_aspect[2], const float action_aspect[2])
void view2d_text_cache_draw(ARegion *region)
void view2d_view_to_region(const View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
void view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void view2d_pixel_size_get(const View2D *v2d, float *r_x, float *r_y)
View2D * view2d_fromcontext(const bContext *C)
void GPU_framebuffer_bind(gpu::FrameBuffer *fb)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
eSpaceSeq_Proxy_RenderSize
VecBase< uint8_t, 4 > uchar4
void ED_time_scrub_draw_current_frame(const ARegion *region, const Scene *scene, bool display_seconds, bool display_stalk, bool clamp_playhead)
int GPU_shader_get_sampler_binding(gpu::Shader *shader, const char *name)
gpu::FrameBuffer * GPU_framebuffer_active_get()
ScrArea * CTX_wm_area(const bContext *C)
void ED_time_scrub_draw(const ARegion *region, const Scene *scene, bool display_seconds, bool discrete_frames, const int base)
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
void immUniformThemeColorBlend(int color_id1, int color_id2, float fac)
gpu::Batch * GPU_batch_create_procedural(GPUPrimType primitive_type, int32_t vertex_count)
void GPU_viewport_colorspace_set(GPUViewport *viewport, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, float dither)
void GPU_texture_update(gpu::Texture *texture, eGPUDataFormat data_format, const void *data)
void BLF_shadow_offset(int fontid, int x, int y)
void GPU_storagebuf_clear_to_zero(gpu::StorageBuf *ssbo)
Scene * CTX_data_sequencer_scene(const bContext *C)
void GPU_framebuffer_restore()
void ED_draw_composition_guides(uint shdr_pos, eCompositionGuideFlags flag, const rctf *rect, const float color[4])
void immUniformColor3f(float r, float g, float b)
void ED_annotation_draw_2dimage(const bContext *C)
@ SEQ_EDIT_OVERLAY_FRAME_SHOW
@ SEQ_EDIT_OVERLAY_FRAME_ABS
void IMB_colormanagement_finish_glsl_draw()
int BKE_scene_multiview_view_id_get(const RenderData *rd, const char *viewname)
void BLF_shadow(int fontid, FontShadowType type, const float rgba[4]=nullptr)
gpu::StorageBuf * GPU_storagebuf_create_ex(size_t size, const void *data, GPUUsageType usage, const char *name)
void immUniform2f(const char *name, float x, float y)
BLI_INLINE float fb(float length, float L)
void GPU_matrix_identity_set()
void imm_draw_box_checker_2d(float x1, float y1, float x2, float y2, bool clear_alpha=false)
GPUVertFormat * immVertexFormat()
@ WM_JOB_TYPE_RENDER_PREVIEW
void immBegin(GPUPrimType, uint vertex_len)
gpu::FrameBuffer * GPU_viewport_framebuffer_render_get(GPUViewport *viewport)
bool IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorSpace *from_colorspace, float dither, bool predivide, bool do_overlay_merge, ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW, float opacity=1.0f)
void GPU_line_smooth(bool enable)
void GPU_framebuffer_clear_color(gpu::FrameBuffer *fb, const double4 clear_col)
void GPU_depth_mask(bool depth)
void GPU_batch_discard(gpu::Batch *batch)
const char * IMB_colormanagement_get_byte_colorspace(const ImBuf *ibuf)
@ COLOR_ROLE_SCENE_LINEAR
@ SEQ_VIEW_SEQUENCE_PREVIEW
void GPU_batch_set_shader(gpu::Batch *batch, gpu::Shader *shader, const gpu::shader::SpecializationConstants *constants_state=nullptr)
const rcti * ED_region_visible_rect(ARegion *region)
void GPU_compute_dispatch(gpu::Shader *shader, uint groups_x_len, uint groups_y_len, uint groups_z_len, const gpu::shader::SpecializationConstants *constants_state=nullptr)
MINLINE void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
void BLF_disable(int fontid, FontFlags flag)
void GPU_shader_uniform_1b(gpu::Shader *sh, const char *name, bool value)
int GPU_shader_get_ssbo_binding(gpu::Shader *shader, const char *name)
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
void GPU_line_width(float width)
void GPU_matrix_scale_2f(float x, float y)
@ GPU_BLEND_OVERLAY_MASK_FROM_ALPHA
void immAttr3fv(uint attr_id, const float data[3])
void GPU_viewport_unbind(GPUViewport *viewport)
void immBindBuiltinProgram(GPUBuiltinShader shader_id)
@ SEQ_OVERLAY_FRAME_TYPE_CURRENT
@ SEQ_OVERLAY_FRAME_TYPE_REFERENCE
@ SEQ_OVERLAY_FRAME_TYPE_RECT
void immUniformThemeColor(int color_id)
void IMB_freeImBuf(ImBuf *ibuf)
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
void immUniform1f(const char *name, float x)
void immVertex2f(uint attr_id, float x, float y)
void ED_scene_draw_fps(const Scene *scene, int xoffset, int *yoffset)
@ GPU_TEXTURE_USAGE_SHADER_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
@ SEQ_DRAW_EDIT_POINT_PREVIEW
void GPU_memory_barrier(GPUBarrier barrier)
ocio::ScopeInfo IMB_colormanagement_get_scope_info(const ColorManagedDisplaySettings *display_settings, const ColorManagedViewSettings *view_settings)
void GPU_viewport_size_get_f(float coords[4])
const char * IMB_colormanagement_role_colorspace_name_get(int role)
BMesh const char void * data
void GPU_shader_uniform_3fv(gpu::Shader *sh, const char *name, const float data[3])
@ GPU_SHADER_SEQUENCER_SCOPE_RASTER
@ GPU_SHADER_SEQUENCER_ZEBRA
@ GPU_SHADER_3D_POLYLINE_FLAT_COLOR
@ GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA
@ GPU_SHADER_3D_IMAGE_COLOR
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR
@ GPU_SHADER_SEQUENCER_SCOPE_RESOLVE
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
wmWindowManager * CTX_wm_manager(const bContext *C)
@ SEQ_PREVIEW_SHOW_SAFE_CENTER
@ SEQ_PREVIEW_SHOW_METADATA
@ SEQ_PREVIEW_SHOW_OUTLINE_SELECTED
@ SEQ_PREVIEW_SHOW_COMPOSITION_GUIDES
@ SEQ_PREVIEW_SHOW_GPENCIL
@ SEQ_PREVIEW_SHOW_2D_CURSOR
@ SEQ_PREVIEW_SHOW_SAFE_MARGINS
void GPU_texture_filter_mode(gpu::Texture *texture, bool use_filter)
void GPU_color_mask(bool r, bool g, bool b, bool a)
int GPU_texture_width(const gpu::Texture *texture)
void GPU_batch_draw(gpu::Batch *batch)
void GPU_program_point_size(bool enable)
void ED_region_image_metadata_draw(int x, int y, const ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy)
void GPU_shader_bind(gpu::Shader *shader, const gpu::shader::SpecializationConstants *constants_state=nullptr)
void GPU_shader_uniform_1i(gpu::Shader *sh, const char *name, int value)
@ GPU_BARRIER_SHADER_STORAGE
void immRectf_with_texco(uint pos, uint tex_coord, const rctf &p, const rctf &uv)
void GPU_storagebuf_bind(gpu::StorageBuf *ssbo, int slot)
void GPU_framebuffer_bind_no_srgb(gpu::FrameBuffer *fb)
void GPU_viewport_bind(GPUViewport *viewport, int view, const rcti *rect)
void GPU_matrix_projection_set(const float m[4][4])
void GPU_matrix_translate_2f(float x, float y)
MatBase< float, 3, 3 > float3x3
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void GPU_storagebuf_unbind(gpu::StorageBuf *ssbo)
void GPU_debug_group_end()
@ SEQ_DRAW_IMG_VECTORSCOPE
gpu::Shader * GPU_shader_get_builtin_shader(GPUBuiltinShader shader)
bScreen * ED_screen_animation_no_scrub(const wmWindowManager *wm)
void WM_jobs_kill_type(wmWindowManager *wm, const void *owner, int job_type)
gpu::FrameBuffer * GPU_viewport_framebuffer_overlay_get(GPUViewport *viewport)
void ED_region_pixelspace(const ARegion *region)
void GPU_shader_uniform_1f(gpu::Shader *sh, const char *name, float value)
Depsgraph * CTX_data_expect_evaluated_depsgraph(const bContext *C)
void immUniform4f(const char *name, float x, float y, float z, float w)
Main * CTX_data_main(const bContext *C)
void GPU_matrix_pop_projection()
void imm_draw_box_wire_2d(uint pos, float x1, float y1, float x2, float y2)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
MINLINE float ratiof(float min, float max, float pos)
void GPU_texture_bind(gpu::Texture *texture, int unit)
int GPU_texture_height(const gpu::Texture *texture)
void GPU_texture_free(gpu::Texture *texture)
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
void WM_gizmomap_draw(wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)
void GPU_matrix_ortho_set(float left, float right, float bottom, float top, float near, float far)
bool IMB_colormanagement_setup_glsl_draw_to_scene_linear(const char *from_colorspace_name, bool predivide)
void GPU_viewport_size_get_i(int coords[4])
void GPU_texture_unbind(gpu::Texture *texture)
bScreen * CTX_wm_screen(const bContext *C)
void immUniform2fv(const char *name, const float data[2])
void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
void immUniformColor3fv(const float rgb[3])
void GPU_blend(GPUBlend blend)
void immUniform1i(const char *name, int x)
VecBase< float, 3 > float3
const float(* GPU_matrix_projection_get(float m[4][4]))[4]
void GPU_storagebuf_free(gpu::StorageBuf *ssbo)
void BLF_width_and_height(int fontid, const char *str, size_t str_len, float *r_width, float *r_height) ATTR_NONNULL()
void immUniformColor4ubv(const unsigned char rgba[4])
void GPU_matrix_push_projection()
void GPU_shader_uniform_mat3(gpu::Shader *sh, const char *name, const float data[3][3])
void GPU_depth_test(GPUDepthTest test)
GPUViewport * WM_draw_region_get_bound_viewport(ARegion *region)
void immRectf(uint pos, float x1, float y1, float x2, float y2)
ARegion * CTX_wm_region(const bContext *C)
void ED_mask_draw_region(Depsgraph *depsgraph, Mask *mask, ARegion *region, bool show_overlays, MaskDrawFlag draw_flag, MaskDrawType draw_type, MaskOverlayMode overlay_mode, float blend_factor, int width_i, int height_i, float aspx, float aspy, bool do_scale_applied, bool do_draw_cb, float stabmat[4][4], const bContext *C)
VecBase< double, 4 > double4
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
const char * IMB_colormanagement_get_float_colorspace(const ImBuf *ibuf)
void BLF_enable(int fontid, FontFlags flag)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
MINLINE int round_db_to_int(double a)
gpu::Texture * GPU_texture_create_2d(const char *name, int width, int height, int mip_len, gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
void BLF_color4fv(int fontid, const float rgba[4])
ocio::ColorSpace ColorSpace
@ WM_GIZMOMAP_DRAWSTEP_2D
void GPU_debug_group_begin(const char *name)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
bke::ARegionRuntime * runtime
eEditingOverlayFrameFlag overlay_frame_flag
const ColorSpace * colorspace
const ColorSpace * colorspace
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
const uint8_t * byte_data() const
const float * float_data() const
const c_style_mat & ptr() const
ColorManagedViewSettings view_settings
ColorManagedDisplaySettings display_settings
struct DisplaySafeAreas safe_areas
ListBaseT< SpaceLink > spacedata
eCompositionGuideFlags composition_guide_flags
float composition_guide_color[4]
eSpaceSeq_SequencerPreviewOverlay_Flag flag
struct SequencerPreviewOverlay preview_overlay
eSpaceSeq_Proxy_RenderSize render_size
eSpaceSeq_Gizmo_Flag gizmo_flag
ed::vse::SpaceSeq_Runtime * runtime
eSpaceSeq_DrawFlag draw_flag
eSpaceSeq_OverlayFrameType overlay_frame_type
eSpaceSeq_RegionType mainb
eView2D_KeepZoom keepzoom
struct wmTimer * animtimer
void calc_from_ibuf(const ImBuf *ibuf, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings)
static constexpr int NUM_BINS
static float bin_to_float(int bin)
blender::float3x3 yuv_matrix
blender::float3 luma_coefficients
blender::float3x3 scope_gamut_to_rec709
Vector< ScopeGraticule > graticules
Vector< CharInfo > characters