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

Side by Side Diff: ui/gl/angle_platform_impl.cc

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « ui/gl/angle_platform_impl.h ('k') | ui/gl/generate_bindings.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "ui/gl/angle_platform_impl.h"
6
7 #include "base/metrics/histogram.h"
8 #include "base/metrics/sparse_histogram.h"
9
10 namespace gfx {
11
12 ANGLEPlatformImpl::ANGLEPlatformImpl() {
13 }
14
15 ANGLEPlatformImpl::~ANGLEPlatformImpl() {
16 }
17
18 void ANGLEPlatformImpl::histogramCustomCounts(const char* name,
19 int sample,
20 int min,
21 int max,
22 int bucket_count) {
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());
29 counter->Add(sample);
30 }
31
32 void ANGLEPlatformImpl::histogramEnumeration(const char* name,
33 int sample,
34 int boundary_value) {
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());
41 counter->Add(sample);
42 }
43
44 void ANGLEPlatformImpl::histogramSparse(const char* name, int sample) {
45 // For sparse histograms, we can use the macro, as it does not incorporate a
46 // static.
47 UMA_HISTOGRAM_SPARSE_SLOWLY(name, sample);
48 }
49
50 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/angle_platform_impl.h ('k') | ui/gl/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698