Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/BitmapImageMetrics.cpp

Issue 2325523002: Add back in check for gammaIsLinear() to UMA (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "wtf/Threading.h" 8 #include "wtf/Threading.h"
9 #include "wtf/text/WTFString.h" 9 #include "wtf/text/WTFString.h"
10 10
(...skipping 17 matching lines...) Expand all
28 { 28 {
29 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, orientationHistogram, new EnumerationHistogram("Blink.DecodedImage.Orientation", ImageOrientationEnumE nd)); 29 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, orientationHistogram, new EnumerationHistogram("Blink.DecodedImage.Orientation", ImageOrientationEnumE nd));
30 orientationHistogram.count(orientation); 30 orientationHistogram.count(orientation);
31 } 31 }
32 32
33 void BitmapImageMetrics::countGamma(SkColorSpace* colorSpace) 33 void BitmapImageMetrics::countGamma(SkColorSpace* colorSpace)
34 { 34 {
35 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, gammaNamedHistogram, n ew EnumerationHistogram("Blink.ColorSpace.Destination", GammaEnd)); 35 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, gammaNamedHistogram, n ew EnumerationHistogram("Blink.ColorSpace.Destination", GammaEnd));
36 36
37 if (colorSpace) { 37 if (colorSpace) {
38 // TODO (msarett): Add a check for gammaIsLinear() when that API lands i n Skia.
39 Gamma gamma; 38 Gamma gamma;
40 if (colorSpace->gammaCloseToSRGB()) { 39 if (colorSpace->gammaCloseToSRGB()) {
41 gamma = GammaSRGB; 40 gamma = GammaSRGB;
41 } else if (colorSpace->gammaIsLinear()) {
42 gamma = GammaLinear;
42 } else { 43 } else {
43 gamma = GammaNonStandard; 44 gamma = GammaNonStandard;
44 } 45 }
45 46
46 gammaNamedHistogram.count(gamma); 47 gammaNamedHistogram.count(gamma);
47 } else { 48 } else {
48 gammaNamedHistogram.count(GammaNull); 49 gammaNamedHistogram.count(GammaNull);
49 } 50 }
50 } 51 }
51 52
52 } // namespace blink 53 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698