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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 595023002: Implement idle task scheduling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename estimatedNextBeginFrameSeconds Created 6 years, 2 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 | « Source/platform/scheduler/TracedTask.cpp ('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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 } 1811 }
1812 1812
1813 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) 1813 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime)
1814 { 1814 {
1815 TRACE_EVENT0("blink", "WebViewImpl::beginFrame"); 1815 TRACE_EVENT0("blink", "WebViewImpl::beginFrame");
1816 1816
1817 WebBeginFrameArgs validFrameTime(frameTime); 1817 WebBeginFrameArgs validFrameTime(frameTime);
1818 if (!validFrameTime.lastFrameTimeMonotonic) 1818 if (!validFrameTime.lastFrameTimeMonotonic)
1819 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); 1819 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime();
1820 1820
1821 Scheduler::shared()->willBeginFrame(validFrameTime); 1821 Scheduler::shared()->willBeginFrame(
jochen (gone - plz use gerrit) 2014/10/07 11:20:38 nit. no 80 char limit in blink
rmcilroy 2014/10/07 13:05:04 Done.
1822 validFrameTime.lastFrameTimeMonotonic + validFrameTime.interval);
1822 1823
1823 // Create synthetic wheel events as necessary for fling. 1824 // Create synthetic wheel events as necessary for fling.
1824 if (m_gestureAnimation) { 1825 if (m_gestureAnimation) {
1825 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) 1826 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic))
1826 scheduleAnimation(); 1827 scheduleAnimation();
1827 else { 1828 else {
1828 endActiveFlingAnimation(); 1829 endActiveFlingAnimation();
1829 1830
1830 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, 1831 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd,
1831 m_positionOnFlingStart, m_globalPositionOnFlingStart, 1832 m_positionOnFlingStart, m_globalPositionOnFlingStart,
(...skipping 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after
4428 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4429 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4429 4430
4430 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4431 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4431 return false; 4432 return false;
4432 4433
4433 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4434 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4434 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4435 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4435 } 4436 }
4436 4437
4437 } // namespace blink 4438 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/scheduler/TracedTask.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698