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

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

Issue 1174733003: cc, gpu: Use RGBA when using msaa on systems that don't support BGRA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 5 years, 6 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/tiles/tile_draw_info.h ('k') | cc/tiles/tile_manager.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 "cc/base/math_util.h" 7 #include "cc/base/math_util.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 TileDrawInfo::TileDrawInfo() 11 TileDrawInfo::TileDrawInfo()
12 : mode_(RESOURCE_MODE), solid_color_(SK_ColorWHITE) { 12 : mode_(RESOURCE_MODE),
13 solid_color_(SK_ColorWHITE),
14 contents_swizzled_(false) {
13 } 15 }
14 16
15 TileDrawInfo::~TileDrawInfo() { 17 TileDrawInfo::~TileDrawInfo() {
16 DCHECK(!resource_); 18 DCHECK(!resource_);
17 } 19 }
18 20
19 void TileDrawInfo::AsValueInto(base::trace_event::TracedValue* state) const { 21 void TileDrawInfo::AsValueInto(base::trace_event::TracedValue* state) const {
20 state->SetBoolean("is_solid_color", mode_ == SOLID_COLOR_MODE); 22 state->SetBoolean("is_solid_color", mode_ == SOLID_COLOR_MODE);
21 state->SetBoolean("is_transparent", 23 state->SetBoolean("is_transparent",
22 mode_ == SOLID_COLOR_MODE && !SkColorGetA(solid_color_)); 24 mode_ == SOLID_COLOR_MODE && !SkColorGetA(solid_color_));
23 } 25 }
24 26
25 } // namespace cc 27 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_draw_info.h ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698