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
3 // found in the LICENSE file.
5 #include "ui/gl/angle_platform_impl.h"
7 #include "base/metrics/histogram.h"
8 #include "base/metrics/sparse_histogram.h"
12 ANGLEPlatformImpl::ANGLEPlatformImpl() {
15 ANGLEPlatformImpl::~ANGLEPlatformImpl() {
18 void ANGLEPlatformImpl::histogramCustomCounts(const char* name
,
23 // Copied from histogram macro, but without the static variable caching
24 // the histogram because name is dynamic.
25 base::HistogramBase
* counter
= base::Histogram::FactoryGet(
26 name
, min
, max
, bucket_count
,
27 base::HistogramBase::kUmaTargetedHistogramFlag
);
28 DCHECK_EQ(name
, counter
->histogram_name());
32 void ANGLEPlatformImpl::histogramEnumeration(const char* name
,
35 // Copied from histogram macro, but without the static variable caching
36 // the histogram because name is dynamic.
37 base::HistogramBase
* counter
= base::LinearHistogram::FactoryGet(
38 name
, 1, boundary_value
, boundary_value
+ 1,
39 base::HistogramBase::kUmaTargetedHistogramFlag
);
40 DCHECK_EQ(name
, counter
->histogram_name());
44 void ANGLEPlatformImpl::histogramSparse(const char* name
, int sample
) {
45 // For sparse histograms, we can use the macro, as it does not incorporate a
47 UMA_HISTOGRAM_SPARSE_SLOWLY(name
, sample
);