| Index: sky/shell/ui/animator.cc
|
| diff --git a/sky/shell/ui/animator.cc b/sky/shell/ui/animator.cc
|
| index e7f299b97c99012a5404526bb52bdf3233ff049d..0833259c65d5740b58d9ad1105a20381aa484637 100644
|
| --- a/sky/shell/ui/animator.cc
|
| +++ b/sky/shell/ui/animator.cc
|
| @@ -34,9 +34,17 @@ void Animator::RequestFrame() {
|
| }
|
| }
|
|
|
| +void Animator::CancelFrameRequest() {
|
| + engine_requested_frame_ = false;
|
| +}
|
| +
|
| void Animator::BeginFrame() {
|
| DCHECK(frame_in_progress_);
|
| - DCHECK(engine_requested_frame_);
|
| + // There could be a request in the message loop at time of cancel.
|
| + if (!engine_requested_frame_) {
|
| + frame_in_progress_ = false;
|
| + return;
|
| + }
|
| engine_requested_frame_ = false;
|
|
|
| engine_->BeginFrame(base::TimeTicks::Now());
|
|
|