| 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 "CCLayerTreeHost.h" | 7 #include "CCLayerTreeHost.h" |
| 8 | 8 |
| 9 #include "CCFontAtlas.h" | 9 #include "CCFontAtlas.h" |
| 10 #include "CCGraphicsContext.h" | 10 #include "CCGraphicsContext.h" |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 | 539 |
| 540 void CCLayerTreeHost::updateLayers(LayerChromium* rootLayer, CCTextureUpdateQueu
e& queue) | 540 void CCLayerTreeHost::updateLayers(LayerChromium* rootLayer, CCTextureUpdateQueu
e& queue) |
| 541 { | 541 { |
| 542 TRACE_EVENT0("cc", "CCLayerTreeHost::updateLayers"); | 542 TRACE_EVENT0("cc", "CCLayerTreeHost::updateLayers"); |
| 543 | 543 |
| 544 updateLayerScale(rootLayer, m_deviceScaleFactor, m_pageScaleFactor); | 544 updateLayerScale(rootLayer, m_deviceScaleFactor, m_pageScaleFactor); |
| 545 | 545 |
| 546 LayerList updateList; | 546 LayerList updateList; |
| 547 | 547 |
| 548 { | 548 { |
| 549 if (CCSettings::pageScalePinchZoomEnabled()) { | 549 if (Settings::pageScalePinchZoomEnabled()) { |
| 550 LayerChromium* rootScroll = findFirstScrollableLayer(rootLayer); | 550 LayerChromium* rootScroll = findFirstScrollableLayer(rootLayer); |
| 551 if (rootScroll) | 551 if (rootScroll) |
| 552 rootScroll->setImplTransform(m_implTransform); | 552 rootScroll->setImplTransform(m_implTransform); |
| 553 } | 553 } |
| 554 | 554 |
| 555 TRACE_EVENT0("cc", "CCLayerTreeHost::updateLayers::calcDrawEtc"); | 555 TRACE_EVENT0("cc", "CCLayerTreeHost::updateLayers::calcDrawEtc"); |
| 556 CCLayerTreeHostCommon::calculateDrawTransforms(rootLayer, deviceViewport
Size(), m_deviceScaleFactor, rendererCapabilities().maxTextureSize, updateList); | 556 CCLayerTreeHostCommon::calculateDrawTransforms(rootLayer, deviceViewport
Size(), m_deviceScaleFactor, rendererCapabilities().maxTextureSize, updateList); |
| 557 } | 557 } |
| 558 | 558 |
| 559 // Reset partial texture update requests. | 559 // Reset partial texture update requests. |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 { | 770 { |
| 771 if (deviceScaleFactor == m_deviceScaleFactor) | 771 if (deviceScaleFactor == m_deviceScaleFactor) |
| 772 return; | 772 return; |
| 773 m_deviceScaleFactor = deviceScaleFactor; | 773 m_deviceScaleFactor = deviceScaleFactor; |
| 774 | 774 |
| 775 setNeedsCommit(); | 775 setNeedsCommit(); |
| 776 } | 776 } |
| 777 | 777 |
| 778 void CCLayerTreeHost::animateLayers(double monotonicTime) | 778 void CCLayerTreeHost::animateLayers(double monotonicTime) |
| 779 { | 779 { |
| 780 if (!CCSettings::acceleratedAnimationEnabled() || !m_needsAnimateLayers) | 780 if (!Settings::acceleratedAnimationEnabled() || !m_needsAnimateLayers) |
| 781 return; | 781 return; |
| 782 | 782 |
| 783 TRACE_EVENT0("cc", "CCLayerTreeHostImpl::animateLayers"); | 783 TRACE_EVENT0("cc", "CCLayerTreeHostImpl::animateLayers"); |
| 784 m_needsAnimateLayers = animateLayersRecursive(m_rootLayer.get(), monotonicTi
me); | 784 m_needsAnimateLayers = animateLayersRecursive(m_rootLayer.get(), monotonicTi
me); |
| 785 } | 785 } |
| 786 | 786 |
| 787 bool CCLayerTreeHost::animateLayersRecursive(LayerChromium* current, double mono
tonicTime) | 787 bool CCLayerTreeHost::animateLayersRecursive(LayerChromium* current, double mono
tonicTime) |
| 788 { | 788 { |
| 789 if (!current) | 789 if (!current) |
| 790 return false; | 790 return false; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 817 else | 817 else |
| 818 layer->notifyAnimationFinished(wallClockTime); | 818 layer->notifyAnimationFinished(wallClockTime); |
| 819 } | 819 } |
| 820 } | 820 } |
| 821 | 821 |
| 822 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 822 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
| 823 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 823 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
| 824 } | 824 } |
| 825 | 825 |
| 826 } // namespace cc | 826 } // namespace cc |
| OLD | NEW |