Use shared toSRGBD50 matrix in SkPngCodec
authorMatt Sarett <msarett@google.com>
Wed, 4 Jan 2017 14:41:09 +0000 (09:41 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 4 Jan 2017 15:23:16 +0000 (15:23 +0000)
BUG=skia:

Change-Id: I1d2629ef954d8ac7211cfbb4707125ed175af63c
Reviewed-on: https://skia-review.googlesource.com/6553
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

src/codec/SkPngCodec.cpp

index 56995801fcfbbc5cba08959b69387913eb254743..ebd0b741b47bd41be5262715e436c5b5beca4e8b 100644 (file)
@@ -9,6 +9,7 @@
 #include "SkCodecPriv.h"
 #include "SkColorPriv.h"
 #include "SkColorSpace.h"
+#include "SkColorSpacePriv.h"
 #include "SkColorTable.h"
 #include "SkMath.h"
 #include "SkOpts.h"
@@ -317,12 +318,6 @@ static float png_inverted_fixed_point_to_float(png_fixed_point x) {
     return 1.0f / png_fixed_point_to_float(x);
 }
 
-static constexpr float gSRGB_toXYZD50[] {
-    0.4358f, 0.3853f, 0.1430f,    // Rx, Gx, Bx
-    0.2224f, 0.7170f, 0.0606f,    // Ry, Gy, Gz
-    0.0139f, 0.0971f, 0.7139f,    // Rz, Gz, Bz
-};
-
 #endif // LIBPNG >= 1.6
 
 // Returns a colorSpace object that represents any color space information in