| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1612 return settings_.gpu_rasterization_msaa_sample_count; | 1612 return settings_.gpu_rasterization_msaa_sample_count; |
| 1613 } | 1613 } |
| 1614 | 1614 |
| 1615 bool LayerTreeHostImpl::CanUseGpuRasterization() { | 1615 bool LayerTreeHostImpl::CanUseGpuRasterization() { |
| 1616 if (!(output_surface_ && output_surface_->context_provider() && | 1616 if (!(output_surface_ && output_surface_->context_provider() && |
| 1617 output_surface_->worker_context_provider())) | 1617 output_surface_->worker_context_provider())) |
| 1618 return false; | 1618 return false; |
| 1619 | 1619 |
| 1620 ContextProvider* context_provider = | 1620 ContextProvider* context_provider = |
| 1621 output_surface_->worker_context_provider(); | 1621 output_surface_->worker_context_provider(); |
| 1622 base::AutoLock context_lock(*context_provider->GetLock()); | 1622 ContextProvider::ScopedContextLock scoped_context(context_provider); |
| 1623 if (!context_provider->GrContext()) | 1623 if (!context_provider->GrContext()) |
| 1624 return false; | 1624 return false; |
| 1625 | 1625 |
| 1626 return true; | 1626 return true; |
| 1627 } | 1627 } |
| 1628 | 1628 |
| 1629 void LayerTreeHostImpl::UpdateGpuRasterizationStatus() { | 1629 void LayerTreeHostImpl::UpdateGpuRasterizationStatus() { |
| 1630 bool use_gpu = false; | 1630 bool use_gpu = false; |
| 1631 bool use_msaa = false; | 1631 bool use_msaa = false; |
| 1632 bool using_msaa_for_complex_content = | 1632 bool using_msaa_for_complex_content = |
| (...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3603 if (active_tree()) { | 3603 if (active_tree()) { |
| 3604 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); | 3604 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); |
| 3605 if (layer) | 3605 if (layer) |
| 3606 return layer->ScrollOffsetForAnimation(); | 3606 return layer->ScrollOffsetForAnimation(); |
| 3607 } | 3607 } |
| 3608 | 3608 |
| 3609 return gfx::ScrollOffset(); | 3609 return gfx::ScrollOffset(); |
| 3610 } | 3610 } |
| 3611 | 3611 |
| 3612 } // namespace cc | 3612 } // namespace cc |
| OLD | NEW |