| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "cc/layer_tree_host_impl.h" | 7 #include "cc/layer_tree_host_impl.h" |
| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 calculateRenderSurfaceLayerList(*frame.renderSurfaceLayerList); | 374 calculateRenderSurfaceLayerList(*frame.renderSurfaceLayerList); |
| 375 | 375 |
| 376 TRACE_EVENT1("cc", "LayerTreeHostImpl::calculateRenderPasses", "renderSurfac
eLayerList.size()", static_cast<long long unsigned>(frame.renderSurfaceLayerList
->size())); | 376 TRACE_EVENT1("cc", "LayerTreeHostImpl::calculateRenderPasses", "renderSurfac
eLayerList.size()", static_cast<long long unsigned>(frame.renderSurfaceLayerList
->size())); |
| 377 | 377 |
| 378 // Create the render passes in dependency order. | 378 // Create the render passes in dependency order. |
| 379 for (int surfaceIndex = frame.renderSurfaceLayerList->size() - 1; surfaceInd
ex >= 0 ; --surfaceIndex) { | 379 for (int surfaceIndex = frame.renderSurfaceLayerList->size() - 1; surfaceInd
ex >= 0 ; --surfaceIndex) { |
| 380 LayerImpl* renderSurfaceLayer = (*frame.renderSurfaceLayerList)[surfaceI
ndex]; | 380 LayerImpl* renderSurfaceLayer = (*frame.renderSurfaceLayerList)[surfaceI
ndex]; |
| 381 renderSurfaceLayer->renderSurface()->appendRenderPasses(frame); | 381 renderSurfaceLayer->renderSurface()->appendRenderPasses(frame); |
| 382 } | 382 } |
| 383 | 383 |
| 384 bool recordMetricsForFrame = base::debug::TraceLog::GetInstance()->IsEnabled
(); | 384 bool recordMetricsForFrame = true; // FIXME: In the future, disable this whe
n about:tracing is off. |
| 385 OcclusionTrackerImpl occlusionTracker(m_rootLayerImpl->renderSurface()->cont
entRect(), recordMetricsForFrame); | 385 OcclusionTrackerImpl occlusionTracker(m_rootLayerImpl->renderSurface()->cont
entRect(), recordMetricsForFrame); |
| 386 occlusionTracker.setMinimumTrackingSize(m_settings.minimumOcclusionTrackingS
ize); | 386 occlusionTracker.setMinimumTrackingSize(m_settings.minimumOcclusionTrackingS
ize); |
| 387 | 387 |
| 388 if (settings().showOccludingRects) | 388 if (settings().showOccludingRects) |
| 389 occlusionTracker.setOccludingScreenSpaceRectsContainer(&frame.occludingS
creenSpaceRects); | 389 occlusionTracker.setOccludingScreenSpaceRectsContainer(&frame.occludingS
creenSpaceRects); |
| 390 | 390 |
| 391 // Add quads to the Render passes in FrontToBack order to allow for testing
occlusion and performing culling during the tree walk. | 391 // Add quads to the Render passes in FrontToBack order to allow for testing
occlusion and performing culling during the tree walk. |
| 392 typedef LayerIterator<LayerImpl, std::vector<LayerImpl*>, RenderSurfaceImpl,
LayerIteratorActions::FrontToBack> LayerIteratorType; | 392 typedef LayerIterator<LayerImpl, std::vector<LayerImpl*>, RenderSurfaceImpl,
LayerIteratorActions::FrontToBack> LayerIteratorType; |
| 393 | 393 |
| 394 // Typically when we are missing a texture and use a checkerboard quad, we s
till draw the frame. However when the layer being | 394 // Typically when we are missing a texture and use a checkerboard quad, we s
till draw the frame. However when the layer being |
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); | 1473 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); |
| 1474 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 1474 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
| 1475 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1475 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
| 1476 m_client->setNeedsRedrawOnImplThread(); | 1476 m_client->setNeedsRedrawOnImplThread(); |
| 1477 | 1477 |
| 1478 for (size_t i = 0; i < layer->children().size(); ++i) | 1478 for (size_t i = 0; i < layer->children().size(); ++i) |
| 1479 animateScrollbarsRecursive(layer->children()[i], time); | 1479 animateScrollbarsRecursive(layer->children()[i], time); |
| 1480 } | 1480 } |
| 1481 | 1481 |
| 1482 } // namespace cc | 1482 } // namespace cc |
| OLD | NEW |