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 scoped_ptr<base::Value> AsValue() 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 190 |
191 Id id_; | 191 Id id_; |
192 static Id s_next_id_; | 192 static Id s_next_id_; |
193 | 193 |
194 DISALLOW_COPY_AND_ASSIGN(Tile); | 194 DISALLOW_COPY_AND_ASSIGN(Tile); |
195 }; | 195 }; |
196 | 196 |
197 } // namespace cc | 197 } // namespace cc |
198 | 198 |
199 #endif // CC_RESOURCES_TILE_H_ | 199 #endif // CC_RESOURCES_TILE_H_ |
OLD | NEW |