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

Side by Side Diff: cc/CCLayerTreeHostImpl.cpp

Issue 10956006: Convert CC scheduler logic to use base::TimeTicks/Delta instead of doubles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 3 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/CCLayerTreeHostImpl.h ('k') | cc/CCScheduler.h » ('j') | 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 "config.h" 5 #include "config.h"
6 6
7 #include "CCLayerTreeHostImpl.h" 7 #include "CCLayerTreeHostImpl.h"
8 8
9 #include "CCAppendQuadsData.h" 9 #include "CCAppendQuadsData.h"
10 #include "CCDamageTracker.h" 10 #include "CCDamageTracker.h"
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 1210
1211 if (!events->isEmpty()) 1211 if (!events->isEmpty())
1212 m_client->postAnimationEventsToMainThreadOnImplThread(events.release(), wallClockTime); 1212 m_client->postAnimationEventsToMainThreadOnImplThread(events.release(), wallClockTime);
1213 1213
1214 if (didAnimate) 1214 if (didAnimate)
1215 m_client->setNeedsRedrawOnImplThread(); 1215 m_client->setNeedsRedrawOnImplThread();
1216 1216
1217 setBackgroundTickingEnabled(!m_visible && m_needsAnimateLayers); 1217 setBackgroundTickingEnabled(!m_visible && m_needsAnimateLayers);
1218 } 1218 }
1219 1219
1220 double CCLayerTreeHostImpl::lowFrequencyAnimationInterval() const 1220 base::TimeDelta CCLayerTreeHostImpl::lowFrequencyAnimationInterval() const
1221 { 1221 {
1222 return 1; 1222 return base::TimeDelta::FromSeconds(1);
1223 } 1223 }
1224 1224
1225 void CCLayerTreeHostImpl::sendDidLoseContextRecursive(CCLayerImpl* current) 1225 void CCLayerTreeHostImpl::sendDidLoseContextRecursive(CCLayerImpl* current)
1226 { 1226 {
1227 ASSERT(current); 1227 ASSERT(current);
1228 current->didLoseContext(); 1228 current->didLoseContext();
1229 if (current->maskLayer()) 1229 if (current->maskLayer())
1230 sendDidLoseContextRecursive(current->maskLayer()); 1230 sendDidLoseContextRecursive(current->maskLayer());
1231 if (current->replicaLayer()) 1231 if (current->replicaLayer())
1232 sendDidLoseContextRecursive(current->replicaLayer()); 1232 sendDidLoseContextRecursive(current->replicaLayer());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 1291
1292 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat ionController(); 1292 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat ionController();
1293 if (scrollbarController && scrollbarController->animate(monotonicTime)) 1293 if (scrollbarController && scrollbarController->animate(monotonicTime))
1294 m_client->setNeedsRedrawOnImplThread(); 1294 m_client->setNeedsRedrawOnImplThread();
1295 1295
1296 for (size_t i = 0; i < layer->children().size(); ++i) 1296 for (size_t i = 0; i < layer->children().size(); ++i)
1297 animateScrollbarsRecursive(layer->children()[i], monotonicTime); 1297 animateScrollbarsRecursive(layer->children()[i], monotonicTime);
1298 } 1298 }
1299 1299
1300 } // namespace cc 1300 } // namespace cc
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHostImpl.h ('k') | cc/CCScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698