Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.cc |
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
| index 97852176f80da1697da3ce3e18ad66f2df08d3a9..0ee840ffa4081ce8a994d67bd54ddb3d452370d8 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -241,7 +241,8 @@ LayerTreeHostImpl::LayerTreeHostImpl( |
| id_(id), |
| requires_high_res_to_draw_(false), |
| is_likely_to_require_a_draw_(false), |
| - mutator_(nullptr) { |
| + mutator_(nullptr), |
| + has_fixed_raster_scale_blurry_content_(false) { |
| animation_host_ = AnimationHost::Create(ThreadInstance::IMPL); |
| animation_host_->SetMutatorHostClient(this); |
| animation_host_->SetSupportsScrollAnimations(SupportsImplScrolling()); |
| @@ -354,6 +355,9 @@ void LayerTreeHostImpl::CommitComplete() { |
| UpdateTreeResourcesForGpuRasterizationIfNeeded(); |
| sync_tree()->set_needs_update_draw_properties(); |
| + // Advance the attempted scale change history before updaring draw properties. |
|
danakj
2016/05/10 22:05:30
updating
vmpstr
2016/05/13 00:13:34
Done.
|
| + fixed_raster_scale_attempted_scale_change_history_ <<= 1; |
| + |
| // We need an update immediately post-commit to have the opportunity to create |
| // tilings. Because invalidations may be coming from the main thread, it's |
| // safe to do an update for lcd text at this point and see if lcd text needs |
| @@ -3968,4 +3972,14 @@ bool LayerTreeHostImpl::CommitToActiveTree() const { |
| return !task_runner_provider_->HasImplThread(); |
| } |
| +bool LayerTreeHostImpl::HasFixedRasterScalePotentialPerformanceRegression() |
| + const { |
| + return fixed_raster_scale_attempted_scale_change_history_.count() >= |
| + kFixedRasterScaleAttemptedScaleChangeThreshold; |
| +} |
| + |
| +void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { |
| + fixed_raster_scale_attempted_scale_change_history_.set(0); |
| +} |
| + |
| } // namespace cc |