| 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/trees/thread_proxy.h" | 5 #include "cc/trees/thread_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 | 1333 |
| 1334 // New content always takes priority when the active tree has | 1334 // New content always takes priority when the active tree has |
| 1335 // evicted resources or there is an invalid viewport size. | 1335 // evicted resources or there is an invalid viewport size. |
| 1336 if (impl().layer_tree_host_impl->active_tree()->ContentsTexturesPurged() || | 1336 if (impl().layer_tree_host_impl->active_tree()->ContentsTexturesPurged() || |
| 1337 impl().layer_tree_host_impl->active_tree()->ViewportSizeInvalid() || | 1337 impl().layer_tree_host_impl->active_tree()->ViewportSizeInvalid() || |
| 1338 impl().layer_tree_host_impl->EvictedUIResourcesExist() || | 1338 impl().layer_tree_host_impl->EvictedUIResourcesExist() || |
| 1339 impl().input_throttled_until_commit) { | 1339 impl().input_throttled_until_commit) { |
| 1340 // Once we enter NEW_CONTENTS_TAKES_PRIORITY mode, visible tiles on active | 1340 // Once we enter NEW_CONTENTS_TAKES_PRIORITY mode, visible tiles on active |
| 1341 // tree might be freed. We need to set RequiresHighResToDraw to ensure that | 1341 // tree might be freed. We need to set RequiresHighResToDraw to ensure that |
| 1342 // high res tiles will be required to activate pending tree. | 1342 // high res tiles will be required to activate pending tree. |
| 1343 impl().layer_tree_host_impl->active_tree()->SetRequiresHighResToDraw(); | 1343 impl().layer_tree_host_impl->SetRequiresHighResToDraw(); |
| 1344 priority = NEW_CONTENT_TAKES_PRIORITY; | 1344 priority = NEW_CONTENT_TAKES_PRIORITY; |
| 1345 } | 1345 } |
| 1346 | 1346 |
| 1347 impl().layer_tree_host_impl->SetTreePriority(priority); | 1347 impl().layer_tree_host_impl->SetTreePriority(priority); |
| 1348 | 1348 |
| 1349 // Only put the scheduler in impl latency prioritization mode if we don't | 1349 // Only put the scheduler in impl latency prioritization mode if we don't |
| 1350 // have a scroll listener. This gives the scroll listener a better chance of | 1350 // have a scroll listener. This gives the scroll listener a better chance of |
| 1351 // handling scroll updates within the same frame. The tree itself is still | 1351 // handling scroll updates within the same frame. The tree itself is still |
| 1352 // kept in prefer smoothness mode to allow checkerboarding. | 1352 // kept in prefer smoothness mode to allow checkerboarding. |
| 1353 impl().scheduler->SetImplLatencyTakesPriority( | 1353 impl().scheduler->SetImplLatencyTakesPriority( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 | 1386 |
| 1387 impl().timing_history.DidActivateSyncTree(); | 1387 impl().timing_history.DidActivateSyncTree(); |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 void ThreadProxy::DidManageTiles() { | 1390 void ThreadProxy::DidManageTiles() { |
| 1391 DCHECK(IsImplThread()); | 1391 DCHECK(IsImplThread()); |
| 1392 impl().scheduler->DidManageTiles(); | 1392 impl().scheduler->DidManageTiles(); |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 } // namespace cc | 1395 } // namespace cc |
| OLD | NEW |