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

Side by Side Diff: cc/test/test_compositor_frame_sink.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_layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/test_compositor_frame_sink.h" 5 #include "cc/test/test_compositor_frame_sink.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "cc/output/begin_frame_args.h" 10 #include "cc/output/begin_frame_args.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 begin_frame_source.reset(new BackToBackBeginFrameSource( 75 begin_frame_source.reset(new BackToBackBeginFrameSource(
76 base::MakeUnique<DelayBasedTimeSource>(task_runner_.get()))); 76 base::MakeUnique<DelayBasedTimeSource>(task_runner_.get())));
77 } else { 77 } else {
78 begin_frame_source.reset(new DelayBasedBeginFrameSource( 78 begin_frame_source.reset(new DelayBasedBeginFrameSource(
79 base::MakeUnique<DelayBasedTimeSource>(task_runner_.get()))); 79 base::MakeUnique<DelayBasedTimeSource>(task_runner_.get())));
80 begin_frame_source->SetAuthoritativeVSyncInterval( 80 begin_frame_source->SetAuthoritativeVSyncInterval(
81 base::TimeDelta::FromMilliseconds(1000.f / 81 base::TimeDelta::FromMilliseconds(1000.f /
82 renderer_settings_.refresh_rate)); 82 renderer_settings_.refresh_rate));
83 } 83 }
84 scheduler.reset(new DisplayScheduler( 84 scheduler.reset(new DisplayScheduler(
85 begin_frame_source.get(), task_runner_.get(), 85 task_runner_.get(),
86 display_output_surface->capabilities().max_frames_pending)); 86 display_output_surface->capabilities().max_frames_pending));
87 } 87 }
88 88
89 display_.reset(new Display( 89 display_.reset(new Display(
90 shared_bitmap_manager(), gpu_memory_buffer_manager(), renderer_settings_, 90 shared_bitmap_manager(), gpu_memory_buffer_manager(), renderer_settings_,
91 frame_sink_id_, std::move(begin_frame_source), 91 frame_sink_id_, std::move(begin_frame_source),
92 std::move(display_output_surface), std::move(scheduler), 92 std::move(display_output_surface), std::move(scheduler),
93 base::MakeUnique<TextureMailboxDeleter>(task_runner_.get()))); 93 base::MakeUnique<TextureMailboxDeleter>(task_runner_.get())));
94 94
95 // We want the Display's OutputSurface to hear about lost context, and when 95 // We want the Display's OutputSurface to hear about lost context, and when
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 bool will_draw_and_swap, 197 bool will_draw_and_swap,
198 const RenderPassList& render_passes) { 198 const RenderPassList& render_passes) {
199 test_client_->DisplayWillDrawAndSwap(will_draw_and_swap, render_passes); 199 test_client_->DisplayWillDrawAndSwap(will_draw_and_swap, render_passes);
200 } 200 }
201 201
202 void TestCompositorFrameSink::DisplayDidDrawAndSwap() { 202 void TestCompositorFrameSink::DisplayDidDrawAndSwap() {
203 test_client_->DisplayDidDrawAndSwap(); 203 test_client_->DisplayDidDrawAndSwap();
204 } 204 }
205 205
206 } // namespace cc 206 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698