| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BitmapImageMetrics_h | 5 #ifndef BitmapImageMetrics_h |
| 6 #define BitmapImageMetrics_h | 6 #define BitmapImageMetrics_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/graphics/ImageOrientation.h" | 9 #include "platform/graphics/ImageOrientation.h" |
| 10 #include "third_party/skia/include/core/SkColorSpace.h" | 10 #include "third_party/skia/include/core/SkColorSpace.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 ImageUnknown = 0, | 23 ImageUnknown = 0, |
| 24 ImageJPEG = 1, | 24 ImageJPEG = 1, |
| 25 ImagePNG = 2, | 25 ImagePNG = 2, |
| 26 ImageGIF = 3, | 26 ImageGIF = 3, |
| 27 ImageWebP = 4, | 27 ImageWebP = 4, |
| 28 ImageICO = 5, | 28 ImageICO = 5, |
| 29 ImageBMP = 6, | 29 ImageBMP = 6, |
| 30 DecodedImageTypeEnumEnd = ImageBMP + 1 | 30 DecodedImageTypeEnumEnd = ImageBMP + 1 |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 // Values synced with 'AnimatedImageType' in |
| 34 // src/tools/metrics/histograms/histograms.xml |
| 35 enum AnimatedImageType { |
| 36 AnimatedGIF = 0, |
| 37 AnimatedWEBP = 1, |
| 38 AnimatedPNG = 2, |
| 39 AnimatedImageTypeEnumEnd = AnimatedPNG + 1 |
| 40 }; |
| 41 |
| 33 enum Gamma { | 42 enum Gamma { |
| 34 // Values synced with 'Gamma' in src/tools/metrics/histograms/histograms.xml | 43 // Values synced with 'Gamma' in src/tools/metrics/histograms/histograms.xml |
| 35 GammaLinear = 0, | 44 GammaLinear = 0, |
| 36 GammaSRGB = 1, | 45 GammaSRGB = 1, |
| 37 Gamma2Dot2 = 2, | 46 Gamma2Dot2 = 2, |
| 38 GammaNonStandard = 3, | 47 GammaNonStandard = 3, |
| 39 GammaNull = 4, | 48 GammaNull = 4, |
| 40 GammaFail = 5, | 49 GammaFail = 5, |
| 41 GammaInvalid = 6, | 50 GammaInvalid = 6, |
| 42 GammaExponent = 7, | 51 GammaExponent = 7, |
| 43 GammaTable = 8, | 52 GammaTable = 8, |
| 44 GammaParametric = 9, | 53 GammaParametric = 9, |
| 45 GammaNamed = 10, | 54 GammaNamed = 10, |
| 46 GammaEnd = GammaNamed + 1, | 55 GammaEnd = GammaNamed + 1, |
| 47 }; | 56 }; |
| 48 | 57 |
| 49 static void countDecodedImageType(const String& type); | 58 static void countDecodedImageType(const String& type); |
| 59 static void countAnimatedImageType(AnimatedImageType); |
| 50 static void countImageOrientation(const ImageOrientationEnum); | 60 static void countImageOrientation(const ImageOrientationEnum); |
| 51 static void countImageGammaAndGamut(SkColorSpace*); | 61 static void countImageGammaAndGamut(SkColorSpace*); |
| 52 static void countOutputGammaAndGamut(SkColorSpace*); | 62 static void countOutputGammaAndGamut(SkColorSpace*); |
| 53 | 63 |
| 54 private: | 64 private: |
| 55 static Gamma getColorSpaceGamma(SkColorSpace*); | 65 static Gamma getColorSpaceGamma(SkColorSpace*); |
| 56 }; | 66 }; |
| 57 | 67 |
| 58 } // namespace blink | 68 } // namespace blink |
| 59 | 69 |
| 60 #endif | 70 #endif |
| OLD | NEW |