Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: cc/thread_proxy.cc

Issue 12212156: cc: Only allow trees created at the current viewport size to draw. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits and rebase to 182333 Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layer_tree_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 the active tree has
1180 // evicted resources. 1180 // evicted resources 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
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
OLDNEW
« no previous file with comments | « cc/layer_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698