24 return float3(0.2126f, 0.7152f, 0.0722f);
46 for (
const ColorSpace *color_space : color_spaces_) {
47 if (color_space->name() ==
name) {
52 if (
name ==
"scene_linear") {
53 return &colorspace_linear_;
55 if (
name ==
"color_picking") {
56 return &colorspace_srgb_;
58 if (
name ==
"texture_paint") {
59 return &colorspace_linear_;
61 if (
name ==
"default_byte") {
62 return &colorspace_srgb_;
64 if (
name ==
"default_float") {
65 return &colorspace_linear_;
67 if (
name ==
"default_sequencer") {
68 return &colorspace_srgb_;
70 if (
name ==
"Linear") {
71 return &colorspace_linear_;
74 return &colorspace_srgb_;
77 return &colorspace_data_;
85 return color_spaces_.size();
90 if (index < 0 || index >= color_spaces_.size()) {
93 return color_spaces_[index];
103 if (interop_id ==
"lin_rec709_scene") {
104 return &colorspace_linear_;
106 if (interop_id ==
"srgb_rec709_display") {
107 return &colorspace_srgb_;
109 if (interop_id ==
"data") {
110 return &colorspace_data_;
137 return &default_display_;
142 if (
name == default_display_.name()) {
143 return &default_display_;
158 return &default_display_;
170 if (display == default_display_.name() &&
view == default_display_.get_default_view()->name()) {
171 return &colorspace_srgb_;
184 if (
name == default_look_.name()) {
185 return &default_look_;
200 return &default_look_;
218 return processor_cache_.get(from_colorspace, to_colorspace);
229 return gpu_shader_binder_;
const char * get_color_space_from_filepath(const char *filepath) const override
std::shared_ptr< const CPUProcessor > get_cpu_processor(StringRefNull from_colorspace, StringRefNull to_colorspace) const override
const ColorSpace * get_color_space(StringRefNull name) const override
int get_num_displays() const override
const Look * get_look_by_index(int index) const override
std::shared_ptr< const CPUProcessor > get_display_cpu_processor(const DisplayParameters &display_parameters) const override
const Display * get_display_by_name(StringRefNull name) const override
const ColorSpace * get_sorted_color_space_by_index(int index) const override
const ColorSpace * get_color_space_for_hdr_image(StringRefNull name) const override
void set_scene_linear_role(StringRefNull name) override
const Look * get_look_by_name(StringRefNull name) const override
const ColorSpace * get_color_space_by_interop_id(StringRefNull interop_id) const override
const Display * get_default_display() const override
int get_num_color_spaces() const override
float3 get_default_luma_coefs() const override
int get_num_looks() const override
const ColorSpace * get_color_space_by_index(int index) const override
const GPUShaderBinder & get_gpu_shader_binder() const override
const ColorSpace * get_display_view_color_space(StringRefNull display, StringRefNull view) const override
float3x3 get_xyz_to_scene_linear_matrix() const override
const Display * get_display_by_index(int index) const override
std::shared_ptr< const CPUProcessor > create_fallback_display_cpu_processor(const Config &config, const DisplayParameters &display_parameters)
static const float3x3 XYZ_TO_REC709
MatBase< float, 3, 3 > float3x3
VecBase< float, 3 > float3