| 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 #include "platform/graphics/BitmapImageMetrics.h" | 5 #include "platform/graphics/BitmapImageMetrics.h" |
| 6 | 6 |
| 7 #include "platform/Histogram.h" | 7 #include "platform/Histogram.h" |
| 8 #include "platform/graphics/ColorSpace.h" | 8 #include "platform/graphics/ColorSpace.h" |
| 9 #include "wtf/Threading.h" | 9 #include "wtf/Threading.h" |
| 10 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 ? ImageBMP | 27 ? ImageBMP |
| 28 : DecodedImageType::ImageUnknown; | 28 : DecodedImageType::ImageUnknown; |
| 29 | 29 |
| 30 DEFINE_THREAD_SAFE_STATIC_LOCAL( | 30 DEFINE_THREAD_SAFE_STATIC_LOCAL( |
| 31 EnumerationHistogram, decodedImageTypeHistogram, | 31 EnumerationHistogram, decodedImageTypeHistogram, |
| 32 new EnumerationHistogram("Blink.DecodedImageType", | 32 new EnumerationHistogram("Blink.DecodedImageType", |
| 33 DecodedImageTypeEnumEnd)); | 33 DecodedImageTypeEnumEnd)); |
| 34 decodedImageTypeHistogram.count(decodedImageType); | 34 decodedImageTypeHistogram.count(decodedImageType); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void BitmapImageMetrics::countAnimatedImageType(AnimatedImageType type) { |
| 38 DEFINE_THREAD_SAFE_STATIC_LOCAL( |
| 39 EnumerationHistogram, animatedImageTypeHistogram, |
| 40 new EnumerationHistogram("Blink.AnimatedImageType", |
| 41 AnimatedImageTypeEnumEnd)); |
| 42 animatedImageTypeHistogram.count(type); |
| 43 } |
| 44 |
| 37 void BitmapImageMetrics::countImageOrientation( | 45 void BitmapImageMetrics::countImageOrientation( |
| 38 const ImageOrientationEnum orientation) { | 46 const ImageOrientationEnum orientation) { |
| 39 DEFINE_THREAD_SAFE_STATIC_LOCAL( | 47 DEFINE_THREAD_SAFE_STATIC_LOCAL( |
| 40 EnumerationHistogram, orientationHistogram, | 48 EnumerationHistogram, orientationHistogram, |
| 41 new EnumerationHistogram("Blink.DecodedImage.Orientation", | 49 new EnumerationHistogram("Blink.DecodedImage.Orientation", |
| 42 ImageOrientationEnumEnd)); | 50 ImageOrientationEnumEnd)); |
| 43 orientationHistogram.count(orientation); | 51 orientationHistogram.count(orientation); |
| 44 } | 52 } |
| 45 | 53 |
| 46 void BitmapImageMetrics::countImageGammaAndGamut(SkColorSpace* colorSpace) { | 54 void BitmapImageMetrics::countImageGammaAndGamut(SkColorSpace* colorSpace) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } else if (colorSpace->gammaIsLinear()) { | 88 } else if (colorSpace->gammaIsLinear()) { |
| 81 gamma = GammaLinear; | 89 gamma = GammaLinear; |
| 82 } else { | 90 } else { |
| 83 gamma = GammaNonStandard; | 91 gamma = GammaNonStandard; |
| 84 } | 92 } |
| 85 } | 93 } |
| 86 return gamma; | 94 return gamma; |
| 87 } | 95 } |
| 88 | 96 |
| 89 } // namespace blink | 97 } // namespace blink |
| OLD | NEW |