| 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/layer_tree_host_impl.h" | 5 #include "cc/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 void LayerTreeHostImpl::trackDamageForAllSurfaces(LayerImpl* rootDrawLayer, cons
t LayerList& renderSurfaceLayerList) | 352 void LayerTreeHostImpl::trackDamageForAllSurfaces(LayerImpl* rootDrawLayer, cons
t LayerList& renderSurfaceLayerList) |
| 353 { | 353 { |
| 354 // For now, we use damage tracking to compute a global scissor. To do this,
we must | 354 // For now, we use damage tracking to compute a global scissor. To do this,
we must |
| 355 // compute all damage tracking before drawing anything, so that we know the
root | 355 // compute all damage tracking before drawing anything, so that we know the
root |
| 356 // damage rect. The root damage rect is then used to scissor each surface. | 356 // damage rect. The root damage rect is then used to scissor each surface. |
| 357 | 357 |
| 358 for (int surfaceIndex = renderSurfaceLayerList.size() - 1; surfaceIndex >= 0
; --surfaceIndex) { | 358 for (int surfaceIndex = renderSurfaceLayerList.size() - 1; surfaceIndex >= 0
; --surfaceIndex) { |
| 359 LayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex]; | 359 LayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex]; |
| 360 RenderSurfaceImpl* renderSurface = renderSurfaceLayer->renderSurface(); | 360 RenderSurfaceImpl* renderSurface = renderSurfaceLayer->renderSurface(); |
| 361 DCHECK(renderSurface); | 361 DCHECK(renderSurface); |
| 362 renderSurface->damageTracker()->updateDamageTrackingState(renderSurface-
>layerList(), renderSurfaceLayer->id(), renderSurface->surfacePropertyChangedOnl
yFromDescendant(), renderSurface->contentRect(), renderSurfaceLayer->maskLayer()
, renderSurfaceLayer->filters(), renderSurfaceLayer->filter()); | 362 renderSurface->damageTracker()->updateDamageTrackingState(renderSurface-
>layerList(), renderSurfaceLayer->id(), renderSurface->surfacePropertyChangedOnl
yFromDescendant(), renderSurface->contentRect(), renderSurfaceLayer->maskLayer()
, renderSurfaceLayer->filters(), renderSurfaceLayer->filter().get()); |
| 363 } | 363 } |
| 364 } | 364 } |
| 365 | 365 |
| 366 void LayerTreeHostImpl::updateRootScrollLayerImplTransform() | 366 void LayerTreeHostImpl::updateRootScrollLayerImplTransform() |
| 367 { | 367 { |
| 368 if (m_rootScrollLayerImpl) { | 368 if (m_rootScrollLayerImpl) { |
| 369 m_rootScrollLayerImpl->setImplTransform(implTransform()); | 369 m_rootScrollLayerImpl->setImplTransform(implTransform()); |
| 370 } | 370 } |
| 371 } | 371 } |
| 372 | 372 |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); | 1632 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); |
| 1633 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 1633 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
| 1634 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1634 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
| 1635 m_client->setNeedsRedrawOnImplThread(); | 1635 m_client->setNeedsRedrawOnImplThread(); |
| 1636 | 1636 |
| 1637 for (size_t i = 0; i < layer->children().size(); ++i) | 1637 for (size_t i = 0; i < layer->children().size(); ++i) |
| 1638 animateScrollbarsRecursive(layer->children()[i], time); | 1638 animateScrollbarsRecursive(layer->children()[i], time); |
| 1639 } | 1639 } |
| 1640 | 1640 |
| 1641 } // namespace cc | 1641 } // namespace cc |
| OLD | NEW |