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_RESOURCES_TILE_H_ | 5 #ifndef CC_RESOURCES_TILE_H_ |
| 6 #define CC_RESOURCES_TILE_H_ | 6 #define CC_RESOURCES_TILE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/base/ref_counted_managed.h" | 9 #include "cc/base/ref_counted_managed.h" |
| 10 #include "cc/resources/raster_source.h" | 10 #include "cc/resources/raster_source.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 // TODO(vmpstr): Move this to the iterators. | 61 // TODO(vmpstr): Move this to the iterators. |
| 62 void set_is_occluded(WhichTree tree, bool is_occluded) { | 62 void set_is_occluded(WhichTree tree, bool is_occluded) { |
| 63 is_occluded_[tree] = is_occluded; | 63 is_occluded_[tree] = is_occluded; |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool is_occluded(WhichTree tree) const { return is_occluded_[tree]; } | 66 bool is_occluded(WhichTree tree) const { return is_occluded_[tree]; } |
| 67 | 67 |
| 68 void set_shared(bool is_shared) { is_shared_ = is_shared; } | 68 void set_shared(bool is_shared) { is_shared_ = is_shared; } |
| 69 bool is_shared() const { return is_shared_; } | 69 bool is_shared() const { return is_shared_; } |
| 70 | 70 |
| 71 bool is_occluded_combined() const { | |
| 72 return is_occluded_[ACTIVE_TREE] && is_occluded_[PENDING_TREE]; | |
| 73 } | |
| 71 bool is_occluded_for_tree_priority(TreePriority tree_priority) const { | 74 bool is_occluded_for_tree_priority(TreePriority tree_priority) const { |
|
danakj
2015/02/12 21:32:56
no longer used? how come raster iterator doesn't u
vmpstr
2015/02/12 23:38:19
In raster, occlusion is done via PLT::IsTileOcclud
| |
| 72 switch (tree_priority) { | 75 switch (tree_priority) { |
| 73 case SMOOTHNESS_TAKES_PRIORITY: | 76 case SMOOTHNESS_TAKES_PRIORITY: |
| 74 return is_occluded_[ACTIVE_TREE]; | 77 return is_occluded_[ACTIVE_TREE]; |
| 75 case NEW_CONTENT_TAKES_PRIORITY: | 78 case NEW_CONTENT_TAKES_PRIORITY: |
| 76 return is_occluded_[PENDING_TREE]; | 79 return is_occluded_[PENDING_TREE]; |
| 77 case SAME_PRIORITY_FOR_BOTH_TREES: | 80 case SAME_PRIORITY_FOR_BOTH_TREES: |
| 78 return is_occluded_[ACTIVE_TREE] && is_occluded_[PENDING_TREE]; | 81 return is_occluded_[ACTIVE_TREE] && is_occluded_[PENDING_TREE]; |
| 79 default: | 82 default: |
| 80 NOTREACHED(); | 83 NOTREACHED(); |
| 81 return false; | 84 return false; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 unsigned scheduled_priority_; | 183 unsigned scheduled_priority_; |
| 181 | 184 |
| 182 scoped_refptr<RasterTask> raster_task_; | 185 scoped_refptr<RasterTask> raster_task_; |
| 183 | 186 |
| 184 DISALLOW_COPY_AND_ASSIGN(Tile); | 187 DISALLOW_COPY_AND_ASSIGN(Tile); |
| 185 }; | 188 }; |
| 186 | 189 |
| 187 } // namespace cc | 190 } // namespace cc |
| 188 | 191 |
| 189 #endif // CC_RESOURCES_TILE_H_ | 192 #endif // CC_RESOURCES_TILE_H_ |
| OLD | NEW |