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.h" | 5 #include "cc/layer_tree_host.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 LayerList updateList; | 663 LayerList updateList; |
664 | 664 |
665 { | 665 { |
666 if (m_settings.pageScalePinchZoomEnabled) { | 666 if (m_settings.pageScalePinchZoomEnabled) { |
667 Layer* rootScroll = findFirstScrollableLayer(rootLayer); | 667 Layer* rootScroll = findFirstScrollableLayer(rootLayer); |
668 if (rootScroll) | 668 if (rootScroll) |
669 rootScroll->setImplTransform(m_implTransform); | 669 rootScroll->setImplTransform(m_implTransform); |
670 } | 670 } |
671 | 671 |
672 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::calcDrawEtc"); | 672 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::calcDrawEtc"); |
673 LayerTreeHostCommon::calculateDrawTransforms(rootLayer, deviceViewportSi
ze(), m_deviceScaleFactor, m_pageScaleFactor, rendererCapabilities().maxTextureS
ize, updateList); | 673 LayerTreeHostCommon::calculateDrawProperties(rootLayer, deviceViewportSi
ze(), m_deviceScaleFactor, m_pageScaleFactor, rendererCapabilities().maxTextureS
ize, updateList); |
674 } | 674 } |
675 | 675 |
676 // Reset partial texture update requests. | 676 // Reset partial texture update requests. |
677 m_partialTextureUpdateRequests = 0; | 677 m_partialTextureUpdateRequests = 0; |
678 | 678 |
679 bool needMoreUpdates = paintLayerContents(updateList, queue); | 679 bool needMoreUpdates = paintLayerContents(updateList, queue); |
680 if (m_triggerIdleUpdates && needMoreUpdates) { | 680 if (m_triggerIdleUpdates && needMoreUpdates) { |
681 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::posting prepaint task")
; | 681 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::posting prepaint task")
; |
682 m_prepaintCallback.Reset(base::Bind(&LayerTreeHost::triggerPrepaint, bas
e::Unretained(this))); | 682 m_prepaintCallback.Reset(base::Bind(&LayerTreeHost::triggerPrepaint, bas
e::Unretained(this))); |
683 static base::TimeDelta prepaintDelay = base::TimeDelta::FromMilliseconds
(100); | 683 static base::TimeDelta prepaintDelay = base::TimeDelta::FromMilliseconds
(100); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 else | 963 else |
964 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 964 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
965 } | 965 } |
966 } | 966 } |
967 | 967 |
968 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 968 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
969 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 969 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
970 } | 970 } |
971 | 971 |
972 } // namespace cc | 972 } // namespace cc |
OLD | NEW |