| 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 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 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 | 46 |
| 47 // Returns 0 if not drawable. | 47 // Returns 0 if not drawable. |
| 48 ResourceProvider::ResourceId resource_id() const { | 48 ResourceProvider::ResourceId GetResourceId() const; |
| 49 return managed_state_.resource ? managed_state_.resource->id() : 0; | |
| 50 } | |
| 51 | 49 |
| 52 const gfx::Rect& opaque_rect() const { return opaque_rect_; } | 50 const gfx::Rect& opaque_rect() const { return opaque_rect_; } |
| 53 | 51 |
| 54 bool contents_swizzled() const { return managed_state_.contents_swizzled; } | 52 bool contents_swizzled() const { return managed_state_.contents_swizzled; } |
| 55 | 53 |
| 56 private: | 54 private: |
| 57 // Methods called by by tile manager. | 55 // Methods called by by tile manager. |
| 58 friend class TileManager; | 56 friend class TileManager; |
| 59 friend class BinComparator; | 57 friend class BinComparator; |
| 60 ManagedTileState& managed_state() { return managed_state_; } | 58 ManagedTileState& managed_state() { return managed_state_; } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 74 float contents_scale_; | 72 float contents_scale_; |
| 75 gfx::Rect opaque_rect_; | 73 gfx::Rect opaque_rect_; |
| 76 | 74 |
| 77 TilePriority priority_[2]; | 75 TilePriority priority_[2]; |
| 78 ManagedTileState managed_state_; | 76 ManagedTileState managed_state_; |
| 79 }; | 77 }; |
| 80 | 78 |
| 81 } // namespace cc | 79 } // namespace cc |
| 82 | 80 |
| 83 #endif // CC_TILE_H_ | 81 #endif // CC_TILE_H_ |
| OLD | NEW |