| 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_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 5711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5722 host_impl_->SetVisible(true); | 5722 host_impl_->SetVisible(true); |
| 5723 EXPECT_EQ(policy1.bytes_limit_when_visible, current_limit_bytes_); | 5723 EXPECT_EQ(policy1.bytes_limit_when_visible, current_limit_bytes_); |
| 5724 EXPECT_EQ(everything_cutoff_value, current_priority_cutoff_value_); | 5724 EXPECT_EQ(everything_cutoff_value, current_priority_cutoff_value_); |
| 5725 | 5725 |
| 5726 // Now enable GPU rasterization and test if we get nice to have cutoff, | 5726 // Now enable GPU rasterization and test if we get nice to have cutoff, |
| 5727 // when visible. | 5727 // when visible. |
| 5728 LayerTreeSettings settings; | 5728 LayerTreeSettings settings; |
| 5729 settings.gpu_rasterization_enabled = true; | 5729 settings.gpu_rasterization_enabled = true; |
| 5730 host_impl_ = LayerTreeHostImpl::Create( | 5730 host_impl_ = LayerTreeHostImpl::Create( |
| 5731 settings, this, &proxy_, &stats_instrumentation_, NULL, 0); | 5731 settings, this, &proxy_, &stats_instrumentation_, NULL, 0); |
| 5732 host_impl_->active_tree()->SetUseGpuRasterization(true); | 5732 host_impl_->SetUseGpuRasterization(true); |
| 5733 host_impl_->SetVisible(true); | 5733 host_impl_->SetVisible(true); |
| 5734 host_impl_->SetMemoryPolicy(policy1); | 5734 host_impl_->SetMemoryPolicy(policy1); |
| 5735 EXPECT_EQ(policy1.bytes_limit_when_visible, current_limit_bytes_); | 5735 EXPECT_EQ(policy1.bytes_limit_when_visible, current_limit_bytes_); |
| 5736 EXPECT_EQ(allow_nice_to_have_cutoff_value, current_priority_cutoff_value_); | 5736 EXPECT_EQ(allow_nice_to_have_cutoff_value, current_priority_cutoff_value_); |
| 5737 | 5737 |
| 5738 host_impl_->SetVisible(false); | 5738 host_impl_->SetVisible(false); |
| 5739 EXPECT_EQ(0u, current_limit_bytes_); | 5739 EXPECT_EQ(0u, current_limit_bytes_); |
| 5740 EXPECT_EQ(nothing_cutoff_value, current_priority_cutoff_value_); | 5740 EXPECT_EQ(nothing_cutoff_value, current_priority_cutoff_value_); |
| 5741 } | 5741 } |
| 5742 | 5742 |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6586 FakePictureLayerImpl* active_mask_content = | 6586 FakePictureLayerImpl* active_mask_content = |
| 6587 static_cast<FakePictureLayerImpl*>( | 6587 static_cast<FakePictureLayerImpl*>( |
| 6588 host_impl_->active_tree()->root_layer()->children()[0]->mask_layer()); | 6588 host_impl_->active_tree()->root_layer()->children()[0]->mask_layer()); |
| 6589 gfx::Rect r2 = active_mask_content->visible_rect_for_tile_priority(); | 6589 gfx::Rect r2 = active_mask_content->visible_rect_for_tile_priority(); |
| 6590 | 6590 |
| 6591 ASSERT_TRUE(!r2.IsEmpty()); | 6591 ASSERT_TRUE(!r2.IsEmpty()); |
| 6592 } | 6592 } |
| 6593 | 6593 |
| 6594 } // namespace | 6594 } // namespace |
| 6595 } // namespace cc | 6595 } // namespace cc |
| OLD | NEW |