OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include <utility> | 5 #include <utility> |
6 | 6 |
7 #include "cc/resources/tiling_set_eviction_queue.h" | 7 #include "cc/resources/tiling_set_eviction_queue.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 switch (tree_priority_) { | 324 switch (tree_priority_) { |
325 case SMOOTHNESS_TAKES_PRIORITY: | 325 case SMOOTHNESS_TAKES_PRIORITY: |
326 DCHECK_EQ(ACTIVE_TREE, tree_); | 326 DCHECK_EQ(ACTIVE_TREE, tree_); |
327 return false; | 327 return false; |
328 case NEW_CONTENT_TAKES_PRIORITY: | 328 case NEW_CONTENT_TAKES_PRIORITY: |
329 DCHECK_EQ(PENDING_TREE, tree_); | 329 DCHECK_EQ(PENDING_TREE, tree_); |
330 return false; | 330 return false; |
331 case SAME_PRIORITY_FOR_BOTH_TREES: | 331 case SAME_PRIORITY_FOR_BOTH_TREES: |
332 break; | 332 break; |
333 case NUM_TREE_PRIORITIES: | |
334 NOTREACHED(); | |
335 break; | |
336 } | 333 } |
337 | 334 |
338 // The priority for tile priority of a shared tile will be a combined | 335 // The priority for tile priority of a shared tile will be a combined |
339 // priority thus return shared tiles from a higher priority tree as | 336 // priority thus return shared tiles from a higher priority tree as |
340 // it is out of order for a lower priority tree. | 337 // it is out of order for a lower priority tree. |
341 WhichTree twin_tree = tree_ == ACTIVE_TREE ? PENDING_TREE : ACTIVE_TREE; | 338 WhichTree twin_tree = tree_ == ACTIVE_TREE ? PENDING_TREE : ACTIVE_TREE; |
342 const TilePriority& priority = tile->priority(tree_); | 339 const TilePriority& priority = tile->priority(tree_); |
343 const TilePriority& twin_priority = tile->priority(twin_tree); | 340 const TilePriority& twin_priority = tile->priority(twin_tree); |
344 if (priority.priority_bin != twin_priority.priority_bin) | 341 if (priority.priority_bin != twin_priority.priority_bin) |
345 return priority.priority_bin > twin_priority.priority_bin; | 342 return priority.priority_bin > twin_priority.priority_bin; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 tiling_set_->client()->GetPendingOrActiveTwinTiling(tiling); | 381 tiling_set_->client()->GetPendingOrActiveTwinTiling(tiling); |
385 if (pending_tiling && pending_tiling->resolution() == HIGH_RESOLUTION) | 382 if (pending_tiling && pending_tiling->resolution() == HIGH_RESOLUTION) |
386 return i; | 383 return i; |
387 } | 384 } |
388 } | 385 } |
389 | 386 |
390 return num_tilings; | 387 return num_tilings; |
391 } | 388 } |
392 | 389 |
393 } // namespace cc | 390 } // namespace cc |
OLD | NEW |