| Index: ui/gfx/icc_profile_unittest.cc
|
| diff --git a/ui/gfx/icc_profile_unittest.cc b/ui/gfx/icc_profile_unittest.cc
|
| index 57a52c0c5b83a0254dfebb022d0431b3b45bd52b..590858e29dc238d838def3001072b223f88ff559 100644
|
| --- a/ui/gfx/icc_profile_unittest.cc
|
| +++ b/ui/gfx/icc_profile_unittest.cc
|
| @@ -2,10 +2,11 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "ui/gfx/icc_profile.h"
|
| #include "base/logging.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "ui/gfx/color_space.h"
|
| -#include "ui/gfx/icc_profile.h"
|
| +#include "ui/gfx/skia_color_space_util.h"
|
| #include "ui/gfx/test/icc_profiles.h"
|
|
|
| namespace gfx {
|
| @@ -138,4 +139,21 @@ TEST(ICCProfile, GarbageData) {
|
| EXPECT_FALSE(default_ctor_profile.GetParametricColorSpace().IsValid());
|
| }
|
|
|
| +TEST(ICCProfile, GenericRGB) {
|
| + ColorSpace icc_profile = ICCProfileForTestingGenericRGB().GetColorSpace();
|
| + ColorSpace color_space(ColorSpace::PrimaryID::APPLE_GENERIC_RGB,
|
| + ColorSpace::TransferID::GAMMA18);
|
| +
|
| + SkMatrix44 icc_profile_matrix;
|
| + SkMatrix44 color_space_matrix;
|
| +
|
| + icc_profile.GetPrimaryMatrix(&icc_profile_matrix);
|
| + color_space.GetPrimaryMatrix(&color_space_matrix);
|
| +
|
| + SkMatrix44 eye;
|
| + icc_profile_matrix.invert(&eye);
|
| + eye.postConcat(color_space_matrix);
|
| + EXPECT_TRUE(SkMatrixIsApproximatelyIdentity(eye));
|
| +}
|
| +
|
| } // namespace gfx
|
|
|