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

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

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)
Patch Set: Add CompositorFrameSinkSupport::Create Created 3 years, 8 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/surfaces/direct_compositor_frame_sink.cc ('k') | components/exo/compositor_frame_sink.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 "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 renderer_settings_, frame_sink_id_, begin_frame_source_.get(), 91 renderer_settings_, frame_sink_id_, begin_frame_source_.get(),
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
96 // this shares a context with it we should not be listening for lost context 96 // this shares a context with it we should not be listening for lost context
97 // callbacks on the context here. 97 // callbacks on the context here.
98 if (display_context_shared_with_compositor && context_provider()) 98 if (display_context_shared_with_compositor && context_provider())
99 context_provider()->SetLostContextCallback(base::Closure()); 99 context_provider()->SetLostContextCallback(base::Closure());
100 100
101 support_ = base::MakeUnique<CompositorFrameSinkSupport>( 101 constexpr bool is_root = false;
102 this, surface_manager_.get(), frame_sink_id_, false /* is_root */, 102 constexpr bool handles_frame_sink_id_invalidation = true;
103 true /* handles_frame_sink_id_invalidation */, 103 constexpr bool needs_sync_points = true;
104 true /* needs_sync_points */); 104 support_ = CompositorFrameSinkSupport::Create(
105 this, surface_manager_.get(), frame_sink_id_, is_root,
106 handles_frame_sink_id_invalidation, needs_sync_points);
105 client_->SetBeginFrameSource(&external_begin_frame_source_); 107 client_->SetBeginFrameSource(&external_begin_frame_source_);
106 108
107 display_->Initialize(this, surface_manager_.get()); 109 display_->Initialize(this, surface_manager_.get());
108 display_->renderer_for_testing()->SetEnlargePassTextureAmountForTesting( 110 display_->renderer_for_testing()->SetEnlargePassTextureAmountForTesting(
109 enlarge_pass_texture_amount_); 111 enlarge_pass_texture_amount_);
110 display_->SetVisible(true); 112 display_->SetVisible(true);
111 return true; 113 return true;
112 } 114 }
113 115
114 void TestCompositorFrameSink::DetachFromClient() { 116 void TestCompositorFrameSink::DetachFromClient() {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 support_->SetNeedsBeginFrame(needs_begin_frames); 205 support_->SetNeedsBeginFrame(needs_begin_frames);
204 } 206 }
205 207
206 void TestCompositorFrameSink::OnDidFinishFrame(const BeginFrameAck& ack) {} 208 void TestCompositorFrameSink::OnDidFinishFrame(const BeginFrameAck& ack) {}
207 209
208 void TestCompositorFrameSink::SendCompositorFrameAckToClient() { 210 void TestCompositorFrameSink::SendCompositorFrameAckToClient() {
209 client_->DidReceiveCompositorFrameAck(); 211 client_->DidReceiveCompositorFrameAck();
210 } 212 }
211 213
212 } // namespace cc 214 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink.cc ('k') | components/exo/compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698