Chromium Code Reviews| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 498 typedef LayerIterator<LayerImpl> LayerIteratorType; | 498 typedef LayerIterator<LayerImpl> LayerIteratorType; |
| 499 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); | 499 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); |
| 500 for (LayerIteratorType it = | 500 for (LayerIteratorType it = |
| 501 LayerIteratorType::Begin(&render_surface_layer_list_); | 501 LayerIteratorType::Begin(&render_surface_layer_list_); |
| 502 it != end; | 502 it != end; |
| 503 ++it) { | 503 ++it) { |
| 504 if (occlusion_tracker) | 504 if (occlusion_tracker) |
| 505 occlusion_tracker->EnterLayer(it); | 505 occlusion_tracker->EnterLayer(it); |
| 506 | 506 |
| 507 LayerImpl* layer = *it; | 507 LayerImpl* layer = *it; |
| 508 const Occlusion& occlusion_in_layer_space = | |
|
danakj
2014/09/09 22:11:59
I think you probably mean in_content_space which i
vmpstr
2014/09/10 00:32:24
Changed. So, it is technically layer space right?
| |
| 509 occlusion_tracker ? occlusion_tracker->GetCurrentOcclusionForLayer( | |
| 510 layer->draw_transform()) | |
| 511 : Occlusion(); | |
| 512 | |
| 508 if (it.represents_itself()) | 513 if (it.represents_itself()) |
| 509 layer->UpdateTiles(occlusion_tracker.get()); | 514 layer->UpdateTiles(occlusion_in_layer_space); |
| 510 | 515 |
| 511 if (!it.represents_contributing_render_surface()) { | 516 if (!it.represents_contributing_render_surface()) { |
| 512 if (occlusion_tracker) | 517 if (occlusion_tracker) |
| 513 occlusion_tracker->LeaveLayer(it); | 518 occlusion_tracker->LeaveLayer(it); |
| 514 continue; | 519 continue; |
| 515 } | 520 } |
| 516 | 521 |
| 517 if (layer->mask_layer()) | 522 if (layer->mask_layer()) |
| 518 layer->mask_layer()->UpdateTiles(occlusion_tracker.get()); | 523 layer->mask_layer()->UpdateTiles(occlusion_in_layer_space); |
| 519 if (layer->replica_layer() && layer->replica_layer()->mask_layer()) | 524 if (layer->replica_layer() && layer->replica_layer()->mask_layer()) |
| 520 layer->replica_layer()->mask_layer()->UpdateTiles( | 525 layer->replica_layer()->mask_layer()->UpdateTiles( |
| 521 occlusion_tracker.get()); | 526 occlusion_in_layer_space); |
| 522 | 527 |
| 523 if (occlusion_tracker) | 528 if (occlusion_tracker) |
| 524 occlusion_tracker->LeaveLayer(it); | 529 occlusion_tracker->LeaveLayer(it); |
| 525 } | 530 } |
| 526 } | 531 } |
| 527 | 532 |
| 528 DCHECK(!needs_update_draw_properties_) << | 533 DCHECK(!needs_update_draw_properties_) << |
| 529 "CalcDrawProperties should not set_needs_update_draw_properties()"; | 534 "CalcDrawProperties should not set_needs_update_draw_properties()"; |
| 530 return true; | 535 return true; |
| 531 } | 536 } |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1418 | 1423 |
| 1419 void LayerTreeImpl::InputScrollAnimationFinished() { | 1424 void LayerTreeImpl::InputScrollAnimationFinished() { |
| 1420 layer_tree_host_impl_->ScrollEnd(); | 1425 layer_tree_host_impl_->ScrollEnd(); |
| 1421 } | 1426 } |
| 1422 | 1427 |
| 1423 BlockingTaskRunner* LayerTreeImpl::BlockingMainThreadTaskRunner() const { | 1428 BlockingTaskRunner* LayerTreeImpl::BlockingMainThreadTaskRunner() const { |
| 1424 return proxy()->blocking_main_thread_task_runner(); | 1429 return proxy()->blocking_main_thread_task_runner(); |
| 1425 } | 1430 } |
| 1426 | 1431 |
| 1427 } // namespace cc | 1432 } // namespace cc |
| OLD | NEW |