| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 GetResourceId() const; | 48 ResourceProvider::ResourceId GetResourceId() const; |
| 49 | 49 |
| 50 const gfx::Rect& opaque_rect() const { return opaque_rect_; } | 50 const gfx::Rect& opaque_rect() const { return opaque_rect_; } |
| 51 | 51 |
| 52 bool contents_swizzled() const { return managed_state_.contents_swizzled; } | 52 bool contents_swizzled() const { return managed_state_.contents_swizzled; } |
| 53 | 53 |
| 54 float contents_scale() const { return contents_scale_; } |
| 55 gfx::Rect content_rect() const { return content_rect_; } |
| 56 |
| 54 private: | 57 private: |
| 55 // Methods called by by tile manager. | 58 // Methods called by by tile manager. |
| 56 friend class TileManager; | 59 friend class TileManager; |
| 57 friend class BinComparator; | 60 friend class BinComparator; |
| 58 ManagedTileState& managed_state() { return managed_state_; } | 61 ManagedTileState& managed_state() { return managed_state_; } |
| 59 const ManagedTileState& managed_state() const { return managed_state_; } | 62 const ManagedTileState& managed_state() const { return managed_state_; } |
| 60 size_t bytes_consumed_if_allocated() const; | 63 size_t bytes_consumed_if_allocated() const; |
| 61 float contents_scale() const { return contents_scale_; } | |
| 62 | 64 |
| 63 // Normal private methods. | 65 // Normal private methods. |
| 64 friend class base::RefCounted<Tile>; | 66 friend class base::RefCounted<Tile>; |
| 65 ~Tile(); | 67 ~Tile(); |
| 66 | 68 |
| 67 TileManager* tile_manager_; | 69 TileManager* tile_manager_; |
| 68 scoped_refptr<PicturePileImpl> picture_pile_; | 70 scoped_refptr<PicturePileImpl> picture_pile_; |
| 69 gfx::Rect tile_size_; | 71 gfx::Rect tile_size_; |
| 70 GLenum format_; | 72 GLenum format_; |
| 71 gfx::Rect content_rect_; | 73 gfx::Rect content_rect_; |
| 72 float contents_scale_; | 74 float contents_scale_; |
| 73 gfx::Rect opaque_rect_; | 75 gfx::Rect opaque_rect_; |
| 74 | 76 |
| 75 TilePriority priority_[2]; | 77 TilePriority priority_[2]; |
| 76 ManagedTileState managed_state_; | 78 ManagedTileState managed_state_; |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 } // namespace cc | 81 } // namespace cc |
| 80 | 82 |
| 81 #endif // CC_TILE_H_ | 83 #endif // CC_TILE_H_ |
| OLD | NEW |