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

Side by Side Diff: cc/resources/managed_tile_state.cc

Issue 13665003: cc: Moved contents_swizzled out of TileManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed unittest compile Created 7 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/resources/managed_tile_state.h ('k') | cc/resources/platform_color.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/resources/managed_tile_state.h" 5 #include "cc/resources/managed_tile_state.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 10
(...skipping 10 matching lines...) Expand all
21 for (int i = 0; i < NUM_TREES; ++i) { 21 for (int i = 0; i < NUM_TREES; ++i) {
22 tree_bin[i] = NEVER_BIN; 22 tree_bin[i] = NEVER_BIN;
23 bin[i] = NEVER_BIN; 23 bin[i] = NEVER_BIN;
24 } 24 }
25 } 25 }
26 26
27 ManagedTileState::DrawingInfo::DrawingInfo() 27 ManagedTileState::DrawingInfo::DrawingInfo()
28 : mode_(RESOURCE_MODE), 28 : mode_(RESOURCE_MODE),
29 resource_is_being_initialized_(false), 29 resource_is_being_initialized_(false),
30 can_be_freed_(true), 30 can_be_freed_(true),
31 contents_swizzled_(false) { 31 resource_format_(GL_RGBA) {
32 } 32 }
33 33
34 ManagedTileState::DrawingInfo::~DrawingInfo() { 34 ManagedTileState::DrawingInfo::~DrawingInfo() {
35 } 35 }
36 36
37 bool ManagedTileState::DrawingInfo::IsReadyToDraw() const { 37 bool ManagedTileState::DrawingInfo::IsReadyToDraw() const {
38 switch (mode_) { 38 switch (mode_) {
39 case RESOURCE_MODE: 39 case RESOURCE_MODE:
40 return resource_ && 40 return resource_ &&
41 !resource_is_being_initialized_ && 41 !resource_is_being_initialized_ &&
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 state->SetBoolean("is_picture_pile_analyzed", picture_pile_analyzed); 74 state->SetBoolean("is_picture_pile_analyzed", picture_pile_analyzed);
75 state->SetBoolean("is_cheap_to_raster", 75 state->SetBoolean("is_cheap_to_raster",
76 picture_pile_analysis.is_cheap_to_raster); 76 picture_pile_analysis.is_cheap_to_raster);
77 state->SetBoolean("is_transparent", picture_pile_analysis.is_transparent); 77 state->SetBoolean("is_transparent", picture_pile_analysis.is_transparent);
78 state->SetBoolean("is_solid_color", picture_pile_analysis.is_solid_color); 78 state->SetBoolean("is_solid_color", picture_pile_analysis.is_solid_color);
79 return state.PassAs<base::Value>(); 79 return state.PassAs<base::Value>();
80 } 80 }
81 81
82 } // namespace cc 82 } // namespace cc
83 83
OLDNEW
« no previous file with comments | « cc/resources/managed_tile_state.h ('k') | cc/resources/platform_color.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698