| Index: ui/gfx/icc_profile_unittest.cc
|
| diff --git a/ui/gfx/icc_profile_unittest.cc b/ui/gfx/icc_profile_unittest.cc
|
| index ecb17139b9f10d2a3692a897bcc3a876307270fa..081e6de84266a9b51622206b7217bb44c92142e3 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 {
|
| @@ -131,4 +132,21 @@ TEST(ICCProfile, GarbageData) {
|
| EXPECT_FALSE(default_ctor_profile.GetParametricColorSpace().IsValid());
|
| }
|
|
|
| +TEST(ICCProfile, GenericRGB) {
|
| + ColorSpace icc_profile = ICCProfileForTestingGenericRGB().GetColorSpace();
|
| + ColorSpace color_space(ColorSpace::PrimaryID::SMPTE240M,
|
| + 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
|
|
|