| Index: ui/gfx/color_transform.h
|
| diff --git a/ui/gfx/color_transform.h b/ui/gfx/color_transform.h
|
| index 2d18f3d9cd80817a5b70717e164c7ebaaa79d967..198c640aa0bd438c57c19f3b71791653ab48b751 100644
|
| --- a/ui/gfx/color_transform.h
|
| +++ b/ui/gfx/color_transform.h
|
| @@ -11,6 +11,7 @@
|
| #include "build/build_config.h"
|
| #include "ui/gfx/geometry/point3_f.h"
|
| #include "ui/gfx/gfx_export.h"
|
| +#include "ui/gfx/transform.h"
|
|
|
| namespace gfx {
|
|
|
| @@ -27,7 +28,14 @@ class GFX_EXPORT ColorTransform {
|
| virtual ~ColorTransform() {}
|
|
|
| // Perform transformation of colors, |colors| is both input and output.
|
| - virtual void transform(TriStim* colors, size_t num) = 0;
|
| + virtual void transform(TriStim* colors, size_t num) const = 0;
|
| +
|
| + // Create an affine approximation of this transform. No guarantees
|
| + // are made as to how accurate the approximation is.
|
| + // Returns true if successful, false if there was a failure.
|
| + // This operation can be somewhat costly, considering caching the result
|
| + // if you plan to use this frequently.
|
| + virtual bool GetAffineApproximation(Transform* transform) const;
|
|
|
| static std::unique_ptr<ColorTransform> NewColorTransform(
|
| const ColorSpace& from,
|
|
|