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

Side by Side Diff: samples/ui_lib/base/AnimationScheduler.dart

Issue 10538105: Make isUtc a getter, change some method names in Date. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 6 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 | « samples/total/client/SpreadsheetPresenter.dart ('k') | samples/ui_lib/touch/TimeUtil.dart » ('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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 typedef void AnimationCallback(num currentTime); 5 typedef void AnimationCallback(num currentTime);
6 6
7 class CallbackData { 7 class CallbackData {
8 final AnimationCallback callback; 8 final AnimationCallback callback;
9 final num minTime; 9 final num minTime;
10 int id; 10 int id;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 assert(_intervalId != null); 116 assert(_intervalId != null);
117 if (USE_INTERVALS) { 117 if (USE_INTERVALS) {
118 window.clearInterval(_intervalId); 118 window.clearInterval(_intervalId);
119 } 119 }
120 _intervalId = null; 120 _intervalId = null;
121 } else if (USE_INTERVALS == false) { 121 } else if (USE_INTERVALS == false) {
122 _intervalId = null; 122 _intervalId = null;
123 _setupInterval(); 123 _setupInterval();
124 } 124 }
125 int numRemaining = 0; 125 int numRemaining = 0;
126 int minTime = new Date.now().value + MS_PER_FRAME; 126 int minTime = new Date.now().millisecondsSinceEpoch + MS_PER_FRAME;
127 127
128 int len = _callbacks.length; 128 int len = _callbacks.length;
129 for (final callback in _callbacks) { 129 for (final callback in _callbacks) {
130 if (!callback.ready(minTime)) { 130 if (!callback.ready(minTime)) {
131 numRemaining++; 131 numRemaining++;
132 } 132 }
133 } 133 }
134 134
135 if (numRemaining == len) { 135 if (numRemaining == len) {
136 // TODO(jacobr): we could be more clever about this case if delayed 136 // TODO(jacobr): we could be more clever about this case if delayed
(...skipping 20 matching lines...) Expand all
157 _frameCount++; 157 _frameCount++;
158 if (_isMobileSafari) { 158 if (_isMobileSafari) {
159 // Hack to work around an iOS bug where sometimes animations do not 159 // Hack to work around an iOS bug where sometimes animations do not
160 // render if only webkit transforms were modified. 160 // render if only webkit transforms were modified.
161 // TODO(jacobr): find a cleaner workaround. 161 // TODO(jacobr): find a cleaner workaround.
162 int offset = _frameCount % 2; 162 int offset = _frameCount % 2;
163 _safariHackStyle.left = '${offset}px'; 163 _safariHackStyle.left = '${offset}px';
164 } 164 }
165 } 165 }
166 } 166 }
OLDNEW
« no previous file with comments | « samples/total/client/SpreadsheetPresenter.dart ('k') | samples/ui_lib/touch/TimeUtil.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698