disable two ClientCertStoreChromeOSTest.* unit_tests on Valgrind bots
[chromium-blink-merge.git] / cc / tiles / tile_draw_info.cc
blobc1042ceff3dd93d767775508b0920823ef2d8c34
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
3 // found in the LICENSE file.
5 #include "cc/tiles/tile_draw_info.h"
7 #include "base/metrics/histogram.h"
8 #include "cc/base/math_util.h"
10 namespace cc {
12 TileDrawInfo::TileDrawInfo()
13 : mode_(RESOURCE_MODE),
14 solid_color_(SK_ColorWHITE),
15 resource_(nullptr),
16 contents_swizzled_(false),
17 was_ever_ready_to_draw_(false),
18 was_ever_used_to_draw_(false) {}
20 TileDrawInfo::~TileDrawInfo() {
21 DCHECK(!resource_);
22 if (was_ever_ready_to_draw_) {
23 UMA_HISTOGRAM_BOOLEAN("Renderer4.ReadyToDrawTileDrawStatus",
24 was_ever_used_to_draw_);
28 void TileDrawInfo::AsValueInto(base::trace_event::TracedValue* state) const {
29 state->SetBoolean("is_solid_color", mode_ == SOLID_COLOR_MODE);
30 state->SetBoolean("is_transparent",
31 mode_ == SOLID_COLOR_MODE && !SkColorGetA(solid_color_));
34 } // namespace cc