OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #include "cc/resources/tile_draw_info.h" | |
6 | |
7 #include "cc/base/math_util.h" | |
8 | |
9 namespace cc { | |
10 | |
11 TileDrawInfo::TileDrawInfo() | |
12 : mode_(RESOURCE_MODE), solid_color_(SK_ColorWHITE) { | |
13 } | |
14 | |
15 TileDrawInfo::~TileDrawInfo() { | |
16 DCHECK(!resource_); | |
17 } | |
18 | |
19 void TileDrawInfo::AsValueInto(base::trace_event::TracedValue* state) const { | |
20 state->SetBoolean("is_solid_color", mode_ == SOLID_COLOR_MODE); | |
21 state->SetBoolean("is_transparent", | |
22 mode_ == SOLID_COLOR_MODE && !SkColorGetA(solid_color_)); | |
23 } | |
24 | |
25 } // namespace cc | |
OLD | NEW |