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

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

Issue 2726343004: cc: Optimize decode scheduling for checker-images. (Closed)
Patch Set: rebase Created 3 years, 8 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.h » ('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_macros.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() = default; 12 TileDrawInfo::TileDrawInfo() = default;
13 TileDrawInfo::~TileDrawInfo() { 13 TileDrawInfo::~TileDrawInfo() {
14 DCHECK(!resource_); 14 DCHECK(!resource_);
15 } 15 }
16 16
17 void TileDrawInfo::AsValueInto(base::trace_event::TracedValue* state) const { 17 void TileDrawInfo::AsValueInto(base::trace_event::TracedValue* state) const {
18 state->SetBoolean("is_solid_color", mode_ == SOLID_COLOR_MODE); 18 state->SetBoolean("is_solid_color", mode_ == SOLID_COLOR_MODE);
19 state->SetBoolean("is_transparent", 19 state->SetBoolean("is_transparent",
20 mode_ == SOLID_COLOR_MODE && !SkColorGetA(solid_color_)); 20 mode_ == SOLID_COLOR_MODE && !SkColorGetA(solid_color_));
21 } 21 }
22 22
23 Resource* TileDrawInfo::TakeResource() { 23 Resource* TileDrawInfo::TakeResource() {
24 Resource* resource = resource_; 24 Resource* resource = resource_;
25 set_resource(nullptr); 25 set_resource(nullptr, false);
26 return resource; 26 return resource;
27 } 27 }
28 28
29 } // namespace cc 29 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_draw_info.h ('k') | cc/tiles/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698