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

Side by Side Diff: cc/animation/animation.cc

Issue 1734063003: Share animations from compositor to main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win trybot failure Created 4 years, 9 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
« no previous file with comments | « cc/animation/animation.h ('k') | cc/animation/animation_delegate.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/animation/animation.h" 5 #include "cc/animation/animation.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
11 #include "cc/animation/animation_curve.h" 11 #include "cc/animation/animation_curve.h"
12 #include "cc/base/time_util.h" 12 #include "cc/base/time_util.h"
13 13
14 namespace { 14 namespace {
15 15
16 // This should match the RunState enum. 16 // This should match the RunState enum.
17 static const char* const s_runStateNames[] = {"WAITING_FOR_TARGET_AVAILABILITY", 17 static const char* const s_runStateNames[] = {"WAITING_FOR_TARGET_AVAILABILITY",
18 "WAITING_FOR_DELETION", 18 "WAITING_FOR_DELETION",
19 "STARTING", 19 "STARTING",
20 "RUNNING", 20 "RUNNING",
21 "PAUSED", 21 "PAUSED",
22 "FINISHED", 22 "FINISHED",
23 "ABORTED"}; 23 "ABORTED",
24 "ABORTED_BUT_NEEDS_COMPLETION"};
24 25
25 static_assert(static_cast<int>(cc::Animation::LAST_RUN_STATE) + 1 == 26 static_assert(static_cast<int>(cc::Animation::LAST_RUN_STATE) + 1 ==
26 arraysize(s_runStateNames), 27 arraysize(s_runStateNames),
27 "RunStateEnumSize should equal the number of elements in " 28 "RunStateEnumSize should equal the number of elements in "
28 "s_runStateNames"); 29 "s_runStateNames");
29 30
30 } // namespace 31 } // namespace
31 32
32 namespace cc { 33 namespace cc {
33 34
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // the main thread. 262 // the main thread.
262 if (run_state_ == Animation::PAUSED || 263 if (run_state_ == Animation::PAUSED ||
263 other->run_state_ == Animation::PAUSED) { 264 other->run_state_ == Animation::PAUSED) {
264 other->run_state_ = run_state_; 265 other->run_state_ = run_state_;
265 other->pause_time_ = pause_time_; 266 other->pause_time_ = pause_time_;
266 other->total_paused_time_ = total_paused_time_; 267 other->total_paused_time_ = total_paused_time_;
267 } 268 }
268 } 269 }
269 270
270 } // namespace cc 271 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/animation.h ('k') | cc/animation/animation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698