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

Side by Side Diff: cc/scheduler/begin_frame_source.cc

Issue 2930813002: Avoid DCHECK in ExternalBeginFrameSource::GetMissedBeginFrameArgs caused by out of order frame time (Closed)
Patch Set: Addressed CR feedback Created 3 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
« no previous file with comments | « no previous file | cc/scheduler/begin_frame_source_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/scheduler/begin_frame_source.h" 5 #include "cc/scheduler/begin_frame_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 } 331 }
332 332
333 BeginFrameArgs ExternalBeginFrameSource::GetMissedBeginFrameArgs( 333 BeginFrameArgs ExternalBeginFrameSource::GetMissedBeginFrameArgs(
334 BeginFrameObserver* obs) { 334 BeginFrameObserver* obs) {
335 if (!last_begin_frame_args_.IsValid()) 335 if (!last_begin_frame_args_.IsValid())
336 return BeginFrameArgs(); 336 return BeginFrameArgs();
337 337
338 const BeginFrameArgs& last_args = obs->LastUsedBeginFrameArgs(); 338 const BeginFrameArgs& last_args = obs->LastUsedBeginFrameArgs();
339 if (last_args.IsValid() && 339 if (last_args.IsValid() &&
340 last_begin_frame_args_.frame_time == last_args.frame_time) { 340 last_begin_frame_args_.frame_time <= last_args.frame_time) {
341 return BeginFrameArgs(); 341 return BeginFrameArgs();
342 } 342 }
343 343
344 DCHECK((last_begin_frame_args_.source_id != last_args.source_id) || 344 DCHECK((last_begin_frame_args_.source_id != last_args.source_id) ||
345 (last_begin_frame_args_.sequence_number > last_args.sequence_number)) 345 (last_begin_frame_args_.sequence_number > last_args.sequence_number))
346 << "current " << last_begin_frame_args_.AsValue()->ToString() << ", last " 346 << "current " << last_begin_frame_args_.AsValue()->ToString() << ", last "
347 << last_args.AsValue()->ToString(); 347 << last_args.AsValue()->ToString();
348 BeginFrameArgs missed_args = last_begin_frame_args_; 348 BeginFrameArgs missed_args = last_begin_frame_args_;
349 missed_args.type = BeginFrameArgs::MISSED; 349 missed_args.type = BeginFrameArgs::MISSED;
350 return missed_args; 350 return missed_args;
351 } 351 }
352 352
353 } // namespace cc 353 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/begin_frame_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698