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_TILE_H_ | 5 #ifndef CC_TILE_H_ |
6 #define CC_TILE_H_ | 6 #define CC_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 29 matching lines...) Expand all Loading... |
40 TilePriority combined_priority() const { | 40 TilePriority combined_priority() const { |
41 return TilePriority(priority_[ACTIVE_TREE], | 41 return TilePriority(priority_[ACTIVE_TREE], |
42 priority_[PENDING_TREE]); | 42 priority_[PENDING_TREE]); |
43 } | 43 } |
44 | 44 |
45 void set_priority(WhichTree tree, const TilePriority& priority) { | 45 void set_priority(WhichTree tree, const TilePriority& priority) { |
46 tile_manager_->WillModifyTilePriority(this, tree, priority); | 46 tile_manager_->WillModifyTilePriority(this, tree, priority); |
47 priority_[tree] = priority; | 47 priority_[tree] = priority; |
48 } | 48 } |
49 | 49 |
| 50 scoped_ptr<base::Value> AsValue() const; |
| 51 |
50 // Returns 0 if not drawable. | 52 // Returns 0 if not drawable. |
51 ResourceProvider::ResourceId GetResourceId() const { | 53 ResourceProvider::ResourceId GetResourceId() const { |
52 if (!managed_state_.resource) | 54 if (!managed_state_.resource) |
53 return 0; | 55 return 0; |
54 if (managed_state_.resource_is_being_initialized) | 56 if (managed_state_.resource_is_being_initialized) |
55 return 0; | 57 return 0; |
56 | 58 |
57 return managed_state_.resource->id(); | 59 return managed_state_.resource->id(); |
58 } | 60 } |
59 | 61 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 float contents_scale_; | 97 float contents_scale_; |
96 gfx::Rect opaque_rect_; | 98 gfx::Rect opaque_rect_; |
97 | 99 |
98 TilePriority priority_[2]; | 100 TilePriority priority_[2]; |
99 ManagedTileState managed_state_; | 101 ManagedTileState managed_state_; |
100 }; | 102 }; |
101 | 103 |
102 } // namespace cc | 104 } // namespace cc |
103 | 105 |
104 #endif // CC_TILE_H_ | 106 #endif // CC_TILE_H_ |
OLD | NEW |