| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/trees/layer_tree_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 typedef LayerIterator<LayerImpl> LayerIteratorType; | 513 typedef LayerIterator<LayerImpl> LayerIteratorType; |
| 514 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); | 514 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); |
| 515 for (LayerIteratorType it = | 515 for (LayerIteratorType it = |
| 516 LayerIteratorType::Begin(&render_surface_layer_list_); | 516 LayerIteratorType::Begin(&render_surface_layer_list_); |
| 517 it != end; | 517 it != end; |
| 518 ++it) { | 518 ++it) { |
| 519 if (occlusion_tracker) | 519 if (occlusion_tracker) |
| 520 occlusion_tracker->EnterLayer(it); | 520 occlusion_tracker->EnterLayer(it); |
| 521 | 521 |
| 522 LayerImpl* layer = *it; | 522 LayerImpl* layer = *it; |
| 523 const Occlusion& occlusion_in_content_space = | |
| 524 occlusion_tracker ? occlusion_tracker->GetCurrentOcclusionForLayer( | |
| 525 layer->draw_transform()) | |
| 526 : Occlusion(); | |
| 527 | |
| 528 if (it.represents_itself()) | 523 if (it.represents_itself()) |
| 529 layer->UpdateTiles(occlusion_in_content_space); | 524 layer->UpdateTiles(occlusion_tracker.get()); |
| 530 | 525 |
| 531 if (!it.represents_contributing_render_surface()) { | 526 if (!it.represents_contributing_render_surface()) { |
| 532 if (occlusion_tracker) | 527 if (occlusion_tracker) |
| 533 occlusion_tracker->LeaveLayer(it); | 528 occlusion_tracker->LeaveLayer(it); |
| 534 continue; | 529 continue; |
| 535 } | 530 } |
| 536 | 531 |
| 537 if (layer->mask_layer()) | 532 if (layer->mask_layer()) |
| 538 layer->mask_layer()->UpdateTiles(occlusion_in_content_space); | 533 layer->mask_layer()->UpdateTiles(occlusion_tracker.get()); |
| 539 if (layer->replica_layer() && layer->replica_layer()->mask_layer()) | 534 if (layer->replica_layer() && layer->replica_layer()->mask_layer()) |
| 540 layer->replica_layer()->mask_layer()->UpdateTiles( | 535 layer->replica_layer()->mask_layer()->UpdateTiles( |
| 541 occlusion_in_content_space); | 536 occlusion_tracker.get()); |
| 542 | 537 |
| 543 if (occlusion_tracker) | 538 if (occlusion_tracker) |
| 544 occlusion_tracker->LeaveLayer(it); | 539 occlusion_tracker->LeaveLayer(it); |
| 545 } | 540 } |
| 546 } | 541 } |
| 547 | 542 |
| 548 DCHECK(!needs_update_draw_properties_) << | 543 DCHECK(!needs_update_draw_properties_) << |
| 549 "CalcDrawProperties should not set_needs_update_draw_properties()"; | 544 "CalcDrawProperties should not set_needs_update_draw_properties()"; |
| 550 return true; | 545 return true; |
| 551 } | 546 } |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1438 | 1433 |
| 1439 void LayerTreeImpl::InputScrollAnimationFinished() { | 1434 void LayerTreeImpl::InputScrollAnimationFinished() { |
| 1440 layer_tree_host_impl_->ScrollEnd(); | 1435 layer_tree_host_impl_->ScrollEnd(); |
| 1441 } | 1436 } |
| 1442 | 1437 |
| 1443 BlockingTaskRunner* LayerTreeImpl::BlockingMainThreadTaskRunner() const { | 1438 BlockingTaskRunner* LayerTreeImpl::BlockingMainThreadTaskRunner() const { |
| 1444 return proxy()->blocking_main_thread_task_runner(); | 1439 return proxy()->blocking_main_thread_task_runner(); |
| 1445 } | 1440 } |
| 1446 | 1441 |
| 1447 } // namespace cc | 1442 } // namespace cc |
| OLD | NEW |