Blender V4.5
fallback_default_display.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include <string>
8
9#include "OCIO_display.hh"
10
13
14namespace blender::ocio {
15
17 std::string name_;
18 FallbackDefaultView default_view_;
19
20 public:
22 {
23 this->index = 0;
24 name_ = "sRGB";
25 }
26
27 StringRefNull name() const override
28 {
29 return name_;
30 }
31
32 const View *get_default_view() const override
33 {
34 return &default_view_;
35 }
36
37 const View *get_view_by_name(const StringRefNull name) const override
38 {
39 if (name == default_view_.name()) {
40 return &default_view_;
41 }
42 return nullptr;
43 }
44
45 int get_num_views() const override
46 {
47 return 1;
48 }
49
50 const View *get_view_by_index(const int index) const override
51 {
52 if (index != 0) {
53 return nullptr;
54 }
55 return &default_view_;
56 }
57
59 {
61 return &processor;
62 }
63
65 {
67 return &processor;
68 }
69};
70
71} // namespace blender::ocio
const View * get_view_by_index(const int index) const override
const CPUProcessor * get_to_scene_linear_cpu_processor() const override
const CPUProcessor * get_from_scene_linear_cpu_processor() const override
const View * get_default_view() const override
const View * get_view_by_name(const StringRefNull name) const override
FallbackCustomCPUProcessor< linearrgb_to_srgb_v3_v3 > FallbackLinearRGBToSRGBCPUProcessor
FallbackCustomCPUProcessor< srgb_to_linearrgb_v3_v3 > FallbackSRGBToLinearRGBCPUProcessor