Chromium Code Reviews| 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/thread_proxy.h" | 5 #include "cc/thread_proxy.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "cc/delay_based_time_source.h" | 10 #include "cc/delay_based_time_source.h" |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1169 smoothnessTakesPriorityExpirationDelay * 1000); | 1169 smoothnessTakesPriorityExpirationDelay * 1000); |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 // We use the same priority for both trees by default. | 1172 // We use the same priority for both trees by default. |
| 1173 TreePriority priority = SAME_PRIORITY_FOR_BOTH_TREES; | 1173 TreePriority priority = SAME_PRIORITY_FOR_BOTH_TREES; |
| 1174 | 1174 |
| 1175 // Smoothness takes priority if expiration time is in the future. | 1175 // Smoothness takes priority if expiration time is in the future. |
| 1176 if (m_smoothnessTakesPriorityExpirationTime > base::TimeTicks::Now()) | 1176 if (m_smoothnessTakesPriorityExpirationTime > base::TimeTicks::Now()) |
| 1177 priority = SMOOTHNESS_TAKES_PRIORITY; | 1177 priority = SMOOTHNESS_TAKES_PRIORITY; |
| 1178 | 1178 |
| 1179 // New content always takes priority when we have an active tree with | 1179 // New content always takes priority when we the active tree has |
|
enne (OOO)
2013/02/13 22:41:53
s/we //
| |
| 1180 // evicted resources. | 1180 // evicted resources or invalid viewport size. |
|
enne (OOO)
2013/02/13 22:41:53
s/or/or there is an invalid viewport size/
| |
| 1181 if (m_layerTreeHostImpl->activeTree()->ContentsTexturesPurged()) | 1181 if (m_layerTreeHostImpl->activeTree()->ContentsTexturesPurged() || |
| 1182 m_layerTreeHostImpl->activeTree()->ViewportSizeInvalid()) | |
| 1182 priority = NEW_CONTENT_TAKES_PRIORITY; | 1183 priority = NEW_CONTENT_TAKES_PRIORITY; |
| 1183 | 1184 |
| 1184 m_layerTreeHostImpl->setTreePriority(priority); | 1185 m_layerTreeHostImpl->setTreePriority(priority); |
| 1185 | 1186 |
| 1186 // Notify the the client of this compositor via the output surface. | 1187 // Notify the the client of this compositor via the output surface. |
| 1187 // TODO(epenner): Route this to compositor-thread instead of output-surface | 1188 // TODO(epenner): Route this to compositor-thread instead of output-surface |
| 1188 // after GTFO refactor of compositor-thread (http://crbug/170828). | 1189 // after GTFO refactor of compositor-thread (http://crbug/170828). |
| 1189 if (m_layerTreeHostImpl->outputSurface()) { | 1190 if (m_layerTreeHostImpl->outputSurface()) { |
| 1190 m_layerTreeHostImpl->outputSurface()->UpdateSmoothnessTakesPriority( | 1191 m_layerTreeHostImpl->outputSurface()->UpdateSmoothnessTakesPriority( |
| 1191 priority == SMOOTHNESS_TAKES_PRIORITY); | 1192 priority == SMOOTHNESS_TAKES_PRIORITY); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 1211 | 1212 |
| 1212 void ThreadProxy::renewTreePriorityOnImplThread() | 1213 void ThreadProxy::renewTreePriorityOnImplThread() |
| 1213 { | 1214 { |
| 1214 DCHECK(m_renewTreePriorityOnImplThreadPending); | 1215 DCHECK(m_renewTreePriorityOnImplThreadPending); |
| 1215 m_renewTreePriorityOnImplThreadPending = false; | 1216 m_renewTreePriorityOnImplThreadPending = false; |
| 1216 | 1217 |
| 1217 renewTreePriority(); | 1218 renewTreePriority(); |
| 1218 } | 1219 } |
| 1219 | 1220 |
| 1220 } // namespace cc | 1221 } // namespace cc |
| OLD | NEW |