| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // Returns 0 if not drawable. | 54 // Returns 0 if not drawable. |
| 55 ResourceProvider::ResourceId GetResourceId() const { | 55 ResourceProvider::ResourceId GetResourceId() const { |
| 56 if (!managed_state_.resource) | 56 if (!managed_state_.resource) |
| 57 return 0; | 57 return 0; |
| 58 if (managed_state_.resource_is_being_initialized) | 58 if (managed_state_.resource_is_being_initialized) |
| 59 return 0; | 59 return 0; |
| 60 | 60 |
| 61 return managed_state_.resource->id(); | 61 return managed_state_.resource->id(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool IsReadyToDraw() const; |
| 65 |
| 66 bool is_solid_color() const { |
| 67 return managed_state_.picture_pile_analysis.is_solid_color(); |
| 68 } |
| 69 |
| 70 bool is_transparent() const { |
| 71 return managed_state_.picture_pile_analysis.is_transparent(); |
| 72 } |
| 73 |
| 74 SkColor get_solid_color() const { |
| 75 return managed_state_.picture_pile_analysis.get_solid_color(); |
| 76 } |
| 77 |
| 64 const gfx::Rect& opaque_rect() const { return opaque_rect_; } | 78 const gfx::Rect& opaque_rect() const { return opaque_rect_; } |
| 65 | 79 |
| 66 bool contents_swizzled() const { return managed_state_.contents_swizzled; } | 80 bool contents_swizzled() const { return managed_state_.contents_swizzled; } |
| 67 | 81 |
| 68 float contents_scale() const { return contents_scale_; } | 82 float contents_scale() const { return contents_scale_; } |
| 69 gfx::Rect content_rect() const { return content_rect_; } | 83 gfx::Rect content_rect() const { return content_rect_; } |
| 70 | 84 |
| 71 int layer_id() const { return layer_id_; } | 85 int layer_id() const { return layer_id_; } |
| 72 | 86 |
| 73 void set_picture_pile(scoped_refptr<PicturePileImpl> pile) { | 87 void set_picture_pile(scoped_refptr<PicturePileImpl> pile) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 103 gfx::Rect opaque_rect_; | 117 gfx::Rect opaque_rect_; |
| 104 | 118 |
| 105 TilePriority priority_[NUM_BIN_PRIORITIES]; | 119 TilePriority priority_[NUM_BIN_PRIORITIES]; |
| 106 ManagedTileState managed_state_; | 120 ManagedTileState managed_state_; |
| 107 int layer_id_; | 121 int layer_id_; |
| 108 }; | 122 }; |
| 109 | 123 |
| 110 } // namespace cc | 124 } // namespace cc |
| 111 | 125 |
| 112 #endif // CC_TILE_H_ | 126 #endif // CC_TILE_H_ |
| OLD | NEW |