Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/canvas/kis_display_color_converter.h
Context not available. | |||||
30 | class KoColor; | 30 | class KoColor; | ||
---|---|---|---|---|---|
31 | class KoColorProfile; | 31 | class KoColorProfile; | ||
32 | class KoCanvasResourceProvider; | 32 | class KoCanvasResourceProvider; | ||
33 | 33 | class KoID; | |||
34 | 34 | | |||
35 | /** | 35 | /** | ||
36 | * Special helper class that provides primitives for converting colors when | 36 | * Special helper class that provides primitives for converting colors when | ||
Context not available. | |||||
53 | KisDisplayColorConverter(KoCanvasResourceProvider *resourceManager, QObject *parent); | 53 | KisDisplayColorConverter(KoCanvasResourceProvider *resourceManager, QObject *parent); | ||
54 | ~KisDisplayColorConverter() override; | 54 | ~KisDisplayColorConverter() override; | ||
55 | 55 | | |||
56 | void setImage(KisImageSP image); | ||||
57 | void setImageColorSpace(const KoColorSpace *cs); | ||||
58 | | ||||
56 | static KisDisplayColorConverter* dumbConverterInstance(); | 59 | static KisDisplayColorConverter* dumbConverterInstance(); | ||
57 | 60 | | |||
58 | KoColorDisplayRendererInterface* displayRendererInterface() const; | 61 | KoColorDisplayRendererInterface* displayRendererInterface() const; | ||
Context not available. | |||||
64 | QColor toQColor(const KoColor &c) const; | 67 | QColor toQColor(const KoColor &c) const; | ||
65 | KoColor approximateFromRenderedQColor(const QColor &c) const; | 68 | KoColor approximateFromRenderedQColor(const QColor &c) const; | ||
66 | 69 | | |||
70 | bool canSkipDisplayConversion(const KoColorSpace *cs) const; | ||||
71 | KoColor applyDisplayFiltering(const KoColor &srcColor, const KoID &bitDepthId) const; | ||||
72 | void applyDisplayFilteringF32(KisFixedPaintDeviceSP device, const KoID &bitDepthId) const; | ||||
73 | | ||||
74 | | ||||
67 | /** | 75 | /** | ||
68 | * Converts the exactBounds() (!) of the \p srcDevice into QImage | 76 | * Converts the exactBounds() (!) of the \p srcDevice into QImage | ||
69 | * properly rendered into display RGB space. Please note that the | 77 | * properly rendered into display RGB space. Please note that the | ||
Context not available. | |||||
89 | 97 | | |||
90 | QSharedPointer<KisDisplayFilter> displayFilter() const; | 98 | QSharedPointer<KisDisplayFilter> displayFilter() const; | ||
91 | const KoColorProfile* monitorProfile() const; | 99 | const KoColorProfile* monitorProfile() const; | ||
100 | const KoColorProfile* openGLCanvasSurfaceProfile() const; | ||||
101 | bool isHDRMode() const; | ||||
102 | | ||||
103 | void notifyOpenGLCanvasIsActive(bool value); | ||||
92 | 104 | | |||
93 | Q_SIGNALS: | 105 | Q_SIGNALS: | ||
94 | void displayConfigurationChanged(); | 106 | void displayConfigurationChanged(); | ||
Context not available. | |||||
96 | private: | 108 | private: | ||
97 | // is not possible to implement! | 109 | // is not possible to implement! | ||
98 | KoColor toKoColor(const QColor &c); | 110 | KoColor toKoColor(const QColor &c); | ||
99 | 111 | template <class Policy> | |||
112 | typename Policy::Result convertToDisplayImpl(const KoColor &srcColor, bool alreadyInDestinationF32 = false) const; | ||||
100 | 113 | | |||
101 | private: | 114 | private: | ||
102 | Q_PRIVATE_SLOT(m_d, void slotCanvasResourceChanged(int key, const QVariant &v)); | 115 | Q_PRIVATE_SLOT(m_d, void slotCanvasResourceChanged(int key, const QVariant &v)); | ||
Context not available. |