Chromium Code Reviews| 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 26 matching lines...) Expand all Loading... | |
| 37 return priority_[tree]; | 37 return priority_[tree]; |
| 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 scoped_ptr<base::Value> AsValue() const; | |
| 48 | |
| 47 // Returns 0 if not drawable. | 49 // Returns 0 if not drawable. |
| 48 ResourceProvider::ResourceId GetResourceId() const; | 50 ResourceProvider::ResourceId GetResourceId() const; |
| 49 | 51 |
| 50 const gfx::Rect& opaque_rect() const { return opaque_rect_; } | 52 const gfx::Rect& opaque_rect() const { return opaque_rect_; } |
| 51 | 53 |
| 52 bool contents_swizzled() const { return managed_state_.contents_swizzled; } | 54 bool contents_swizzled() const { return managed_state_.contents_swizzled; } |
| 53 | 55 |
| 54 float contents_scale() const { return contents_scale_; } | 56 float contents_scale() const { return contents_scale_; } |
| 55 gfx::Rect content_rect() const { return content_rect_; } | 57 gfx::Rect content_rect() const { return content_rect_; } |
| 56 | 58 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 73 ~Tile(); | 75 ~Tile(); |
| 74 | 76 |
| 75 TileManager* tile_manager_; | 77 TileManager* tile_manager_; |
| 76 scoped_refptr<PicturePileImpl> picture_pile_; | 78 scoped_refptr<PicturePileImpl> picture_pile_; |
| 77 gfx::Rect tile_size_; | 79 gfx::Rect tile_size_; |
| 78 GLenum format_; | 80 GLenum format_; |
| 79 gfx::Rect content_rect_; | 81 gfx::Rect content_rect_; |
| 80 float contents_scale_; | 82 float contents_scale_; |
| 81 gfx::Rect opaque_rect_; | 83 gfx::Rect opaque_rect_; |
| 82 | 84 |
| 85 #ifndef NDEBUG | |
|
whunt
2013/02/01 21:09:33
question: does the style guide say anything about
| |
| 86 gfx::RectF current_screen_rect_[2]; | |
|
whunt
2013/02/01 21:09:33
I don't see this value used anywhere in your tile.
| |
| 87 #endif | |
| 83 TilePriority priority_[2]; | 88 TilePriority priority_[2]; |
| 84 ManagedTileState managed_state_; | 89 ManagedTileState managed_state_; |
| 85 }; | 90 }; |
| 86 | 91 |
| 87 } // namespace cc | 92 } // namespace cc |
| 88 | 93 |
| 89 #endif // CC_TILE_H_ | 94 #endif // CC_TILE_H_ |
| OLD | NEW |