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

Side by Side Diff: cc/tiles/tile_draw_info.cc

Issue 2293583002: Change includes of histogram.h to histogram_macros.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « cc/scheduler/compositor_timing_history.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/tiles/tile_draw_info.h" 5 #include "cc/tiles/tile_draw_info.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 TileDrawInfo::TileDrawInfo() 12 TileDrawInfo::TileDrawInfo()
13 : mode_(RESOURCE_MODE), 13 : mode_(RESOURCE_MODE),
14 solid_color_(SK_ColorWHITE), 14 solid_color_(SK_ColorWHITE),
15 resource_(nullptr), 15 resource_(nullptr),
16 contents_swizzled_(false), 16 contents_swizzled_(false),
17 was_ever_ready_to_draw_(false), 17 was_ever_ready_to_draw_(false),
18 was_ever_used_to_draw_(false), 18 was_ever_used_to_draw_(false),
19 was_a_prepaint_tile_(false) {} 19 was_a_prepaint_tile_(false) {}
20 20
21 TileDrawInfo::~TileDrawInfo() { 21 TileDrawInfo::~TileDrawInfo() {
22 DCHECK(!resource_); 22 DCHECK(!resource_);
23 if (was_ever_ready_to_draw_ && was_a_prepaint_tile_) { 23 if (was_ever_ready_to_draw_ && was_a_prepaint_tile_) {
24 UMA_HISTOGRAM_BOOLEAN("Renderer4.ReadyToDrawTileDrawStatus", 24 UMA_HISTOGRAM_BOOLEAN("Renderer4.ReadyToDrawTileDrawStatus",
25 was_ever_used_to_draw_); 25 was_ever_used_to_draw_);
26 } 26 }
27 } 27 }
28 28
29 void TileDrawInfo::AsValueInto(base::trace_event::TracedValue* state) const { 29 void TileDrawInfo::AsValueInto(base::trace_event::TracedValue* state) const {
30 state->SetBoolean("is_solid_color", mode_ == SOLID_COLOR_MODE); 30 state->SetBoolean("is_solid_color", mode_ == SOLID_COLOR_MODE);
31 state->SetBoolean("is_transparent", 31 state->SetBoolean("is_transparent",
32 mode_ == SOLID_COLOR_MODE && !SkColorGetA(solid_color_)); 32 mode_ == SOLID_COLOR_MODE && !SkColorGetA(solid_color_));
33 } 33 }
34 34
35 } // namespace cc 35 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/compositor_timing_history.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698