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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 LayerList updateList; | 567 LayerList updateList; |
568 | 568 |
569 { | 569 { |
570 if (m_settings.pageScalePinchZoomEnabled) { | 570 if (m_settings.pageScalePinchZoomEnabled) { |
571 Layer* rootScroll = findFirstScrollableLayer(rootLayer); | 571 Layer* rootScroll = findFirstScrollableLayer(rootLayer); |
572 if (rootScroll) | 572 if (rootScroll) |
573 rootScroll->setImplTransform(m_implTransform); | 573 rootScroll->setImplTransform(m_implTransform); |
574 } | 574 } |
575 | 575 |
576 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::calcDrawEtc"); | 576 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::calcDrawEtc"); |
577 LayerTreeHostCommon::calculateDrawProperties(rootLayer, deviceViewportSi
ze(), m_deviceScaleFactor, m_pageScaleFactor, rendererCapabilities().maxTextureS
ize, updateList); | 577 LayerTreeHostCommon::calculateDrawProperties(rootLayer, deviceViewportSi
ze(), m_deviceScaleFactor, m_pageScaleFactor, rendererCapabilities().maxTextureS
ize, m_settings.canUseLCDText, updateList); |
578 } | 578 } |
579 | 579 |
580 // Reset partial texture update requests. | 580 // Reset partial texture update requests. |
581 m_partialTextureUpdateRequests = 0; | 581 m_partialTextureUpdateRequests = 0; |
582 | 582 |
583 bool needMoreUpdates = paintLayerContents(updateList, queue); | 583 bool needMoreUpdates = paintLayerContents(updateList, queue); |
584 if (m_triggerIdleUpdates && needMoreUpdates) { | 584 if (m_triggerIdleUpdates && needMoreUpdates) { |
585 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::posting prepaint task")
; | 585 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::posting prepaint task")
; |
586 m_prepaintCallback.Reset(base::Bind(&LayerTreeHost::triggerPrepaint, bas
e::Unretained(this))); | 586 m_prepaintCallback.Reset(base::Bind(&LayerTreeHost::triggerPrepaint, bas
e::Unretained(this))); |
587 static base::TimeDelta prepaintDelay = base::TimeDelta::FromMilliseconds
(100); | 587 static base::TimeDelta prepaintDelay = base::TimeDelta::FromMilliseconds
(100); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 else | 867 else |
868 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 868 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
869 } | 869 } |
870 } | 870 } |
871 | 871 |
872 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 872 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
873 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 873 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
874 } | 874 } |
875 | 875 |
876 } // namespace cc | 876 } // namespace cc |
OLD | NEW |