| Index: ui/gfx/color_transform.h
|
| diff --git a/ui/gfx/color_transform.h b/ui/gfx/color_transform.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..19f48f1f1476bcfdf5b750d58f1093920a44e499
|
| --- /dev/null
|
| +++ b/ui/gfx/color_transform.h
|
| @@ -0,0 +1,37 @@
|
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef UI_GFX_COLOR_TRANSFORM_H_
|
| +#define UI_GFX_COLOR_TRANSFORM_H_
|
| +
|
| +#include <memory>
|
| +#include <stdint.h>
|
| +
|
| +#include "build/build_config.h"
|
| +#include "ui/gfx/geometry/point3_f.h"
|
| +#include "ui/gfx/gfx_export.h"
|
| +
|
| +namespace gfx {
|
| +
|
| +class ColorSpace;
|
| +
|
| +class GFX_EXPORT ColorTransform {
|
| + public:
|
| + enum class Intent { ABSOLUTE, PERCEPTUAL };
|
| +
|
| + // TriStimulus is a color coordinate in any color space.
|
| + // Channel order is XYZ, RGB or YUV.
|
| + typedef Point3F TriStim;
|
| +
|
| + // Perform transformation of colors, |colors| is both input and output.
|
| + virtual void transform(TriStim* colors, size_t num) = 0;
|
| +
|
| + static std::unique_ptr<ColorTransform> NewColorTransform(
|
| + const ColorSpace& from,
|
| + const ColorSpace& to,
|
| + Intent intent);
|
| +};
|
| +} // namespace gfx
|
| +
|
| +#endif // UI_GFX_COLOR_TRANSFORM_H_
|
|
|