Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: ui/gfx/color_transform.h

Issue 2229953003: Support for custom primaries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test updated Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/color_space.h ('k') | ui/gfx/color_transform.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_COLOR_TRANSFORM_H_ 5 #ifndef UI_GFX_COLOR_TRANSFORM_H_
6 #define UI_GFX_COLOR_TRANSFORM_H_ 6 #define UI_GFX_COLOR_TRANSFORM_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "ui/gfx/geometry/point3_f.h" 12 #include "ui/gfx/geometry/point3_f.h"
13 #include "ui/gfx/gfx_export.h" 13 #include "ui/gfx/gfx_export.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 16
17 class ColorSpace; 17 class ColorSpace;
18 18
19 class GFX_EXPORT ColorTransform { 19 class GFX_EXPORT ColorTransform {
20 public: 20 public:
21 enum class Intent { ABSOLUTE, PERCEPTUAL }; 21 enum class Intent { INTENT_ABSOLUTE, INTENT_PERCEPTUAL };
22 22
23 // TriStimulus is a color coordinate in any color space. 23 // TriStimulus is a color coordinate in any color space.
24 // Channel order is XYZ, RGB or YUV. 24 // Channel order is XYZ, RGB or YUV.
25 typedef Point3F TriStim; 25 typedef Point3F TriStim;
26 26
27 // Perform transformation of colors, |colors| is both input and output. 27 // Perform transformation of colors, |colors| is both input and output.
28 virtual void transform(TriStim* colors, size_t num) = 0; 28 virtual void transform(TriStim* colors, size_t num) = 0;
29 29
30 static std::unique_ptr<ColorTransform> NewColorTransform( 30 static std::unique_ptr<ColorTransform> NewColorTransform(
31 const ColorSpace& from, 31 const ColorSpace& from,
32 const ColorSpace& to, 32 const ColorSpace& to,
33 Intent intent); 33 Intent intent);
34 }; 34 };
35 } // namespace gfx 35 } // namespace gfx
36 36
37 #endif // UI_GFX_COLOR_TRANSFORM_H_ 37 #endif // UI_GFX_COLOR_TRANSFORM_H_
OLDNEW
« no previous file with comments | « ui/gfx/color_space.h ('k') | ui/gfx/color_transform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698