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

Side by Side Diff: cc/test/fake_external_begin_frame_source.cc

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Brian's comments. Created 4 years 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/test/fake_external_begin_frame_source.h ('k') | cc/test/fake_layer_tree_host_impl.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/test/fake_external_begin_frame_source.h" 5 #include "cc/test/fake_external_begin_frame_source.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 obs->OnBeginFrame(args); 70 obs->OnBeginFrame(args);
71 if (tick_automatically_) 71 if (tick_automatically_)
72 PostTestOnBeginFrame(); 72 PostTestOnBeginFrame();
73 } 73 }
74 74
75 void FakeExternalBeginFrameSource::PostTestOnBeginFrame() { 75 void FakeExternalBeginFrameSource::PostTestOnBeginFrame() {
76 begin_frame_task_.Reset( 76 begin_frame_task_.Reset(
77 base::Bind(&FakeExternalBeginFrameSource::TestOnBeginFrame, 77 base::Bind(&FakeExternalBeginFrameSource::TestOnBeginFrame,
78 weak_ptr_factory_.GetWeakPtr())); 78 weak_ptr_factory_.GetWeakPtr()));
79 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 79 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
80 FROM_HERE, 80 FROM_HERE, base::Bind(begin_frame_task_.callback(),
81 base::Bind(begin_frame_task_.callback(), 81 CreateBeginFrameArgsForTesting(
82 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE)), 82 BEGINFRAME_FROM_HERE, source_id(),
83 next_begin_frame_number_++)),
83 base::TimeDelta::FromMilliseconds(milliseconds_per_frame_)); 84 base::TimeDelta::FromMilliseconds(milliseconds_per_frame_));
84 } 85 }
85 86
86 } // namespace cc 87 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_external_begin_frame_source.h ('k') | cc/test/fake_layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698