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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void set_can_use_lcd_text(bool can_use_lcd_text) { | 64 void set_can_use_lcd_text(bool can_use_lcd_text) { |
65 can_use_lcd_text_ = can_use_lcd_text; | 65 can_use_lcd_text_ = can_use_lcd_text; |
66 } | 66 } |
67 | 67 |
68 bool can_use_lcd_text() const { | 68 bool can_use_lcd_text() const { |
69 return can_use_lcd_text_; | 69 return can_use_lcd_text_; |
70 } | 70 } |
71 | 71 |
72 scoped_ptr<base::Value> AsValue() const; | 72 scoped_ptr<base::Value> AsValue() const; |
73 | 73 |
74 bool IsReadyToDraw() const { | 74 inline bool IsReadyToDraw() const { |
75 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { | 75 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { |
76 if (managed_state_.tile_versions[mode].IsReadyToDraw()) | 76 if (managed_state_.tile_versions[mode].IsReadyToDraw()) |
77 return true; | 77 return true; |
78 } | 78 } |
79 return false; | 79 return false; |
80 } | 80 } |
81 | 81 |
82 const ManagedTileState::TileVersion& GetTileVersionForDrawing() const { | 82 const ManagedTileState::TileVersion& GetTileVersionForDrawing() const { |
83 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { | 83 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { |
84 if (managed_state_.tile_versions[mode].IsReadyToDraw()) | 84 if (managed_state_.tile_versions[mode].IsReadyToDraw()) |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 Id id_; | 146 Id id_; |
147 static Id s_next_id_; | 147 static Id s_next_id_; |
148 | 148 |
149 DISALLOW_COPY_AND_ASSIGN(Tile); | 149 DISALLOW_COPY_AND_ASSIGN(Tile); |
150 }; | 150 }; |
151 | 151 |
152 } // namespace cc | 152 } // namespace cc |
153 | 153 |
154 #endif // CC_RESOURCES_TILE_H_ | 154 #endif // CC_RESOURCES_TILE_H_ |
OLD | NEW |