OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef CC_RESOURCES_TILE_H_ | 5 #ifndef CC_RESOURCES_TILE_H_ |
6 #define CC_RESOURCES_TILE_H_ | 6 #define CC_RESOURCES_TILE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } | 96 } |
97 | 97 |
98 bool HasResources() const { | 98 bool HasResources() const { |
99 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { | 99 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { |
100 if (managed_state_.tile_versions[mode].has_resource()) | 100 if (managed_state_.tile_versions[mode].has_resource()) |
101 return true; | 101 return true; |
102 } | 102 } |
103 return false; | 103 return false; |
104 } | 104 } |
105 | 105 |
106 void AsValueInto(base::debug::TracedValue* dict) const; | 106 void AsValueInto(base::debug::TracedValue* dict, bool is_active) const; |
107 | 107 |
108 inline bool IsReadyToDraw() const { | 108 inline bool IsReadyToDraw() const { |
109 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { | 109 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { |
110 if (managed_state_.tile_versions[mode].IsReadyToDraw()) | 110 if (managed_state_.tile_versions[mode].IsReadyToDraw()) |
111 return true; | 111 return true; |
112 } | 112 } |
113 return false; | 113 return false; |
114 } | 114 } |
115 | 115 |
116 const ManagedTileState::TileVersion& GetTileVersionForDrawing() const { | 116 const ManagedTileState::TileVersion& GetTileVersionForDrawing() const { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 Id id_; | 193 Id id_; |
194 static Id s_next_id_; | 194 static Id s_next_id_; |
195 | 195 |
196 DISALLOW_COPY_AND_ASSIGN(Tile); | 196 DISALLOW_COPY_AND_ASSIGN(Tile); |
197 }; | 197 }; |
198 | 198 |
199 } // namespace cc | 199 } // namespace cc |
200 | 200 |
201 #endif // CC_RESOURCES_TILE_H_ | 201 #endif // CC_RESOURCES_TILE_H_ |
OLD | NEW |